Attached patch adds the 'week' keyword to some locales which do not have it yet. It is based on translations of Gtk+ calendar (the old way of determining week start in Gtk+ calendar). It needs some review, I can only test whether the calendar works the same way with old Gtk+ (not using glibc localedata for week starts) and new Gtk+ (using glibc localedata for week starts). See also: https://bugzilla.novell.com/show_bug.cgi?id=104417 https://bugzilla.novell.com/show_bug.cgi?id=130787 http://bugzilla.gnome.org/show_bug.cgi?id=314473
Created attachment 891 [details] glibc-2.3.90-locale-weekstart.diff
I was looking at bug 181 last week and it is related in that it deals with first_weekday and first_workday. Is "week" something that has been standardized? what do the three numeric fields mean in "week 7;19971130;7"? Your change affects a lot of localdata files but what about the C code which relies on them? I see locale/categories.def and locale/programs/ld-time.c refer to first_weekday and first_workday. Should these be changed as well?
Code is OK. The problem is, that current localedata seems to be buggy and contain nonsenses (see referenced bug reports). The buggy behavior has never been experience before, because no package was using it (except locale binary). (Michal verified all packages of SuSE Linux 10.1.) But now gtk2 started to use it (gtk calendar in gtk+-2.8.x and later; util-linux has the related cal code commented out) and gtk calendar shows nonsenses in many locales. The numbers has following meaning: how many days has a week ; when week system started ; how many days must have first week in the year
Related for hu_HU locale: bug 1429
Other informations are also available at https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=80212 Anyway locale writers are still in the dark because it is unclear whether GNU libc is going to follow this ISO 14652 technical report or not. In Debian, only first_weekday is taken into account, the week keyword is ignored for now until GTK is fixed. Michal, you may have a look at http://svn.debian.org/wsvn/pkg-glibc/glibc-package/trunk/debian/patches/localedata/first_weekday.diff?op=file our patch differs from yours for many locales. One reason may be that your patch is derived from a PO file and is thus language-based whereas this feature is really country-based, consider fr_CA for instance.
I added a couple of changes to cvs but only those which we think we know are right. I'm not going to apply a general patch like any of those proposed. I require need buy-in from the locale author. If there are none listed of if contacting them fails find some piece of evidence only to support the change. What I don't want is changing something just to later get complaints that the change is bad.
OK. But current week start data are broken for sure, too. Please let me know, whether glibc will plan to use "week_start" or ISO 14652 "week" lines. I will try to contact translators and ask them for confirmation (actually I have more issues to collect from them - preferred setup of LANGUAGE variable, missing transliteration support in locales,...). --- We searched over all our distribution, and it seems, that no package actually uses it: util-linux's cal has this part commented out (because it gave bad results), upstream gtk+ uses glibc week start, but most distributions patch gtk+ to not use these data (and use po filess fallbacks) or patch glibc to fix these data (because they got complains). Our based on gtk+ fallbacks in po files are better (and provided by native speakers), but still not correct, because they are language based, not language+country based. I am not sure, what is the source of Debian patch, but we can start by comparing them.
Subject: Re: [PATCH] week-ndays;week-1stday;week-1stweek data for some locales On Tue, Apr 11, 2006 at 09:38:49AM -0000, sbrabec at suse dot cz wrote: > > ------- Additional Comments From sbrabec at suse dot cz 2006-04-11 09:38 ------- > OK. But current week start data are broken for sure, too. > > Please let me know, whether glibc will plan to use "week_start" or ISO 14652 > "week" lines. I will try to contact translators and ask them for confirmation > (actually I have more issues to collect from them - preferred setup of LANGUAGE > variable, missing transliteration support in locales,...). I am also interested in tidying up the data. If I can be of help, please contact me. > --- > > We searched over all our distribution, and it seems, that no package actually > uses it: util-linux's cal has this part commented out (because it gave bad > results), upstream gtk+ uses glibc week start, but most distributions patch gtk+ > to not use these data (and use po filess fallbacks) or patch glibc to fix these > data (because they got complains). > > Our based on gtk+ fallbacks in po files are better (and provided by native > speakers), but still not correct, because they are language based, not > language+country based. I am not sure, what is the source of Debian patch, but > we can start by comparing them. The way forward I think is to have the data in good shape, then the sw can begin to use it. best regards keld
I'm closing this bug. Lots of locales have been changed. Grab bag bugs like this one are not helpful since every locale must be treated separately. If you thinkg there are still problems left open new and *separate* bugs for each locale.