[Bug 553162] Re: Set $LANGUAGE if the user picks a different locale in gdm, so that language-selector and gdm stop disagreeing

Gunnar Hjalmarsson 553162 at bugs.launchpad.net
Mon Oct 4 09:38:31 BST 2010


@ Martin
language-selector sets $LANGUAGE for language, and $LANG for other locales. That's why it's inconsistent that gdm sometimes uses $LANG when dealing with the language to be used for message display.

I have attached a modified gdm-patch. These are the news:

- As you pointed out in comment #24, the previous code didn't take into
account different syntax variants for setting and exporting $LANGUAGE.
Now the code for editing ~/.profile is safer.

- The $LANGUAGE priority list is preserved, as was suggested in comment
#27 by YunQiang Su.

- $LC_MESSAGES is set to take care of applications that don't recognize
$LANGUAGE.

The third item seems to solve reported problems with Mozilla apps
(Firefox/Thunderbird), which means that the solution I provided at bug
550222 already can be regarded as superseded. Also other programs that
apparently don't recognize $LANGUAGE, e.g. FileZilla and Cervisia, now
display menues etc. in the expected language.

Personally I think we should give high priority to this issue, and try
to attain consensus about a solution. I'd be happy to contribute to
achieve that goal ( seems like I have started... :) ). I noticed at
ubuntu-devel that David Planella asked for suggestions for translation
focus aspects with an eye to 11.04. Wouldn't a consensus solution to
this issue be a suitable item on the list that David is preparing at
https://wiki.ubuntu.com/Translations/Roadmaps/11.04 ?

** Attachment removed: "gdm_partial-fix-553162.debdiff (rejected)"
   https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/553162/+attachment/1644524/+files/gdm_partial-fix-553162.debdiff

** Tags added: patch

** Patch added: "gdm_partial-fix-553162.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/553162/+attachment/1670960/+files/gdm_partial-fix-553162.debdiff

-- 
Set $LANGUAGE if the user picks a different locale in gdm, so that language-selector and gdm stop disagreeing
https://bugs.launchpad.net/bugs/553162
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.

Status in Ubuntu Translations: Triaged
Status in “gdm” package in Ubuntu: In Progress
Status in “language-selector” package in Ubuntu: In Progress

Bug description:
Binary package hint: gdm

This is a follow-up to bug 407300, which has been fixed but a separate issue remains. I'm opening a separate task for language-selector, as it refers to the interaction between it and gdm.

The problem is basically that GDM seems to always override the LANG values set by language selector, and quite easily one can get to a situation where LANGUAGE and LANG differ and the desktop is a mixture of two languages.

Steps to reproduce (a):

 * New install, choosing Catalan in the installer
 * I log in without doing any changes to the language in GDM
 * I start System > Administration > Language support
 * I choose English there
 * I log out
 * I log back in without doing any changes in the GDM language chooser
 * My session is half English and half Catalan due to LANGUAGE=en and LANG=ca_ES.utf8 (Firefox in Catalan, gnome-panel in English, gnome-menus in Catalan).

Steps to reproduce (b):

 * Perform a full installation in English, as per http://testcases.qa.ubuntu.com/Install/NonEnglishLanguage#Installation%20Full%20Network%20Support
 * Go to System > Administration > Language Support
 * Install the Traditional Chinese language
 * Bring Traditional Chinese to the top of the list to become the main desktop language
 * Press the "Apply System-wide..." button
 * Reboot
 * When entering the session, you'll notice the desktop half translated in English, half in Chinese. The most noticeable parts shown in English are all the menus and Firefox. These applications seem to ignore the LANGUAGE variable
 * Running 'locale' on the terminal shows that LANG=en_US.UTF-8 and LANGUAGE=zh_K:en_US:en

I understand that this might be a problem in each application, as they should give LANGUAGE preference. Rather than filing a bug in each app right now, would it not make more sense to ensure that at least the first locale in LANGUAGE, the one in LANG and LC_MESSAGES are the same? (assuming it is possible to do such a thing, of course).

Also see the related bug 552664







More information about the Ubuntu-sponsors mailing list