GNOME Bugzilla – Bug 754522
Ensure that the locale region matches user's selected language
Last modified: 2015-09-28 17:32:58 UTC
In some occasions (which unfortunately I can hardly reproduce reliably) I experienced a problem where selecting a different language than the default one in g-i-s would leave me, after re-login, in a situation where most of the strings in the system would be translated to the desired language while all the region-dependant strings (e.g. month names in the calendar) would be set in the original language. After some investigation I found that the issue was that for some reason the org.gnome.system.locale.region GSetting was being set to the original language before g-i-s was run and left like that even after changing the desired language in the first page, leading to the weird bi-lingual situation described above. It's still unclear to me how such a thing happened, but looking at the code of g-i-s I noticed that it only calls act_user_set_language() which explains why the GSettings is unchanged even after I selected a different language. So, and considering g-i-s is meant to simplify things as much for the user, I wonder if it would make sense, in the general case, to simply make sure that g-i-s would always reset that property to its default (null) value so that both the regular and the region-dependent strings get always translated to whatever language the user selects in the first step. Does this make any sense to you too?
Created attachment 310591 [details] [review] Patch proposal This small patch implements the proposed approach
Review of attachment 310591 [details] [review]: I haven't seen reports of this getting mixed as you describe but it doesn't hurt to make sure. But, please move this code to language_changed(), we shouldn't be changing things until users switch pages.
It might be due to one of our many patches which we haven't upstreamed: https://github.com/endlessm/gnome-initial-setup/commits/master/gnome-initial-setup/pages/language Probably this one: https://github.com/endlessm/gnome-initial-setup/commit/dfcf3af14c896353abc0b3c88719c903cfc5424f Which was later reverted. We need to re-sync that flow with upstream.
(In reply to Rui Matos from comment #2) > Review of attachment 310591 [details] [review] [review]: > > I haven't seen reports of this getting mixed as you describe but it doesn't > hurt to make sure. > > But, please move this code to language_changed(), we shouldn't be changing > things until users switch pages. Sorry, I overlooked this email in my Inbox. Will try to do that this weekend or early next week otherwise. Thanks!
Created attachment 311185 [details] [review] Patch proposal Attaching new patch doing the change in language_changed(). Let me know if you want me to commit it like that, or change anything else. Thanks!
Review of attachment 311185 [details] [review]: Looks good
Committed to the master branch: https://git.gnome.org/browse/gnome-initial-setup/commit/?id=442c9e0d599cd349a016c9b81ae4e57818ead780