diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 19:20:59 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 19:20:59 (GMT) |
commit | 5eb01530b2bfba81b09e5129caabeada2d8dc487 (patch) | |
tree | 760252a550a56feb0acda78bd3aaf50bc1364872 /Tools/i18n/makelocalealias.py | |
parent | d97c01ff2897a1d706b13d3684f8db69c8ea2ef3 (diff) | |
download | cpython-5eb01530b2bfba81b09e5129caabeada2d8dc487.zip cpython-5eb01530b2bfba81b09e5129caabeada2d8dc487.tar.gz cpython-5eb01530b2bfba81b09e5129caabeada2d8dc487.tar.bz2 |
Issue #20027: Fixed locale aliases for devanagari locales.
Diffstat (limited to 'Tools/i18n/makelocalealias.py')
-rw-r--r-- | Tools/i18n/makelocalealias.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py index 3445ec8..8b92ae1 100644 --- a/Tools/i18n/makelocalealias.py +++ b/Tools/i18n/makelocalealias.py @@ -23,6 +23,12 @@ def parse(filename): if line[:1] == '#': continue locale, alias = line.split() + # Fix non-standard locale names, e.g. ks_IN@devanagari.UTF-8 + if '@' in alias: + alias_lang, _, alias_mod = alias.partition('@') + if '.' in alias_mod: + alias_mod, _, alias_enc = alias_mod.partition('.') + alias = alias_lang + '.' + alias_enc + '@' + alias_mod # Strip ':' if locale[-1] == ':': locale = locale[:-1] |