-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Add support for glibc supported locales #64278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Proposed patch adds to locale alias table the mappings for locales supported in recent glibc (v 2.18). It also modifies the makelocalealias.py script so that it parses the SUPPORTED file from glibc sources and supports command line options for source paths. |
Totally added 100 new mappings. |
Thanks, Serhiy. The patch looks good, except for one nit: the makelocalealias.py normaly also generates a list of changes and these are put at the top of the locale_alias dictionary. Could you add that as well ? |
The makelocalealias.py generates only a list of removes and updates, not additions. I recommend first apply bpo-20076, it will eliminate most additions. |
On 01.10.2014 09:52, Serhiy Storchaka wrote:
Ah, ok.
Agreed. Please apply both patches. Thanks,Marc-Andre Lemburg |
New changeset 810542d07b4e by Serhiy Storchaka in branch 'default': New changeset 00e4190b308f by Serhiy Storchaka in branch '3.4': New changeset 3bc5edbbadae by Serhiy Storchaka in branch '2.7': |
Thank you for your review Marc-Andre. See also related bpo-20087. |
New changeset 5502a82fb103 by Serhiy Storchaka in branch 'default': New changeset 4a19ce6c6e0c by Serhiy Storchaka in branch '2.7': New changeset e9aaefa3f2eb by Serhiy Storchaka in branch '3.4': New changeset 994a694ab71c by Serhiy Storchaka in branch 'default': |
A lot of buildbot failed. Example: ====================================================================== Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py", line 428, in test_valencia_modifier
self.check('ca_ES@valencia', 'ca_ES.ISO8859-1@valencia')
File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py", line 370, in check
self.assertEqual(locale.normalize(localename), expected, msg=localename)
AssertionError: 'ca_ES.ISO8859-15@valencia' != 'ca_ES.ISO8859-1@valencia'
- ca_ES.ISO8859-15@valencia
? -
+ ca_ES.ISO8859-1@valencia
: ca_ES@valencia |
On 02.10.2014 10:24, STINNER Victor wrote:
> Traceback (most recent call last):
> File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py", line 428, in test_valencia_modifier
> self.check('ca_ES@valencia', 'ca_ES.ISO8859-1@valencia')
> File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_locale.py", line 370, in check
> self.assertEqual(locale.normalize(localename), expected, msg=localename)
> AssertionError: 'ca_ES.ISO8859-15@valencia' != 'ca_ES.ISO8859-1@valencia'
> - ca_ES.ISO8859-15@valencia
> ? -
> + ca_ES.ISO8859-1@valencia
> : ca_ES@valencia I guess the test have to be adjusted as well :-) What I don't understand is why the above case failed. That mapping |
New changeset 7ce459fc57b9 by Serhiy Storchaka in branch '2.7': New changeset 8c5555dea138 by Serhiy Storchaka in branch '3.4': New changeset 433048fd4206 by Serhiy Storchaka in branch 'default': |
On 02.10.2014 10:38, Marc-Andre Lemburg wrote:
Ah, the change is in the second patch round you applied, which Reviewing that, I think this change need to be documented
|
Oh, sorry. I should be more careful. Test failed due to mismatch between glibc and X11 locale.alias (bpo-20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc SUPPORTED file and was added in the last commit (due to mismatch with ca_ES). |
The 'kk_kz' was added just, in the first commit of this issue (which was based on glibc 2.18 data). No changes to previous Python versions, only addition. |
Hmm, no, both aliases are from glibc SUPPORTED file: ca_ES.UTF-8 UTF-8 |
On 02.10.2014 11:13, Serhiy Storchaka wrote:
See the comment in Since it's a new locale, they simply used the Latin-1 version with Euro |
I think there is nothing more to do here and the issue can be closed. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: