GNOME Bugzilla – Bug 323453
Clock renders incorrectly with differing LC_TIME and LC_MESSAGES locales
Last modified: 2020-11-07 12:16:42 UTC
Please describe the problem: The clock applet appears to use BOTH the LC_MESSAGES locale and the LC_TIME locale for its time display, and thus causes a bizarre reading if these locales differ (i.e. using "ja_JP.UTF-8" for LC_TIME and "en_CA.UTF-8" for LC_MESSAGES. Steps to reproduce: 1. Set LC_TIME locale to "ja_JP.UTF-8" 2. Set LC_MESSAGES locale to "en_CA.UTF-8" 3. Restart the clock applet Actual results: The clock applet displays: "水 7 12月 05:38" Expected results: The clock applet should display "12月 7日 (水) 05:38" Does this happen every time? Yes Other information:
Right. I'm cc'ing the l10n/i18n masters to see what they think of this issue. What can be done?
That is because the time formatting strings go to LC_MESSAGES. We could fix this by moving the formatting strings to a separate collection of PO files and install it in <localedir>/LC_TIME and display it with: #define _T(s) dcgettext(GETTEXT_PACKAGE, s, LC_TIME) ... time_format = cd->showseconds ? _T("%l:%M:%S %p") : _T("%l:%M %p");
Duplicate of bug 343415?
(or maybe bug 102416?)
This has been a problem for a while already (i.e. as long as we're supporting translations). The idea is to solve it all through a generic locale library (http://live.gnome.org/LocaleProject; it's stalled right now). It seems related to bug #343415, but not really the same issue. Bug #102416 is entirely different issue, IMHO (it's about GUI layout).
Is that still an issue?
I am not in a position to test this anymore as I have not used GNOME for many years. But it takes only a few seconds to check. If there are different display modes for the clock, test all of them separately. - Set LC_ALL="ja_JP.UTF-8", observe what the clock displays. Quit. - Unset LC_ALL, set LC_MESSAGES="en_CA.UTF-8" and LC_TIME="ja_JP.UTF-8". observe what the clock displays. Quit. If the clock is not the same in both cases, then the bug still exists.
The main difficulty is actually finding someone that still uses gnome-panel. GNOME 3 users run the Shell. :-/
1. LC_ALL="ja_JP.UTF-8" gnome-panel --replace 2. LC_ALL="" LC_MESSAGES="en_CA.UTF-8" LC_TIME="ja_JP.UTF-8" gnome-panel --replace In both cases clock was displayed similarly. (In reply to comment #7) > If the clock is not the same in both cases, then the bug still exists. Reading this looks like bug does not exist. (In reply to comment #0) > Actual results: > The clock applet displays: "水 7 12月 05:38" > > Expected results: > The clock applet should display "12月 7日 (水) 05:38" But looking at this it looks like bug still exists. I got same display mode as in actual results not the expected...
If the LC_ALL="ja_JP.UTF-8" version is not formatted correctly (and the "Actual Results" in the OP is definitely bad), I suspect that you do not have Japanese locales for GNOME installed, so it is using the default (untranslated) time format strings. The thing is that the time format comes from GNOME, but the actual substitutions of words like "Tuesday" come from the C library, which have separate locale databases. So it's possible that one set of locales can be installed but not the other.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old feature requests in Bugzilla which have not seen updates for many years. If you still use gnome-panel and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/ Thank you for reporting this issue and we are sorry it could not be implemented.