diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 19:21:52 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-12-26 19:21:52 (GMT) |
commit | e190fac5f957c6da69fa7401a290291e89904879 (patch) | |
tree | 5ed59d75ecebfa51441578d291dbb556f09c27f8 /Tools | |
parent | 1b97ed5abcad78c9513d605f0cb6b1936599a7b2 (diff) | |
parent | 5eb01530b2bfba81b09e5129caabeada2d8dc487 (diff) | |
download | cpython-e190fac5f957c6da69fa7401a290291e89904879.zip cpython-e190fac5f957c6da69fa7401a290291e89904879.tar.gz cpython-e190fac5f957c6da69fa7401a290291e89904879.tar.bz2 |
Issue #20027: Fixed locale aliases for devanagari locales.
Diffstat (limited to 'Tools')
-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] |