After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754522 - Ensure that the locale region matches user's selected language
Ensure that the locale region matches user's selected language
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-09-03 13:16 UTC by Mario Sánchez Prada
Modified: 2015-09-28 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal (1.82 KB, patch)
2015-09-03 13:34 UTC, Mario Sánchez Prada
none Details | Review
Patch proposal (2.01 KB, patch)
2015-09-11 21:48 UTC, Mario Sánchez Prada
accepted-commit_after_freeze Details | Review

Description Mario Sánchez Prada 2015-09-03 13:16:55 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?
Comment 1 Mario Sánchez Prada 2015-09-03 13:34:51 UTC
Created attachment 310591 [details] [review]
Patch proposal

This small patch implements the proposed approach
Comment 2 Rui Matos 2015-09-08 09:50:47 UTC
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.
Comment 3 Jasper St. Pierre (not reading bugmail) 2015-09-08 16:23:26 UTC
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.
Comment 4 Mario Sánchez Prada 2015-09-11 17:55:58 UTC
(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!
Comment 5 Mario Sánchez Prada 2015-09-11 21:48:32 UTC
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!
Comment 6 Rui Matos 2015-09-18 14:13:12 UTC
Review of attachment 311185 [details] [review]:

Looks good
Comment 7 Mario Sánchez Prada 2015-09-28 17:32:58 UTC
Committed to the master branch:
https://git.gnome.org/browse/gnome-initial-setup/commit/?id=442c9e0d599cd349a016c9b81ae4e57818ead780