[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
Wed Nov 10 06:23:35 UTC 2010


[ moving discussion from bug 655427, so more people get notified ]

On 2010-11-10 03:10, trespasser wrote:
> I agree this is a duplicate to the certain point but (please, correct
> me if I am wrong or missed something in discussion on bug 553162)
> your patch makes sure $LANG, $LANGUAGE and $LC_MESSAGES all point to
> the same language.

Ok, then I'll correct you. :-)  The patch makes sure that LANGUAGE and
LC_MESSAGES state the same language, so messages and menus are
translated as expected. LANG is separated to handle other localization
aspects.

With 10.04 language-selector introduced a separation between language
for message translation and other localization stuff. However, a couple
of related issues were left unsolved. I'm trying to address those issues
and with that help complete the separation.

> My issue is to separate those variables as I want to see Polish
> currency (zł or PLN) but English/US decimal separator (. instead of
> ,) as well as Polish date format (2010-11-10) but English name of
> days (Wednesday instead of Środa) and Polish days order (weeks in
> Poland traditionally starts on Monday).

It sounds like you want to not only separate the variables you mention,
but rather set each LC_* variable (except for LC_ALL) individually. In
addition to that, you are affected by the issue that names of days and
months are not actually subject to translation. To completely satisfy
such a complex wishlist, you'd need to create a custom locale.

However, I believe that you can come close (except for the decimal
separator) by doing the following:

* Install the patch I mentioned.

* Use language-selector for setting LANGUAGE to 'en_GB:en' (and with
  that setting LC_MESSAGES to 'en_GB.utf8').

* Use language-selector for setting LANG to 'pl_PL.utf8'.

* Edit your ~/.profile file manually and add:
  export LC_TIME="en_DK.utf8"

> Therefore, in my opinion, language-selector should be reduced to
> choosing a language only

Please note that that would be a step backwards.

> and more advanced changes should be done in
> custom locale editor (such thing should be introduced). What's more,
> standard regarding locale should be better documented and guidance
> for developers on using particular locale variables should be
> outlined with strong examples.

Personally I hope that the GUI will be enough intuitive to limit the
need for comprehensive docs.

-- 
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 GDM: The Gnome Display Manager: New
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