Comment 33 for bug 553162

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Martin,

On 2010-10-07 11:11, Martin Pitt wrote:
> [gdm] just has a simple locale selector ... the main point is that
> you can start a desktop session in a different language.

That's crystal clear to me. And as long as language-selector didn't distinguish between language and other locale aspects, the natural way to serve that purpose was to let GDM set $LANG. There was no reason to do it otherwise.

As from Lucid (revision 79 in language-selector, I think) language-selector works differently, and currently it does not play well with GDM. Making GDM and language-selector work well together in this respect, i.e. preventing unexpected behavior and user confusion, is the focus I have. Please note that I suggest changes to both language-selector and GDM.

Keeping the limited purpose of GDM's locale selector in mind, i.e. allowing users to start a session in a different language, I believe that _now_ the best way to serve that purpose is to update $LANGUAGE and set $LC_MESSAGES, while leaving $LANG to language-selector. In short: Keep the purpose, change the method.

So, why do I persist, and claim that my method is better? As far as I can tell, the patches I wrote make language-selector and GDM work seamlessly together, without any cause left for users to get confused. At the same time I can't see how going the other way, and just unset $LANGUAGE, would be sufficient to prevent undesired user surprises.

In an attempt to make my point I added this code to Xsession:

    if [ $( echo $GDM_LANG | sed 's/\..*//' ) != \
         $( echo $LANGUAGE | sed 's/:.*//' ) ]; then
        unset LANGUAGE
    fi

Then I made sure that everything was set to Swedish to start with. Now, please consider this scenario:

* I decide to switch the language (and nothing else) to en_US, and do so from GDM.

* While now seeing English in menus and messages, I also see those ambigous American date formats etc., which I don't want.

* Without actually understanding what happened, I go to Language Support and open the tab for non-language locale settings. To my surprise, it appears as if Swedish is still selected. Weird! Maybe a temporary glitch...?

* I restart the computer. No change.

* This time, when in the Language Support tab for non-language locale settings, I change (from Swedish) to something else, and then back to Swedish. (I happen to know by now that that makes a difference, but does the average user know? Probably not.)

* Restart.

* Now Swedish is the pre-selected _language_ in GDM. Seems like we are back at square one. :(

This is certainly not what I want, and I'm sure that you do not want it like that either.

So, what else can I say? Suppose most that can be said have been said by now, so I simply beg you to reconsider and give my patches a chance. If I'm proved wrong, by you or somebody else, I promise that I'll shut my mouth. But only then. ;-)