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 655960 - GDateTime formatting should honor LC_TIME instead of LC_MESSAGES for translations
GDateTime formatting should honor LC_TIME instead of LC_MESSAGES for translat...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-08-04 11:50 UTC by Rui Matos
Modified: 2011-09-05 02:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program (389 bytes, text/plain)
2011-08-04 11:50 UTC, Rui Matos
  Details
a possible patch (6.42 KB, patch)
2011-08-22 01:44 UTC, Matthias Clasen
none Details | Review

Description Rui Matos 2011-08-04 11:50:25 UTC
Created attachment 193242 [details]
Test program

Attached source file highlights the problem:

$ cc `pkg-config --libs --cflags glib-2.0` foo.c -o foo
$ echo $LC_TIME
pt_PT.UTF-8
$ ./foo
Thursday, August
$ LC_MESSAGES=pt_PT.UTF-8 ./foo
5ª Feira, Agosto
Comment 1 Matthias Clasen 2011-08-22 01:44:38 UTC
Created attachment 194340 [details] [review]
a possible patch
Comment 2 Allison Karlitskaya (desrt) 2011-08-22 03:31:50 UTC
two notes:

I consider LC_TIME to be slightly broken as a concept (as applied in the C library).  For things like what the preferred formats are, LC_TIME totally makes sense.  Things like "Mon", "Tue", "Jan", "Feb" and so on are more like LC_MESSAGES territory, in my opinion.  glibc uses LC_TIME for both.  We could elect to follow it for compatibility, or go our own way because we think that it makes more sense.

Second -- from checking for how to do the thousands separator for g_format_size(), I don't think we have nl_langinfo() on Windows.  I'd be very happy to be proven wrong on that point.
Comment 3 Allison Karlitskaya (desrt) 2011-08-30 22:43:00 UTC
is this committed now?
Comment 4 Matthias Clasen 2011-09-05 02:46:11 UTC
yes, it is