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 323453 - Clock renders incorrectly with differing LC_TIME and LC_MESSAGES locales
Clock renders incorrectly with differing LC_TIME and LC_MESSAGES locales
Status: RESOLVED OBSOLETE
Product: gnome-panel
Classification: Other
Component: clock
2.12.x
Other All
: Normal minor
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-07 10:42 UTC by Nick Bowler
Modified: 2020-11-07 12:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Nick Bowler 2005-12-07 10:42:52 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:
Comment 1 Vincent Untz 2005-12-31 13:02:48 UTC
Right. I'm cc'ing the l10n/i18n masters to see what they think of this issue. What can be done?
Comment 2 Mohammad DAMT 2006-03-11 05:57:23 UTC
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");
Comment 3 Elijah Newren 2006-05-30 21:49:44 UTC
Duplicate of bug 343415?
Comment 4 Elijah Newren 2006-05-30 21:51:48 UTC
(or maybe bug 102416?)
Comment 5 Danilo Segan 2006-05-31 07:50:40 UTC
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).
Comment 6 Alexandre Franke 2014-10-31 20:40:32 UTC
Is that still an issue?
Comment 7 Nick Bowler 2014-11-04 16:08:54 UTC
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.
Comment 8 Alexandre Franke 2014-11-04 18:35:49 UTC
The main difficulty is actually finding someone that still uses gnome-panel. GNOME 3 users run the Shell. :-/
Comment 9 Alberts Muktupāvels 2014-11-04 19:31:54 UTC
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...
Comment 10 Nick Bowler 2014-11-04 20:09:34 UTC
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.
Comment 11 André Klapper 2020-11-07 12:16:42 UTC
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.