mozilla-services / FindMyDevice

Find My Device - 🚨🚨This server is obsolete and unsupported.🚨🚨
Mozilla Public License 2.0
13 stars 8 forks source link

Website looks no good in Afrikaans [af] #306

Open pdehaan opened 9 years ago

pdehaan commented 9 years ago

Found in https://accounts.firefox.com/ver.json (commit 310bd7d9e6906dc6124cd536c33e4ee9bdd0ebc5)

{
    "version": "0.25.0",
    "commit": "310bd7d9e6906dc6124cd536c33e4ee9bdd0ebc5",
    "l10n": "87cc8f9eb4",
    "tosPp": "a9ad0e4ed4"
}

Steps to reproduce:

  1. Set locale to "Afrikaans [af]"
  2. Go to https://find.dev.mozaws.net/

content_and_mozilla_firefox

Actual results:

MY TEXT!!!

mozilla_firefox Figure 1: Words, not so much...

Expected results:

Like, words, and stuff.

pdehaan commented 9 years ago

screenshot_11_6_14_1_07_pm

Same results with "Accept-Language: af,en-us;q=0.5".

If I understand correctly, it looks like we're probably getting a match on "af" (see /locale/af/LC_MESSAGES/client.po in FindMyDevice-l10n repo) which is empty, so we render all the things as empty strings instead of beautifully falling back to the "en" strings.

pdehaan commented 9 years ago

jrconlin commented 9 years ago

From the af/server.json file:

    "Find My Device — Firefox OS — Mozilla":"",
     "mozilla":"",
     "Firefox OS":"",
     "Find My Device":"",
     "Locate a lost phone, lock it or even erase it remotely.":"",
     "Sign in":"",
     "Create a Firefox Account":"",
     ...

So, good news! The server works just fine!

nchapman commented 9 years ago

I guess the question is whether or not we should return English for empty strings... It seems kind of beneficial to have it fail hard :smile:.

jrconlin commented 9 years ago

Honestly? I'd say that returning empty strings, or strings full of cat emojii are completely legitimate. It's a translation fault, much like translating "Find My Device" as "Mi hovecraft está llena de anguilas"

original

pdehaan commented 9 years ago

So, good news! The server works just fine!

I think you and me have different definitions of "good news", Mr. @jrconlin.

I guess we should maybe return default English for empty strings, which would be pretty kosher for translations at 90% translations, but maybe really weird for locales which are 20% translated.

jrconlin commented 9 years ago

