localedata: Reorganize Unicode LC_CTYPE inclusion.

Message ID 1250060640.226563.1509407507776@poczta.nazwa.pl
State Committed
Headers

Commit Message

Rafal Luzynski Oct. 30, 2017, 11:51 p.m. UTC
  27.10.2017 18:02 Carlos O'Donell <carlos@redhat.com> wrote:
> [...]
> As subsystem maintainer for localedata you do not need review. You can assume
> consensus and fix the file directly.
>
> You are correct that the category lines are in error, they should be removed,
> I didn't notice them in my final regeneration.
>
> However! The category line generated by
> localedata/unicode-gen/gen_unicode_ctype.py
> is also wrong.

So this time it was worth to wait for your review.

> It is a static 'unicode:2014', and this is invalid.
>
> ISO 30112 standard defines the valid values for the category.
>
> There are only 4 valid values:
> "i18n:2012"
> "i18n:2004"
> "posix:1993"
> and they state the conformance of the category itself.
>
> Next step:
>
> * Remove the category entries in i18n_ctype except for LC_CTYPE.
> * Adjust the category entry for LC_CTYPE to use "i18n:2012"
> * Adjust gen_unicode_ctype.py to output "i18n:2012" instead of the invalid
> "unicode:2014"

Done.

> We should make localedef validate the conformance of this value, but that's
> another patch.

OK, indeed it's another patch so I did not implement this.

> I will assume you will make the changes unless you hand them off to me.

Please see the attachment.

Regards,

Rafal
  

Comments

Mike FABIAN Oct. 31, 2017, 7:33 a.m. UTC | #1
Rafal Luzynski <digitalfreak@lingonborough.com> さんはかきました:

>> We should make localedef validate the conformance of this value, but that's
>> another patch.
>
> OK, indeed it's another patch so I did not implement this.
>
>> I will assume you will make the changes unless you hand them off to me.
>
> Please see the attachment.

Looks good, thank you!
  
Carlos O'Donell Oct. 31, 2017, 9:54 p.m. UTC | #2
On 10/30/2017 04:51 PM, Rafal Luzynski wrote:
> 27.10.2017 18:02 Carlos O'Donell <carlos@redhat.com> wrote:
>> [...]
>> As subsystem maintainer for localedata you do not need review. You can assume
>> consensus and fix the file directly.
>>
>> You are correct that the category lines are in error, they should be removed,
>> I didn't notice them in my final regeneration.
>>
>> However! The category line generated by
>> localedata/unicode-gen/gen_unicode_ctype.py
>> is also wrong.
> 
> So this time it was worth to wait for your review.

We are in development mode, and so incremental progress towards fixing
these issues is acceptable. I would have been just as happy with two
commits. My goal is to make your day-to-day volunteers hours as
productive as possible, and if you can commit your incremental change,
that has value to everyone else also.

>> It is a static 'unicode:2014', and this is invalid.
>>
>> ISO 30112 standard defines the valid values for the category.
>>
>> There are only 4 valid values:
>> "i18n:2012"
>> "i18n:2004"
>> "posix:1993"
>> and they state the conformance of the category itself.
>>
>> Next step:
>>
>> * Remove the category entries in i18n_ctype except for LC_CTYPE.
>> * Adjust the category entry for LC_CTYPE to use "i18n:2012"
>> * Adjust gen_unicode_ctype.py to output "i18n:2012" instead of the invalid
>> "unicode:2014"
> 
> Done.
> 
>> We should make localedef validate the conformance of this value, but that's
>> another patch.
> 
> OK, indeed it's another patch so I did not implement this.
> 
>> I will assume you will make the changes unless you hand them off to me.
> 
> Please see the attachment.

LGTM.

For ChangeLog would just say:

	* localedata/unicode-gen/gen_unicode_ctype.py (output_head):
	category of LC_CTYPE set to "i18n:2012".
	* localedata/locales/i18n_ctype: Regenerate.

Note: "category" on line 2 need not line up with "localedata", and
      for a regenerated file we just say "Regenerate."
  
Rafal Luzynski Oct. 31, 2017, 10:11 p.m. UTC | #3
31.10.2017 22:54 Carlos O'Donell <carlos@redhat.com> wrote:
>
> [...]
> LGTM.
>
> For ChangeLog would just say:
>
> * localedata/unicode-gen/gen_unicode_ctype.py (output_head):
> category of LC_CTYPE set to "i18n:2012".
> * localedata/locales/i18n_ctype: Regenerate.
>
> Note: "category" on line 2 need not line up with "localedata", and
> for a regenerated file we just say "Regenerate."

Thank you, Carlos, and thank you, Mike. [1] Should I add
"Reviewed-by: Carlos O'Donell" and/or "Reviewed-by: Mike Fabian"
to the commit message?

Regards,

Rafal


[1] https://sourceware.org/ml/libc-alpha/2017-10/msg01378.html
  
