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
Add es_cu to locale aliases #60759
Comments
Python 2.7 is in bugfix-only mode. |
Could you expand on the feature request? The Python locale module delegates to the operating system’s locale system; to the best of my knowledge there is no registry of locale names at the Python level. |
In the file locale.py there is a var locale_alias that map the locale names, es_cu isn't there. |
Ah, ok. Sounds good to me. (I think this can go in stable branches, like other update to registries (e.g. mimetypes), but other core devs may disagree.) |
LGTM. |
Thanks for the review, Éric. Do you have time to commit the patch? |
I have a busy week-end ahead but I could sneak a little time for this. |
Benjamin, does this have to wait for 2.7.5? |
Is there some sort of reference for these aliases? Where do they come from? |
They come from the X.org project. See comments in http://hg.python.org/cpython/file/default/Lib/locale.py#l601 I had forgotten there was a makelocalealias.py script; maybe we could run it instead of adding an entry manually. |
Yes, please. See what makelocalealias.py does. |
Éric Araujo wrote:
Hi Eric, let me know if you need help with the script. |
The es_CU locale has been added to GNU libc (in version 2.15)[1], but See for more information: |
On Debian testing, I get a few changes that look like fixes but not es_CU yet: @@ -807,0 +818,1 @@ locale_alias = {
+ 'bokm\xef\xbf\xbd': 'nb_NO.ISO8859-1',
@@ -822,0 +834,1 @@ locale_alias = {
+ 'c.ascii': 'C',
@@ -936,0 +949,3 @@ locale_alias = {
+ 'en_dk': 'en_DK.ISO8859-1',
+ 'en_dk.iso88591': 'en_DK.ISO8859-1',
+ 'en_dk.iso885915': 'en_DK.ISO8859-15',
@@ -976,1 +991,1 @@ locale_alias = {
- 'english.iso88591': 'en_EN.ISO8859-1',
+ 'english.iso88591': 'en_US.ISO8859-1',
@@ -1114,0 +1130,1 @@ locale_alias = {
+ 'fran\xef\xbf\xbdis': 'fr_FR.ISO8859-1',
@@ -1164,2 +1180,2 @@ locale_alias = {
- 'hebrew': 'iw_IL.ISO8859-8',
- 'hebrew.iso88598': 'iw_IL.ISO8859-8',
+ 'hebrew': 'he_IL.ISO8859-8',
+ 'hebrew.iso88598': 'he_IL.ISO8859-8',
@@ -1246,0 +1263,1 @@ locale_alias = {
+ 'km': 'km_KH.UTF-8',
@@ -1413,1 +1430,1 @@ locale_alias = {
- 'russian': 'ru_RU.ISO8859-5',
+ 'russian': 'ru_RU.KOI8-R',
@@ -1427,0 +1445,1 @@ locale_alias = {
+ 'sid_et': 'sid_ET.UTF-8', I could hunt down the very latest upstream X.org locale.alias file and try the script again. And/or we can do this one addition (es_CU) now, unless there are issues with Python recognizing a locale that the OS doesn’t know about yet. MAL: the script needed no change at all to find the file and run! :) We could make it more similar to token/keyword/etc and have it update locale.py in 3.4+. Also maybe make updating the aliases a part of feature release workflow, or even bugfix releases. |
This issue is superseded by bpo-20079. |
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: