$LC_*, $LANG and $LANGUAGE env vars misinterpreted

Bug #249989 reported by Román
66
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Invalid
Wishlist
firefox (Ubuntu)
Invalid
Undecided
Unassigned
firefox-3.0 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: mozilla-firefox

Firefox doesn't interpret locale related environment variables ($LANG and $LANGUAGE) as it should.
I feeded an existing upstream bug report with the following information. You can find it at:
  https://bugzilla.mozilla.org/show_bug.cgi?id=419176

1) Ubuntu release:
  Ubuntu 8.04 Hardy Heron x86_64

2) Package version:
  3.0+nobinonly-0ubuntu0.8.04.1
  But this had affected all versions of firefox I've ever used

3) What is expected:
  Firefox should honour the locale hierarchy set in $LANGUAGE, so when the first locale isn't available, the second should be tried, and so on. Extensions should do the same, independently of the choice made by the core application (or not, but personally I'd prefer that way :-).

4) What happens instead:
  Firefox reads $LANG instead of $LANGUAGE to determine the user interface language, among other things. When there isn't a translation/localization for the system's default locale, it defaults to English, no matter what locales are listed in $LANGUAGE.

Steps to reproduce the bug:
1) Run this bash command:
LANG="gl_ES.UTF-8" LANGUAGE="gl_ES:gl_GL:gl:es_ES:es:en_US:en" firefox
Result: Firefox UI is in English. It should be in Galician, but as no localization exist in that language, it should be in Spanish.

2) Run this bash command:
LANG="es_ES.UTF-8" LANGUAGE="whoCares" firefox
(you could run "firefox -UILocale es-ES" as well)
Result: Firefox UI is in Spanish, as long as every extension.

Revision history for this message
In , Jo-hermans (jo-hermans) wrote :

The user interface is determined by what you have downloaded (there isn't a single version where you select with an environment variable) and the content is determined by Tools->Options->Content->Languages (where you can select multiple language and it depends on the website what it will show you).

This is not a bug in my opinion, unless you want Firefox to be delivered in a single version for all languages (in which case nobody should complain that it's much larger than what it is now).

Revision history for this message
In , Pacho Ramos (pacho) wrote :

(In reply to comment #1)
> This is not a bug in my opinion, unless you want Firefox to be delivered in a
> single version for all languages (in which case nobody should complain that
> it's much larger than what it is now).
>

Why not simply fallback to "C" when a lang is not available like do other apps like gedit, totem, epiphany, galeon... ?

Revision history for this message
In , Román (faneca) wrote :

I can confirm it.

Ubuntu 8.04 (Hardy Heron) x86_64 here. Default installation of firefox don't use LANG and LANGUAGE environment variables as expected:

 $LANGUAGE contains a list of languages in order of preference, just in case some of the locales aren't available for any given program; if none of them are available, the application should default to "C".

 $LANG contains the default language for the system.

Firefox uses $LANG to determine which language to use for the user interface, which is WRONG, and fails miserably to use the language hierarchy set in $LANGUAGE.

--

This actually affects me because:

1.- I prefer to use my system in "gl_ES" (Galician), and if a translation doesn't exists, then try to use "es_ES" or "es" (Spanish, my other mother tongue, much more likely to exist) before falling back to english.
So my
"$LANG" equals to "gl_ES.UTF-8"

and my
"$LANGUAGE" equals to "gl_ES:gl_GL:gl:es_ES:es:en_US:en"

As a "gl_ES" translation doesn't exist yet, firefox reads "gl_ES.UTF-8" and it decides to use the English localization directly.

2.- I worked around this in previous versions of firefox (2.*) by means of a "~/.mozilla/firefox/rc" script where I set "$LANG" to "es_ES.UTF-8", but in firefox 3 this no longer works, so I have to update EVERY APPLICATION I've configured to use firefox so they launch something like "/bin/bash -c 'LANG=es_ES.UTF-8' firefox". This is a pain in the ass ;-).

--

Regards.

Revision history for this message
In , Román (faneca) wrote :

I would like to make an addition: it's desirable that firefox EXTENSIONS too honour the LANGUAGE variable, independently of the choice made by the core firefox, because they usually have translations for not-so-used languages faster than the upstream application.

I have extensions that do have a Galician translation, but when I launch firefox using "LANG=es_ES.UTF-8 firefox" or "firefox -UILocale es-ES", those extensions are forced into Spanish as well.

Thanks.

Revision history for this message
Román (roman-pena-perez) wrote :

Binary package hint: mozilla-firefox

Firefox doesn't interpret locale related environment variables ($LANG and $LANGUAGE) as it should.
I feeded an existing upstream bug report with the following information. You can find it at:
  https://bugzilla.mozilla.org/show_bug.cgi?id=419176

1) Ubuntu release:
  Ubuntu 8.04 Hardy Heron x86_64

2) Package version:
  3.0+nobinonly-0ubuntu0.8.04.1
  But this had affected all versions of firefox I've ever used

3) What is expected:
  Firefox should honour the locale hierarchy set in $LANGUAGE, so when the first locale isn't available, the second should be tried, and so on. Extensions should do the same, independently of the choice made by the core application (or not, but personally I'd prefer that way :-).

4) What happens instead:
  Firefox reads $LANG instead of $LANGUAGE to determine the user interface language, among other things. When there isn't a translation/localization for the system's default locale, it defaults to English, no matter what locales are listed in $LANGUAGE.

Steps to reproduce the bug:
1) Run this bash command:
LANG="gl_ES.UTF-8" LANGUAGE="gl_ES:gl_GL:gl:es_ES:es:en_US:en" firefox
Result: Firefox UI is in English. It should be in Galician, but as no localization exist in that language, it should be in Spanish.

2) Run this bash command:
LANG="es_ES.UTF-8" LANGUAGE="whoCares" firefox
(you could run "firefox -UILocale es-ES" as well)
Result: Firefox UI is in Spanish, as long as every extension.

Revision history for this message
Andreas Moog (ampelbein) wrote : Reassigning issue to firefox-3

Thank you for your bugreport. Since this seems to be an issue with
version 3 of the firefox browser, I'm reassigning the package.

 affects ubuntu/firefox
 status invalid

 affects ubuntu/firefox-3.0
 status new

Changed in firefox:
status: New → Invalid
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

Changed in firefox-3.0:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Román (roman-pena-perez) wrote : Re: [Bug 249989] Re: $LC_*, $LANG and $LANGUAGE env vars misinterpreted

2009/1/22 Pedro Villavicencio <email address hidden>:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Thanks in advance.
>
> ** Changed in: firefox-3.0 (Ubuntu)
> Importance: Undecided => Low
> Status: New => Incomplete
>

Yes, it's still an annoying issue. Ubuntu 8.10 "Intrepid Ibex", firefox 3.0.5

--
           Román

Revision history for this message
Andreas Moog (ampelbein) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at: https://bugzilla.mozilla.org/show_bug.cgi?id=419176

Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Triaged
Changed in firefox:
status: Unknown → New
Revision history for this message
Román (roman-pena-perez) wrote :

  I just wanted to add the bug is a little less annoying right now,
since there is a Galician translation for Firefox 3. It isn't
integrated into Ubuntu yet, but it can be easily installed as a global
extension (which makes it uncomfortable to update) or as a profile
extension (which forces its replication for each user who wants it).

  Anyway, the bug is still there, awaiting for the fourth version to come.

  Thanks again

--
           Román

Changed in firefox:
importance: Unknown → Wishlist
Changed in firefox:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.