GNOME Bugzilla – Bug 701871
region panel empty on live cd
Last modified: 2021-06-09 16:30:00 UTC
Created attachment 246325 [details] screenshot On the f19 beta live cd, the region panel comes up entirely empty. It should show 'English', since that is the language it is using. Similar for formats and input sources.
We are not looking at the current runtime values for any of these settings, i.e. LC_* env vars or the X layout in use currently. We just reflect the saved settings we have and assume that a policy enforcer like g-s-d actually applies them. This was also implemented on the assumption that g-i-s is properly setup and thus we should always have meaningful values for all of these settings. On the F19 live cd none of this holds. g-i-s doesn't run for the live session and we don't have default settings stored anywhere. I can see 3 or 4 ways to fix this: 1) Add code so that in case we don't have stored settings we show the current runtime values. Question: should we then immediately store those settings or should they remain "virtual"? 2) Run g-i-s in the live cd session. 3) Ship default configurations on the live cd. This would be AccountsService's /var/lib/AccountsService/users/liveuser with Language=en_US.utf8 and systemd-localed's /etc/X11/xorg.conf.d/00-keyboard.conf with Option "XkbLayout" "us". Actually, if Fedora ever gets some kind of locale selection on the live cd boot dialog, we should probably have a custom systemd service to setup those configurations at boot with the correct values for the locale chosen. 4) Change AccountsService and systemd-localed to provide us with valid default values when they don't have backing configuration files themselves. I think that the quickest fix for F19 would be 3). Anyone sees other possibilities?
I'd rather have 2).
I agree that 3) is what we can achieve for f19 at this point. I've reviewed the f19 live cd with Jon and Allan today, and the feeling was that we should really just launch the installer, and have a much less prominent escape to just try it uninstalled. Of course, that requires a different installer than the one we have now.
This doesn't just affect running live, though. The case reported to Fedora test@ was later clarified: the user created his account during installation, with anaconda's user account creation tool. Apparently this resulted in the setting not being explicitly set by g-i-s / g-s-d when the 'post-login' g-i-s was run.
if g-i-s was run and the region panel in the session is empty afterwards, that would be a g-i-s bug.
See bug 702166 for the g-i-s side of the story
If we don't want to add extra code to pick up the runtime settings, we should at least say something like "System default" instead of showing a blank panel.
Created attachment 246985 [details] [review] region: Make sure to never display empty Language or Formats settings If the settings are not populated as they should we should still show something to not look broken UI-wise. -- Ok, this patch and the next try to make us look a bit better in these (buggy) circumstances. I made them so that the string freeze isn't broken so if we want we can land this in the 3.8 branch.
Created attachment 246986 [details] [review] region: Make sure not to display an empty input sources list Just like the system settings, the user's settings might be empty because some other component failed before us. Still, we shouldn't show an empty list since that looks broken.
Review of attachment 246985 [details] [review]: ::: panels/region/cc-region-panel.c @@ +537,3 @@ + name = gnome_get_country_from_locale (region, region); + else + name = g_strdup (C_("Language", "None")); It's not language, it's region. And we're supposed to deduce the region from the language locale when region is empty.
Review of attachment 246986 [details] [review]: ::: panels/region/cc-region-panel.c @@ +785,3 @@ + + l = gtk_container_get_children (list); + if (l && l->next == NULL && g_strcmp0 (g_object_get_data (G_OBJECT (l->data), "type"), "none") == 0) That's ugly. If (!l) return; if (l->next ==NULL) goto out; etc.
(In reply to comment #10) > ::: panels/region/cc-region-panel.c > @@ +537,3 @@ > + name = gnome_get_country_from_locale (region, region); > + else > + name = g_strdup (C_("Language", "None")); > > It's not language, it's region. I know it's not, but that's only the context, and I wanted to make these patches not break the string freeze so that they could go in the 3.8 branch if we decide so. I think using the same "None" string both for Language and Formats should be good enough. > And we're supposed to deduce the region from > the language locale when region is empty. We already do and this doesn't change anything regarding that.
(In reply to comment #12) > (In reply to comment #10) > > ::: panels/region/cc-region-panel.c > > @@ +537,3 @@ > > + name = gnome_get_country_from_locale (region, region); > > + else > > + name = g_strdup (C_("Language", "None")); > > > > It's not language, it's region. > > I know it's not, but that's only the context, and I wanted to make these > patches not break the string freeze so that they could go in the 3.8 branch if > we decide so. I think using the same "None" string both for Language and > Formats should be good enough. Language and format aren't the same, and they're likely translated differently in some language. I'm not sure that'd be good enough. Please ask gnome-i18n whether it is. > > And we're supposed to deduce the region from > > the language locale when region is empty. > > We already do and this doesn't change anything regarding that. I still don't understand in which cases we could have such widespread failure that we couldn't fallback to a hard-coded default language (say, en_US) and couldn't figure out a fallback region setting.
(In reply to comment #13) > (In reply to comment #12) > > (In reply to comment #10) > > > ::: panels/region/cc-region-panel.c > > > @@ +537,3 @@ > > > + name = gnome_get_country_from_locale (region, region); > > > + else > > > + name = g_strdup (C_("Language", "None")); > > > > > > It's not language, it's region. > > > > I know it's not, but that's only the context, and I wanted to make these > > patches not break the string freeze so that they could go in the 3.8 branch if > > we decide so. I think using the same "None" string both for Language and > > Formats should be good enough. > > Language and format aren't the same, and they're likely translated differently > in some language. I'm not sure that'd be good enough. Please ask gnome-i18n > whether it is. FWIW, it's not good enough for French. Langue (Language) is feminine. Formats is masculine and plural.
Comment on attachment 246986 [details] [review] region: Make sure not to display an empty input sources list Pushing just this one with the style changes. I'll ask on the i18n list about adding a new string for the other patch. Attachment 246986 [details] pushed as 365a713 - region: Make sure not to display an empty input sources list
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.