[1/1] Remove redundant data for niu_NZ

Message ID 1504000369-6587-1-git-send-email-akhilesh.k@samsung.com
State Committed
Delegated to: Mike Fabian
Headers

Commit Message

Akhilesh Kumar Aug. 29, 2017, 9:52 a.m. UTC
  Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ.

[BZ #22023]
	* locales/niu_NZ (LC_TIME)     : copy "niu_NU"
	* locales/niu_NZ (LC_MESSAGES) : copy "niu_NU"

---
 localedata/locales/niu_NZ |   80 +-------------------------------------------
 1 files changed, 2 insertions(+), 78 deletions(-)
  

Comments

Mike FABIAN Aug. 29, 2017, 12:39 p.m. UTC | #1
Akhilesh Kumar <akhilesh.k@samsung.com> wrote:

> Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ.
>
> [BZ #22023]
> 	* locales/niu_NZ (LC_TIME)     : copy "niu_NU"
> 	* locales/niu_NZ (LC_MESSAGES) : copy "niu_NU"
>

[...]

> -
> -week 7;19971130;1
> +copy "niu_NU"
>  END LC_TIME

niu_NU contains:

week 7;19971130;1
first_weekday 2

Is “first_weekday 2” appropriate for NZ?

Is it even right for NU? Isn’t this a contradiction to
“week 7;19971130;1”?

https://sourceware.org/glibc/wiki/Locales#LC_TIME says:

> week DAYSINWEEK;WEEKSTARTDATE;MINWEEKLEN - DAYSINWEEK is usually 7;
> MINWEEKLEN is the minimal length of the first week in year (usually
> 4). WEEKSTARTDATE is most confusing - it should be some date that
> corresponds to the beginning of a week. It is typically either 19971130
> (Sunday) or 19971201 (Monday), the former being used almost by all glibc
> locales (see below).
> 
> first_weekday N - number of day in the week to be shown in the first
> column of a calendar. Defaults to 1.
  
Akhilesh Kumar Aug. 30, 2017, 4:12 a.m. UTC | #2
> > -week 7;19971130;1
>> +copy "niu_NU"
> >  END LC_TIME
> 
> niu_NU contains:
>
week 7;19971130;1
> first_weekday 2
>
> Is “first_weekday 2” appropriate for NZ?

  
  yes  
  https://www.timeanddate.com/calendar/?country=30
  
> Is it even right for NU? Isn’t this a contradiction to

>“week 7;19971130;1”?


  Looks "week" needs to change 
  http://www.niueisland.com/calendar/?view=calendar&month=August-2017
  
> https://sourceware.org/glibc/wiki/Locales#LC_TIME says:

>

> > week DAYSINWEEK;WEEKSTARTDATE;MINWEEKLEN - DAYSINWEEK is usually 7;

> > MINWEEKLEN is the minimal length of the first week in year (usually

> > 4). WEEKSTARTDATE is most confusing - it should be some date that

>> corresponds to the beginning of a week. It is typically either 19971130

> (Sunday) or 19971201 (Monday), the former being used almost by all glibc

> locales (see below).

> 

> first_weekday N - number of day in the week to be shown in the first

> column of a calendar. Defaults to 1.
  
Mike FABIAN Aug. 30, 2017, 10:51 a.m. UTC | #3
AKHILESH KUMAR <akhilesh.k@samsung.com> wrote:

>> > -week 7;19971130;1
>>> +copy "niu_NU"
>> >  END LC_TIME
>> 
>> niu_NU contains:
>>
> week 7;19971130;1
>> first_weekday 2
>>
>> Is “first_weekday 2” appropriate for NZ?
>   
>   yes  
>   https://www.timeanddate.com/calendar/?country=30
>   
>> Is it even right for NU? Isn’t this a contradiction to
>>“week 7;19971130;1”?
> 
>   Looks "week" needs to change 
>   http://www.niueisland.com/calendar/?view=calendar&month=August-2017
>   
>> https://sourceware.org/glibc/wiki/Locales#LC_TIME says:
>>
>> > week DAYSINWEEK;WEEKSTARTDATE;MINWEEKLEN - DAYSINWEEK is usually 7;
>> > MINWEEKLEN is the minimal length of the first week in year (usually
>> > 4). WEEKSTARTDATE is most confusing - it should be some date that
>>> corresponds to the beginning of a week. It is typically either 19971130
>> (Sunday) or 19971201 (Monday), the former being used almost by all glibc
>> locales (see below).
>> 
>> first_weekday N - number of day in the week to be shown in the first
>> column of a calendar. Defaults to 1.

I missed the documentation just below the paragraph I quoted from 

>     https://sourceware.org/glibc/wiki/Locales#LC_TIME
> 
>     The tricky thing is how to reconcile information from WEEKSTARTDATE
>     and first_weekday. PetrBaudis wrote some lenghty treatises about this on
>     libc-locales; we present the outcome and thus our de facto current
>     interpretation:
> 
>     WEEKSTARTDATE specifies the base of the abday and day lists
> 
>     first_weekday specifies the offset of the first day-of-week in the abday and day lists
> 
>     For compatibility reasons, all locales should set WEEKSTARTDATE on
>     19971130 (Sunday) and base the abday and day lists appropriately,
>     and set first_weekday 1 or 2 depending to whether their week
>     actually starts on Sunday or Monday.
> 
>     Thus, for example en_GB definition (English locale with week starting on Monday) is:
> 
>       week          7;19971130;4
>       first_weekday 2
>       first_workday 2
>       day           "Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
>       abday         "Sun;Mon;Tue;Wed;Thu;Fri;Sat"

So it is correct to use 19971130 in “week” *always*. And all our
locales currently do that.
  
Mike FABIAN Aug. 30, 2017, 11:07 a.m. UTC | #4
AKHILESH KUMAR <akhilesh.k@samsung.com> wrote:

>> Is “first_weekday 2” appropriate for NZ?
>   
>   yes  
>   https://www.timeanddate.com/calendar/?country=30

That does not seem to be a good reference.

For example, for most Arabic countries we have in 7 (Saturday) as the
first_weekday in glibc:

localedata/locales/ar_AE:first_weekday 7
localedata/locales/ar_BH:first_weekday 7
localedata/locales/ar_DZ:first_weekday 7
localedata/locales/ar_EG:first_weekday 7
localedata/locales/ar_IQ:first_weekday 7
localedata/locales/ar_JO:first_weekday 7
localedata/locales/ar_KW:first_weekday 7
localedata/locales/ar_LB:first_weekday 2
localedata/locales/ar_LY:first_weekday 7
localedata/locales/ar_MA:first_weekday 7
localedata/locales/ar_OM:first_weekday 7
localedata/locales/ar_QA:first_weekday 7
localedata/locales/ar_SD:first_weekday 7
localedata/locales/ar_SS:first_weekday 2
localedata/locales/ar_SY:first_weekday 7

But the URL you gave doesn’t confirm that, for example:

https://www.timeanddate.com/calendar/?year=2017&country=66
  
Mike FABIAN Aug. 30, 2017, 11:26 a.m. UTC | #5
Mike FABIAN <mfabian@redhat.com> wrote:

> Akhilesh Kumar <akhilesh.k@samsung.com> wrote:
>
>> Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ.
>>
>> [BZ #22023]
>> 	* locales/niu_NZ (LC_TIME)     : copy "niu_NU"
>> 	* locales/niu_NZ (LC_MESSAGES) : copy "niu_NU"
>>
>
> [...]
>
>> -
>> -week 7;19971130;1
>> +copy "niu_NU"
>>  END LC_TIME
>
> niu_NU contains:
>
> week 7;19971130;1
> first_weekday 2
>
> Is “first_weekday 2” appropriate for NZ?

common/supplemental/supplementalData.xml in CLDR lists NZ among the
territories with Sunday as the first day of the week:

          <firstDay day="sun"  territories="
			AG AR AS AU
			BR BS BT BW BZ
			CA CN CO
			DM DO
			ET
			GT GU
			HK HN
			ID IE IL IN
			JM JP
			KE KH KR
			LA
			MH MM MO MT MX MZ
			NI NP NZ
			PA PE PH PK PR PY
			SA SG SV
			TH TN TT TW
			UM US
			VE VI
			WS
			YE
			ZA ZW"
          />

It does not list NU at all. So if it is true that first_weekday
should be 2 (Monday) for NU and 1 (Sunday) for NZ, then
we cannot use copy "niu_NU".
  
Akhilesh Kumar Sept. 14, 2017, 3:13 a.m. UTC | #6
> >common/supplemental/supplementalData.xml in CLDR lists NZ among the
> territories with Sunday as the first day of the week:
>  
>           <firstDay day="sun"  territories="
>                         AG AR AS AU
>                         BR BS BT BW BZ
>                         CA CN CO
>                         DM DO
>                         ET
>                         GT GU
>                         HK HN
>                         ID IE IL IN
>                         JM JP
>                         KE KH KR
>                         LA
>                         MH MM MO MT MX MZ
>                         NI NP NZ
>                         PA PE PH PK PR PY
>                         SA SG SV
>                         TH TN TT TW
>                         UM US
>                         VE VI
>                         WS
>                         YE
>                         ZA ZW"
>           />
>  
> It does not list NU at all. So if it is true that first_weekday
> should be 2 (Monday) for NU and 1 (Sunday) for NZ, then
> we cannot use copy "niu_NU".
> 

As per my discussion with CLDR community first_weekday is monday for NZ and NU also 
for more detail we can refer below tickle url 

http://unicode.org/cldr/trac/ticket/10606
  
Mike FABIAN Sept. 14, 2017, 12:03 p.m. UTC | #7
AKHILESH KUMAR <akhilesh.k@samsung.com> wrote:

>> >common/supplemental/supplementalData.xml in CLDR lists NZ among the
>> territories with Sunday as the first day of the week:
>>  
>>           <firstDay day="sun"  territories="
>>                         AG AR AS AU
>>                         BR BS BT BW BZ
>>                         CA CN CO
>>                         DM DO
>>                         ET
>>                         GT GU
>>                         HK HN
>>                         ID IE IL IN
>>                         JM JP
>>                         KE KH KR
>>                         LA
>>                         MH MM MO MT MX MZ
>>                         NI NP NZ
>>                         PA PE PH PK PR PY
>>                         SA SG SV
>>                         TH TN TT TW
>>                         UM US
>>                         VE VI
>>                         WS
>>                         YE
>>                         ZA ZW"
>>           />
>>  
>> It does not list NU at all. So if it is true that first_weekday
>> should be 2 (Monday) for NU and 1 (Sunday) for NZ, then
>> we cannot use copy "niu_NU".
>> 
>
> As per my discussion with CLDR community first_weekday is monday for NZ and NU also 
> for more detail we can refer below tickle url 
>
> http://unicode.org/cldr/trac/ticket/10606

Nice! Committed.
  

Patch

diff --git a/localedata/locales/niu_NZ b/localedata/locales/niu_NZ
index 6bf7c2c..e9f106b 100644
--- a/localedata/locales/niu_NZ
+++ b/localedata/locales/niu_NZ
@@ -65,80 +65,8 @@  LC_COLLATE
 copy "iso14651_t1"
 END LC_COLLATE
 
-
 LC_TIME
-
-% Ianuali, Fepuali, Masi, Apelila, Me, Iuni, Iulai, Aokuso, Sepetema,
-% Oketopa, Novema, Tesemo
-mon           "<U0049><U0061><U006E><U0075><U0061><U006C><U0069>";/
-     "<U0046><U0065><U0070><U0075><U0061><U006C><U0069>";/
-     "<U004D><U0061><U0073><U0069>";/
-     "<U0041><U0070><U0065><U006C><U0069><U006C><U0061>";/
-     "<U004D><U0065>";/
-     "<U0049><U0075><U006E><U0069>";/
-     "<U0049><U0075><U006C><U0061><U0069>";/
-     "<U0041><U006F><U006B><U0075><U0073><U006F>";/
-     "<U0053><U0065><U0070><U0065><U0074><U0065><U006D><U0061>";/
-     "<U004F><U006B><U0065><U0074><U006F><U0070><U0061>";/
-     "<U004E><U006F><U0076><U0065><U006D><U0061>";/
-     "<U0054><U0065><U0073><U0065><U006D><U006F>"
-
-% Ian, Fep, Mas, Ape, Me, Iun, Iul, Aok, Sep, Oke, Nov, Tes
-abmon         "<U0049><U0061><U006E>";/
-       "<U0046><U0065><U0070>";/
-       "<U004D><U0061><U0073>";/
-       "<U0041><U0070><U0065>";/
-       "<U004D><U0065>";/
-       "<U0049><U0075><U006E>";/
-       "<U0049><U0075><U006C>";/
-       "<U0041><U006F><U006B>";/
-       "<U0053><U0065><U0070>";/
-       "<U004F><U006B><U0065>";/
-       "<U004E><U006F><U0076>";/
-       "<U0054><U0065><U0073>"
-
-% Aho Tapu, Aho Gofua, Aho Ua, Aho Lotu, Aho Tuloto, Aho Falaile, Aho Faiumu
-day           "<U0041><U0068><U006F><U0020><U0054><U0061><U0070><U0075>";/
-     "<U0041><U0068><U006F><U0020><U0047><U006F><U0066><U0075><U0061>";/
-     "<U0041><U0068><U006F><U0020><U0055><U0061>";/
-     "<U0041><U0068><U006F><U0020><U004C><U006F><U0074><U0075>";/
-     "<U0041><U0068><U006F><U0020><U0054><U0075><U006C><U006F><U0074><U006F>";/
-     "<U0041><U0068><U006F><U0020><U0046><U0061><U006C><U0061><U0069><U006C><U0065>";/
-     "<U0041><U0068><U006F><U0020><U0046><U0061><U0069><U0075><U006D><U0075>"
-
-% Tapu, Gofua, Ua, Lotu, Tuloto, Falaile, Faiumu
-abday         "<U0054><U0061><U0070><U0075>";/
-       "<U0047><U006F><U0066><U0075><U0061>";/
-       "<U0055><U0061>";/
-       "<U004C><U006F><U0074><U0075>";/
-       "<U0054><U0075><U006C><U006F><U0074><U006F>";/
-       "<U0046><U0061><U006C><U0061><U0069><U006C><U0065>";/
-       "<U0046><U0061><U0069><U0075><U006D><U0075>"
-
-% Abbreviated date and time representation to be referenced by the "%c" field descriptor -
-%
-% "%a" (short weekday name),
-% "%d" (day of month as a decimal number),
-% "%b" (short month name),
-% "%Y" (year with century as a decimal number),
-% "%T" (24-hour clock time in format HH:MM:SS),
-% "%Z" (Time zone name)
-% %a %d %b %Y %T %Z
-d_t_fmt       "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
-
-% Date representation to be referenced by the "%x" field descriptor -
-% "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000).
-d_fmt         "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
-
-% Time representation to be referenced by the "%X" field descriptor -
-% "%T" (24-hour clock time in format HH:MM:SS)
-t_fmt         "<U0025><U0054>"
-
-am_pm       "<U0041><U004D>";"<U0050><U004D>"
-t_fmt_ampm  "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
-<U0025><U0070>"
-
-week 7;19971130;1
+copy "niu_NU"
 END LC_TIME
 
 LC_NUMERIC
@@ -158,13 +86,9 @@  copy "en_NZ"
 END LC_MEASUREMENT
 
 LC_MESSAGES
-yesexpr "<U005E><U005B><U002B><U0031><U0113><U0112><U0079><U0059><U005D>"
-noexpr  "<U005E><U005B><U002D><U0030><U006E><U004E><U005D>"
-yesstr  "<U0054><U0061><U006C><U0069><U0061>"
-nostr   "<U004E><U0061><U006B><U0061><U0069>"
+copy "niu_NU"
 END LC_MESSAGES
 
-
 LC_NAME
 copy "en_NZ"
 END LC_NAME