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 701871 - region panel empty on live cd
region panel empty on live cd
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Region & Language
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-08 18:55 UTC by Matthias Clasen
Modified: 2021-06-09 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (988.78 KB, image/png)
2013-06-08 18:55 UTC, Matthias Clasen
  Details
region: Make sure to never display empty Language or Formats settings (1.54 KB, patch)
2013-06-16 21:13 UTC, Rui Matos
needs-work Details | Review
region: Make sure not to display an empty input sources list (2.98 KB, patch)
2013-06-16 21:13 UTC, Rui Matos
committed Details | Review

Description Matthias Clasen 2013-06-08 18:55:46 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.
Comment 1 Rui Matos 2013-06-11 15:00:23 UTC
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?
Comment 2 Bastien Nocera 2013-06-11 15:05:48 UTC
I'd rather have 2).
Comment 3 Matthias Clasen 2013-06-11 23:24:47 UTC
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.
Comment 4 Adam Williamson 2013-06-14 17:02:57 UTC
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.
Comment 5 Matthias Clasen 2013-06-15 14:58:30 UTC
if g-i-s was run and the region panel in the session is empty afterwards, that would be a g-i-s bug.
Comment 6 Matthias Clasen 2013-06-15 15:02:18 UTC
See bug 702166 for the g-i-s side of the story
Comment 7 Matthias Clasen 2013-06-15 15:03:27 UTC
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.
Comment 8 Rui Matos 2013-06-16 21:13:38 UTC
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.
Comment 9 Rui Matos 2013-06-16 21:13:45 UTC
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.
Comment 10 Bastien Nocera 2013-06-17 09:39:33 UTC
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.
Comment 11 Bastien Nocera 2013-06-17 09:41:50 UTC
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.
Comment 12 Rui Matos 2013-06-17 10:03:44 UTC
(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.
Comment 13 Bastien Nocera 2013-06-17 10:22:33 UTC
(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.
Comment 14 Bastien Nocera 2013-06-17 10:25:38 UTC
(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 15 Rui Matos 2013-06-17 15:21:44 UTC
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
Comment 16 André Klapper 2021-06-09 16:30:00 UTC
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.