@pdehaan I'd argue that strings that are not translated shouldn't be included in the translation list, (or have the keys prefixed somehow so they don't match for lookup), but I'll concede to whatever makes the lives of the translators easier. If there ever was a reason not to translate a given string (Say, references to "Facebook" in Evilstan become punishable by death), not displaying that given string would be a lovely idea.

pdehaan commented 9 years ago

Locales w/ 90%+ translations

LOCALE STRINGS PCT
af 2/67 (3%)
ar 2/67 (3%)
as 2/67 (3%)
ast 2/67 (3%)
be 2/67 (3%)
bg 2/67 (3%)
bn_BD 60/67 (90%)
bn_IN 2/67 (3%)
bs 2/67 (3%)
ca 2/67 (3%)
cs 52/67 (78%)
cy 2/67 (3%)
da 2/67 (3%)
db_LB 60/67 (90%)
de 60/67 (90%)
dsb 2/67 (3%)
el 2/67 (3%)
en 0/67 (0%)
eo 2/67 (3%)
es 2/67 (3%)
et 2/67 (3%)
eu 60/67 (90%)
fa 2/67 (3%)
ff 2/67 (3%)
fi 2/67 (3%)
fr 60/67 (90%)
fy 2/67 (3%)
ga 60/67 (90%)
gd 2/67 (3%)
gl 2/67 (3%)
gu_IN 2/67 (3%)
he 2/67 (3%)
hi_IN 2/67 (3%)
hr 2/67 (3%)
hsb 2/67 (3%)
ht 2/67 (3%)
hu 27/67 (41%)
id 2/67 (3%)
it 60/67 (90%)
ja 60/67 (90%)
km 2/67 (3%)
kn 2/67 (3%)
ko 2/67 (3%)
ku 2/67 (3%)
lij 2/67 (3%)
lt 2/67 (3%)
lv 2/67 (3%)
mk 2/67 (3%)
ml 2/67 (3%)
mn 2/67 (3%)
ms 2/67 (3%)
my 2/67 (3%)
nb_NO 2/67 (3%)
ne_NP 2/67 (3%)
nl 60/67 (90%)
or 2/67 (3%)
pa 24/67 (36%)
pl 2/67 (3%)
pt 60/67 (90%)
pt_BR 2/67 (3%)
ro 14/67 (21%)
ru 2/67 (3%)
si 2/67 (3%)
sk 2/67 (3%)
sl 5/67 (8%)
sq 2/67 (3%)
sr 35/67 (53%)
sv_SE 48/67 (72%)
ta 2/67 (3%)
te 2/67 (3%)
th 2/67 (3%)
tr 2/67 (3%)
uk 2/67 (3%)
ur 2/67 (3%)
vi 2/67 (3%)
xh 2/67 (3%)
zh_CN 60/67 (90%)
zh_TW 60/67 (90%)
zu 2/67 (3%)
pdehaan commented 9 years ago

Latest translation stats:

LOCALE STRINGS PCT
bn_BD 60/67 (90%)
cs 52/67 (78%)
db_LB 60/67 (90%)
de 60/67 (90%)
eu 60/67 (90%)
fr 60/67 (90%)
ga 60/67 (90%)
hu 27/67 (41%)
it 60/67 (90%)
ja 60/67 (90%)
nl 60/67 (90%)
pa 24/67 (36%)
pt 60/67 (90%)
ro 14/67 (21%)
sr 35/67 (53%)
sv_SE 48/67 (72%)
zh_CN 60/67 (90%)
zh_TW 60/67 (90%)

Here's the locales w >=90% translation rate:

[
    "bn_BD",
    "db_LB",
    "de",
    "eu",
    "fr",
    "ga",
    "it",
    "ja",
    "nl",
    "pt",
    "zh_CN",
    "zh_TW"
]

... and here's a bunch-o-locales w/ <10% translations:

LOCALE STRINGS PCT
af 2/67 (3%)
ar 2/67 (3%)
as 2/67 (3%)
ast 2/67 (3%)
be 2/67 (3%)
bg 2/67 (3%)
bn_IN 2/67 (3%)
bs 2/67 (3%)
ca 2/67 (3%)
cy 2/67 (3%)
da 2/67 (3%)
dsb 2/67 (3%)
el 2/67 (3%)
en 0/67 (0%)
eo 2/67 (3%)
es 2/67 (3%)
et 2/67 (3%)
fa 2/67 (3%)
ff 2/67 (3%)
fi 2/67 (3%)
fy 2/67 (3%)
gd 2/67 (3%)
gl 2/67 (3%)
gu_IN 2/67 (3%)
he 2/67 (3%)
hi_IN 2/67 (3%)
hr 2/67 (3%)
hsb 2/67 (3%)
ht 2/67 (3%)
id 2/67 (3%)
km 2/67 (3%)
kn 2/67 (3%)
ko 2/67 (3%)
ku 2/67 (3%)
lij 2/67 (3%)
lt 2/67 (3%)
lv 2/67 (3%)
mk 2/67 (3%)
ml 2/67 (3%)
mn 2/67 (3%)
ms 2/67 (3%)
my 2/67 (3%)
nb_NO 2/67 (3%)
ne_NP 2/67 (3%)
or 2/67 (3%)
pl 2/67 (3%)
pt_BR 2/67 (3%)
ru 2/67 (3%)
si 2/67 (3%)
sk 2/67 (3%)
sl 5/67 (8%)
sq 2/67 (3%)
ta 2/67 (3%)
te 2/67 (3%)
th 2/67 (3%)
tr 2/67 (3%)
uk 2/67 (3%)
ur 2/67 (3%)
vi 2/67 (3%)
xh 2/67 (3%)
zu 2/67 (3%)
pdehaan commented 9 years ago

Peter to verify.,