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)

x86
All
defect
Not set
normal

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
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
(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
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.
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
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").
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.
FYI the same applies to "sk", .po is translated but stage's still in English.
Blocks: 526183
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
Verified FIXED; de and sk are back as being translated.
Status: RESOLVED → VERIFIED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.