Closed
Bug 526305
Opened 16 years ago
Closed 16 years ago
[FyFx] Translations don't show up for some locales on the staging server
Categories
(Webtools Graveyard :: Five Years of Firefox, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stas, Unassigned)
References
Details
(Keywords: l12y)
Works:
http://fyfx.stage.mozilla.com/fa-IR/
http://fyfx.stage.mozilla.com/es-CO/
http://fyfx.stage.mozilla.com/it-IT/
Doesn't work (translations exist):
http://fyfx.stage.mozilla.com/fa/
http://fyfx.stage.mozilla.com/es/
http://fyfx.stage.mozilla.com/it/
http://fyfx.stage.mozilla.com/vi/
http://fyfx.stage.mozilla.com/vi-VN/
http://fyfx.stage.mozilla.com/nl/
http://fyfx.stage.mozilla.com/nl-NL/
http://fyfx.stage.mozilla.com/eo/
I suspect it's happening somewhere here in http://viewvc.svn.mozilla.org/vc/projects/fyfx/trunk/home.php?revision=54919&view=markup
setlocale(LC_ALL,$current_language);
putenv('LANG='.$current_language);
putenv('LANGUAGE='.$current_language);
bindtextdomain("messages", "./locale");
textdomain("messages");
If $current_language is "fa-IR", gettext first looks for messages.po in ./locale/fa-IR/LC_MESSAGES/messages.po (which doesn't exist), then in ./locale/fa/LC_MESSAGES/messages.po (which exists) and finds it there.
For some reason the same works for it-IT, but not for nl-NL nor vi-VN.
Two-letter codes are also a problem. They don't exist in the system at all (`locale -a` shows the list), so we will need a way to translate them into 4-letter codes ("fr" --> "fr_FR").
This might help: http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.php?view=markup#l185
| Reporter | ||
Updated•16 years ago
|
Summary: [FyFx] Translations doesn't show up for some locales on the staging server → [FyFx] Translations don't show up for some locales on the staging server
| Reporter | ||
Comment 1•16 years ago
|
||
(In reply to comment #0)
> Two-letter codes are also a problem. They don't exist in the system at all
> (`locale -a` shows the list), so we will need a way to translate them into
> 4-letter codes ("fr" --> "fr_FR").
Like here: http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.inc.php?revision=50598&view=markup
| Reporter | ||
Comment 2•16 years ago
|
||
I thought that maybe nl-NL and vi-VN are not supported ny the OS, but they are:
$ locale -a
...
nl_NL
nl_NL@euro
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
...
vi_VN
vi_VN.tcvn
vi_VN.utf8
One language that doesn't seem to be installed on the staging server's system is Esperanto (eo), for we have a translation of the site.
Comment 3•16 years ago
|
||
Do we need to update the scripts according to the script you used on Mozilla.com (only 90 languages are suported) or are you going to use all languages installed on the webserver?
Let us know your thougths
| Reporter | ||
Comment 4•16 years ago
|
||
Bug 526301 attachment 410286 [details] [diff] [review] has a fix for that. It registers the locale for gettext using the correct system name (e.g. "fa" gets registered as "fa_IR.utf8").
| Reporter | ||
Comment 5•16 years ago
|
||
Landed in r55073. Some further tweaks to the list of supported locales <http://viewvc.svn.mozilla.org/vc/projects/fyfx/trunk/components/locales.inc.php?view=markup&pathrev=55073> might be needed.
For some weird reason, "de" is not displaying the translations. The locale gets registered correctly (setlocale returns "de_DE.utf8"), but <http://fyfx.stage.mozilla.com/de/> is in English.
I checked locally, and it was working, so the PO/MO file should be fine, too.
Comment 6•16 years ago
|
||
FYI the same applies to "sk", .po is translated but stage's still in English.
| Reporter | ||
Comment 7•16 years ago
|
||
There were conflicts on "svn up", resolved now. Should be OK.
http://fyfx.stage.mozilla.com/de/
http://fyfx.stage.mozilla.com/sk/
Resolving fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 8•16 years ago
|
||
Verified FIXED; de and sk are back as being translated.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•