! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Regression: calendar does not reflect locale settings
Status:
CLOSED: INVALID

Comments

Description Andrew Conkling 2005-11-20 18:21:16 CET
My LC_TIME is set to en_GB.utf8, but my latest update (SVN r18884) doesn't start
the week on Monday.  Instead, it starts on Sunday.  This just happened with this
past update and Evolution (only other program I could think to test) shows the
date correctly.
Comment 1 juha editbugs 2005-11-29 22:29:28 CET
Yes, same thing happens there.
You can get it work either by setting
LANG=="en_GB.UTF-8"
or
export LC_MESSAGES="en_GB.UTF-8"

At least those worked for me.

Anyway, this is not orage/xfcalendar issue since we get the calendar format from
GTK directly and GTL takes care of reading the locales. IF there is bug it is in
GTK.
Comment 2 Andrew Conkling 2005-11-29 22:36:45 CET
Why LC_MESSAGES and not LC_TIME?
Comment 3 Andrew Conkling 2005-11-30 14:57:20 CET
OK, so neither works for me.  I just restarted orage after setting LC_MESSAGES
to en_GB.utf8 to no avail.  And I don't think this is a GTK+ problem, because
Evolution works just fine in this regard.  If you have another program I can
test in this regard, feel free to let me know.
Comment 4 juha editbugs 2005-12-01 20:33:05 CET
You might want to take a look on
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127069
so there seems to be a gtk bug. I faintly think that this is fixed in GTK 2.8.5
where it should work based on LC_TIME. I did not test this.

I do not know if evolution is using gtkcalendar at all or if it uses its own way
of displaying calendar, but orage calls simply gtk_calendar_new () and it uses
what ever locale it uses to get the first day of the week.

http://developer.gnome.org/doc/API/2.0/gtk/GtkCalendar.html#id3861574

does unfortunately not tell which specific setting it uses. But I agree that it
should use LC_TIME. Still we will use what GtlCalender gives us. Orage will not
recode it.
Comment 5 Andrew Conkling 2005-12-01 21:35:07 CET
(In reply to comment #4)
> You might want to take a look on
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127069
> so there seems to be a gtk bug. I faintly think that this is fixed in GTK 2.8.5
> where it should work based on LC_TIME. I did not test this.
> 
> I do not know if evolution is using gtkcalendar at all or if it uses its own way
> of displaying calendar, but orage calls simply gtk_calendar_new () and it uses
> what ever locale it uses to get the first day of the week.
> 
> http://developer.gnome.org/doc/API/2.0/gtk/GtkCalendar.html#id3861574
> 
> does unfortunately not tell which specific setting it uses. But I agree that it
> should use LC_TIME. Still we will use what GtlCalender gives us. Orage will not
> recode it.

I didn't realize that; I had assumed it must have been doing something else. 
I'll test this with some basic PyGTK+ code, but I expect that I'll find the same
thing you did.  Do you know of any way to find out what a specific locale sets?
 I'm *pretty sure* but not entirely that en_GB sets the first day as Monday.

Also, that RH bug seems to be picked up from a GTK+ guy (Matthias) but there's
nothing showing up in GNOME's bugzilla, the place I'm used to seeing/reporting
GTK+ bugs.  Any word on this?  (I want to make sure GTK+ knows about it, because
LC_TIME makes so much more sense.)

Oh, and the problem seems to have gone away with Orage; seems it was just a
fluke?  So I'll close this again (but test it later).
Comment 6 juha editbugs 2005-12-02 06:44:00 CET
you can see locale values with command
locale -k -c LC_TIME
after you set the locale.


For example:
$ export LANG=en_GB
$ locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %d %b %Y %T %Z"
d_fmt="%d/%m/%y"
t_fmt="%T"
t_fmt_ampm="%l:%M:%S %P %Z"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries="S"
week-ndays=7
week-1stday=19971130
week-1stweek=0
first_weekday=1
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ISO-8859-1"

Which shows that for en_GB week should start on Monday (first_weekday=1)

American week starts on Sunday:
$ export LANG=us_AM
$ locale
LANG=us_AM
LC_CTYPE="us_AM"
LC_NUMERIC="us_AM"
LC_TIME="us_AM"
LC_COLLATE="us_AM"
LC_MONETARY="us_AM"
LC_MESSAGES="us_AM"
LC_PAPER="us_AM"
LC_NAME="us_AM"
LC_ADDRESS="us_AM"
LC_TELEPHONE="us_AM"
LC_MEASUREMENT="us_AM"
LC_IDENTIFICATION="us_AM"
LC_ALL=
$ locale -k -c LC_TIME
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %b %e %H:%M:%S %Y"
d_fmt="%m/%d/%y"
t_fmt="%H:%M:%S"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries=""
week-ndays=7
week-1stday=19971130
week-1stweek=4
first_weekday=7
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ANSI_X3.4-1968"
Comment 7 Andrew Conkling 2006-02-07 22:01:22 CET
Surprisingly, I saw nothing on this in GTK+'s bugzilla, so here's one for any
further reference: http://bugzilla.gnome.org/show_bug.cgi?id=330318.
Comment 8 Brian J. Tarricone (not reading bugmail) 2007-01-26 18:58:41 CET
Moving all bugs to new Orage product.

Bug #1237

Reported by:
Andrew Conkling
Reported on: 2005-11-20
Last modified on: 2007-01-26

People

Assignee:
korbinus
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information