[Hardy] First weekday set incorrect in gnome-calendar

Bug #229757 reported by noddeat
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
belocs-locales-data (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Dapper by Andriy Korchak
Nominated for Hardy by noddeat
Nominated for Intrepid by noddeat
Nominated for Jaunty by noddeat
Nominated for Karmic by Andriy Korchak

Bug Description

In Ubuntu Hardy gnome-calendar displays Tuesday as the first weekday in uk_UA locale. In Ukraine and neighbouring regions where Ukrainian is spoken, Monday is the first day of the week.

I propose the developers to set the values of first_weekday and first_workday to 1 in /usr/share/i18n/locales/uk_UA

first_weekday 1
first_workday 1

Then gnome-calendar will display the first weekday correctly.

If you are uk_UA locale user, you may manually edit /usr/share/i18n/locales/uk_UA and then run under root:
$locale-gen
$killall gnome-panel

The solution was taken from here: http://soniahamilton.wordpress.com/2008/02/06/change-first-day-of-week-in-ubuntus-gnome-calendar/

noddeat (noddeat)
Changed in gnome-panel:
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

that's a locales issue

Revision history for this message
Vassily Gavrilyak (gavrilyak) wrote :

Applying the proposed fix will make gnome calendar behave correctly, but cal will start from Sunday, not Monday as is should.

$ cal
    жовтень 2008
нд пн вт ср чт пт сб
          1 2 3 4
 5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

BTW, ru_RU locale has
first_weekday 2
first_workday 2

and it behaves correctly both in gnome and in cal

Revision history for this message
Volodymyr M. Lisivka (vlisivka-gmail) wrote :

I am author of current Ukrainian locale. The problem with "cal" is described in it code. Cal is written in 2001 and not supported after that. Here is the comment from the source code:

---------------------------------------------------------------------------------------------------------------
#if 0 /* setting week1stday is against man page */
/*
 * What *is* the first day of the week? Note that glibc does not
 * provide any information today, it (almost) always answers Monday.
 * Sunday is the Jewish and Christian tradition.
 * Sometimes an answer is built into the language:
 * German calls Wednesday "Mittwoch", so starts at Sunday.
 * Portuguese calls Monday "segunda-feira", so starts at Sunday.
 * Russian calls Friday "pyatnitsa", so starts at Monday.
 * ISO 8601 decided to start at Monday.
 *
 * The traditional Unix cal utility starts at Sunday.
 * We start at Sunday and have an option -m for starting at Monday.
 *
 * At some future time this may become -s for Sunday, -m for Monday,
 * no option for glibc-determined locale-dependent version.
 */
#ifdef HAVE_LANGINFO_H
        week1stday = (int)(nl_langinfo(_NL_TIME_FIRST_WEEKDAY))[0];
#endif
#endif
---------------------------------------------------------------------------------------------------------------

If you will uncomment this code, then cal will behave properly:

---------------------------------------------------------------------------------------------------------------
-(~/rpmbuild/SPECS:$)-> cat ~/rpmbuild/SOURCES/util-linux-ng-2.13-week1stday.patch
diff -rub util-linux-ng-2.13.1.orig/misc-utils/cal.c util-linux-ng-2.13.1/misc-utils/cal.c
--- util-linux-ng-2.13.1.orig/misc-utils/cal.c 2008-01-16 11:31:41.000000000 +0200
+++ util-linux-ng-2.13.1/misc-utils/cal.c 2008-05-14 14:46:08.000000000 +0300
@@ -285,7 +285,7 @@
  }
 #endif

-#if 0 /* setting week1stday is against man page */
+#if 1 /* setting week1stday is against man page */
 /*
  * What *is* the first day of the week? Note that glibc does not
  * provide any information today, it (almost) always answers Monday.

-(~/rpmbuild/SPECS:$)-> cal
    травень 2008
пн вт ср чт пт сб нд
     1 2 3 4
 5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

---------------------------------------------------------------------------------------------------------------

Please, do not use this outdated command to make any decisions about Ukrainian locale.

If somebody has questions or proposals about current Ukrainian locale, call me by email, or start discussion on linux.org.ua site first.

See also http://linux.org.ua/cgi-bin/yabb/YaBB.pl?num=1210279358 .

PLEASE, revert the change to Ukrainian locale, change first_weekday and
first_workday to 1. I do not want receive bug reports from Ubuntu users anymore (I am Fedora user).

Revision history for this message
noddeat (noddeat) wrote :

I've nominated a fix for release. I was told, that the bug is still there in 8.10 which is very bad. Why don't just apply a fix and forget?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.