[Merge] lp:~gunnarhj/language-selector/fix-553162 into lp:language-selector

Gunnar Hjalmarsson ubuntu at gunnar.cc
Wed Nov 24 17:18:28 GMT 2010


Review: Resubmit
I moved the first line of code because there are now two docstrings in writeUserLanguageSetting(), explaining one section each, and the conffiles variable is used in both sections. Do you still want me to revert?

Actually, _update_gdm_dmrc() was moved from writeUserLangSetting(). Diffs may play a trick on you sometimes. :)

data/gdm-lang-unset.sh makes it possible to by-pass the LANG="$GDM_LANG" line in Xsession, and as far as I can tell, it has to be done at each login in order to keep LANG separated from the translation language.

I understand that you are anxious to avoid that expensive code is run unnecessarily at login, and I share that view. I think that my first Xsession suggestion(s) included such unnecessary code, and that was stupid. However, in data/language-environment.sh there is the language_update() function which holds the possibly expensive stuff, and that function is only called if the user changes the language from the greeter; otherwise only the variable checks at the bottom are done. In other words I would say that my suggestion does not include any expensive code that would be run at each login.

For the case the user does change the language from the greeter, OTOH, I can't see how we could avoid doing something at login. Setting LANGUAGE and LC_MESSAGES to new values is reasonably necessary. Then why do I suggest that ~/.profile is updated as well? Right now I come to think of two reasons:

1. Efficiency. If ~/.profile was not updated, ~/.dmrc would not correspond with ~/.profile, and if the user does not go to "Language Support" and redo the language switch (and why would s/he find such a measure to make sense?), it would mean that data/language-environment.sh would need to set LANGUAGE and LC_MESSAGES at each login. In other words, in the long run it's more efficient to have data/language-environment.sh update ~/.profile as well.

2. Avoid confusion. A user, who checks the contents of ~/.profile, would find that the LANGUAGE and LC_MESSAGES lines would not correspond with the LANGUAGE and LC_MESSAGES environment variables.

The only thing I suggest with a bearing on upgrades is the stuff in the debian/language-selector.postinst file which sets LC_MESSAGES out from LANGUAGE. While I believe that the result of it would be that for some users Ubuntu would start doing The Right Thing instantly after upgrade (or rather after next login after the upgrade...), I can't really see which unintended changes you have in mind. But if your concerns in this respect remain, the file can be dropped without any consequences for the rest of the suggestions. Let me know.

I resubmitted the merge proposal without any changes for the time being, awaiting your replies to my comments above and at bug 553162.
-- 
https://code.launchpad.net/~gunnarhj/language-selector/fix-553162/+merge/39791
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~gunnarhj/language-selector/fix-553162 into lp:language-selector.



More information about the Ubuntu-reviews mailing list