Carlos O'Donell Oct. 31, 2017, 10:31 p.m. UTC | #4
On 10/31/2017 03:11 PM, Rafal Luzynski wrote:
> 31.10.2017 22:54 Carlos O'Donell <carlos@redhat.com> wrote:
>>
>> [...]
>> LGTM.
>>
>> For ChangeLog would just say:
>>
>> * localedata/unicode-gen/gen_unicode_ctype.py (output_head):
>> category of LC_CTYPE set to "i18n:2012".
>> * localedata/locales/i18n_ctype: Regenerate.
>>
>> Note: "category" on line 2 need not line up with "localedata", and
>> for a regenerated file we just say "Regenerate."
> 
> Thank you, Carlos, and thank you, Mike. [1] Should I add
> "Reviewed-by: Carlos O'Donell" and/or "Reviewed-by: Mike Fabian"
> to the commit message?

You should not add it unless given.

I'll give mine here :-)

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
  
Rafal Luzynski Oct. 31, 2017, 10:59 p.m. UTC | #5
31.10.2017 23:31 Carlos O'Donell <carlos@redhat.com> wrote:
>
>
> On 10/31/2017 03:11 PM, Rafal Luzynski wrote:
> > 31.10.2017 22:54 Carlos O'Donell <carlos@redhat.com> wrote:
> >>
> >> [...]
> >> LGTM.
> >>
> >> For ChangeLog would just say:
> >>
> >> * localedata/unicode-gen/gen_unicode_ctype.py (output_head):
> >> category of LC_CTYPE set to "i18n:2012".
> >> * localedata/locales/i18n_ctype: Regenerate.
> >>
> >> Note: "category" on line 2 need not line up with "localedata", and
> >> for a regenerated file we just say "Regenerate."
> >
> > Thank you, Carlos, and thank you, Mike. [1] Should I add
> > "Reviewed-by: Carlos O'Donell" and/or "Reviewed-by: Mike Fabian"
> > to the commit message?
>
> You should not add it unless given.
>
> I'll give mine here :-)
>
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
>
> --
> Cheers,
> Carlos.

Committed.  Thank you everybody for your support.

Regards,

Rafal
  

Patch

From cf2866a2121e3f304d515dcf880ce66390d56101 Mon Sep 17 00:00:00 2001
From: Rafal Luzynski <digitalfreak@lingonborough.com>
Date: Thu, 26 Oct 2017 22:12:23 +0200
Subject: [PATCH] localedata: Once again correct and regenerate i18n_ctype.

Following the previous work by Carlos O'Donell the category of LC_CTYPE
is correctly set to "i18n:2012" rather than "unicode:2014" and the
i18n_ctype file is once again regenerated from scratch to make sure it
does not contain any manual additions except the copyright message.

	* localedata/unicode-gen/gen_unicode_ctype.py (output_head):
	  category of LC_CTYPE set to "i18n:2012".
	* localedata/locales/i18n_ctype: Regenerated from scratch
	  reflecting the change above.
---
 localedata/locales/i18n_ctype               | 16 ++--------------
 localedata/unicode-gen/gen_unicode_ctype.py |  2 +-
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/localedata/locales/i18n_ctype b/localedata/locales/i18n_ctype
index b965563..f1bf72e 100644
--- a/localedata/locales/i18n_ctype
+++ b/localedata/locales/i18n_ctype
@@ -26,20 +26,8 @@  fax       ""
 language  ""
 territory "Earth"
 revision  "10.0.0"
-date      "2017-10-23"
-category  "unicode:2014";LC_CTYPE
-
-category "i18n:2012";LC_IDENTIFICATION
-category "i18n:2012";LC_CTYPE
-category "i18n:2012";LC_COLLATE
-category "i18n:2012";LC_TIME
-category "i18n:2012";LC_NUMERIC
-category "i18n:2012";LC_MONETARY
-category "i18n:2012";LC_MESSAGES
-category "i18n:2012";LC_PAPER
-category "i18n:2012";LC_NAME
-category "i18n:2012";LC_ADDRESS
-category "i18n:2012";LC_TELEPHONE
+date      "2017-10-30"
+category  "i18n:2012";LC_CTYPE
 END LC_IDENTIFICATION
 
 LC_CTYPE
diff --git a/localedata/unicode-gen/gen_unicode_ctype.py b/localedata/unicode-gen/gen_unicode_ctype.py
index 38b4aab..a2d1684 100755
--- a/localedata/unicode-gen/gen_unicode_ctype.py
+++ b/localedata/unicode-gen/gen_unicode_ctype.py
@@ -182,7 +182,7 @@  def output_head(i18n_file, unicode_version, head=''):
         i18n_file.write('revision  "{:s}"\n'.format(unicode_version))
         i18n_file.write('date      "{:s}"\n'.format(
             time.strftime('%Y-%m-%d')))
-        i18n_file.write('category  "unicode:2014";LC_CTYPE\n')
+        i18n_file.write('category  "i18n:2012";LC_CTYPE\n')
         i18n_file.write('END LC_IDENTIFICATION\n')
         i18n_file.write('\n')
         i18n_file.write('LC_CTYPE\n')
-- 
2.7.5