summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-12-26 19:21:52 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-12-26 19:21:52 (GMT)
commite190fac5f957c6da69fa7401a290291e89904879 (patch)
tree5ed59d75ecebfa51441578d291dbb556f09c27f8 /Tools
parent1b97ed5abcad78c9513d605f0cb6b1936599a7b2 (diff)
parent5eb01530b2bfba81b09e5129caabeada2d8dc487 (diff)
downloadcpython-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.py6
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]