Skip to content
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

Closed
LeiserFernndezGallo mannequin opened this issue Nov 26, 2012 · 15 comments
Closed

Add es_cu to locale aliases #60759

LeiserFernndezGallo mannequin opened this issue Nov 26, 2012 · 15 comments
Labels
stdlib Python modules in the Lib dir

Comments

@LeiserFernndezGallo
Copy link
Mannequin

LeiserFernndezGallo mannequin commented Nov 26, 2012

BPO 16555
Nosy @malemburg, @loewis, @doerwalter, @benjaminp, @merwok, @berkerpeksag, @serhiy-storchaka
Superseder
  • bpo-20079: Add support for glibc supported locales
  • Files
  • issue16555.diff
  • 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:

    assignee = None
    closed_at = <Date 2014-10-01.21:34:22.612>
    created_at = <Date 2012-11-26.01:24:46.979>
    labels = ['library']
    title = 'Add es_cu to locale aliases'
    updated_at = <Date 2014-10-01.21:34:22.611>
    user = 'https://bugs.python.org/LeiserFernndezGallo'

    bugs.python.org fields:

    activity = <Date 2014-10-01.21:34:22.611>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-10-01.21:34:22.612>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2012-11-26.01:24:46.979>
    creator = 'Leiser.Fern\xc3\xa1ndez.Gallo'
    dependencies = []
    files = ['28234']
    hgrepos = []
    issue_num = 16555
    keywords = ['patch']
    message_count = 15.0
    messages = ['176392', '176395', '176435', '176484', '177117', '181041', '181098', '181328', '181329', '181393', '181394', '181396', '181400', '181409', '227946']
    nosy_count = 8.0
    nosy_names = ['lemburg', 'loewis', 'doerwalter', 'benjamin.peterson', 'eric.araujo', 'berker.peksag', 'serhiy.storchaka', 'Leiser.Fern\xc3\xa1ndez.Gallo']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '20079'
    type = None
    url = 'https://bugs.python.org/issue16555'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @LeiserFernndezGallo LeiserFernndezGallo mannequin added the stdlib Python modules in the Lib dir label Nov 26, 2012
    @berkerpeksag
    Copy link
    Member

    Python 2.7 is in bugfix-only mode.

    @merwok
    Copy link
    Member

    merwok commented Nov 26, 2012

    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.

    @LeiserFernndezGallo
    Copy link
    Mannequin Author

    LeiserFernndezGallo mannequin commented Nov 26, 2012

    In the file locale.py there is a var locale_alias that map the locale names, es_cu isn't there.

    @merwok
    Copy link
    Member

    merwok commented Nov 27, 2012

    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.)

    @merwok merwok changed the title Add es_cu to locale library. Add es_cu to locale aliases Nov 27, 2012
    @merwok
    Copy link
    Member

    merwok commented Dec 7, 2012

    LGTM.

    @berkerpeksag
    Copy link
    Member

    LGTM.

    Thanks for the review, Éric. Do you have time to commit the patch?

    @merwok
    Copy link
    Member

    merwok commented Feb 1, 2013

    I have a busy week-end ahead but I could sneak a little time for this.

    @merwok
    Copy link
    Member

    merwok commented Feb 4, 2013

    Benjamin, does this have to wait for 2.7.5?

    @benjaminp
    Copy link
    Contributor

    Is there some sort of reference for these aliases? Where do they come from?

    @merwok
    Copy link
    Member

    merwok commented Feb 4, 2013

    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.

    @benjaminp
    Copy link
    Contributor

    Yes, please. See what makelocalealias.py does.

    @malemburg
    Copy link
    Member

    Éric Araujo wrote:

    Éric Araujo added the comment:

    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.

    Hi Eric,

    let me know if you need help with the script.

    @berkerpeksag
    Copy link
    Member

    The es_CU locale has been added to GNU libc (in version 2.15)[1], but
    Tools/i18n/makelocalealias.py script uses the /usr/share/X11/locale/locale.alias file to generate the locale_alias dictionary. I think
    /usr/share/X11/locale/locale.alias needs to be updated to recognize
    the new GNU libc locales.

    See for more information:

    [1] http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=1eb0b490809a681ea801a1cbd93df5b51a4a47e0;hp=c24a9a8aaea37ac630611eb2c75a6517802a1a9d

    @merwok
    Copy link
    Member

    merwok commented Feb 5, 2013

    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.

    @serhiy-storchaka
    Copy link
    Member

    This issue is superseded by bpo-20079.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants