summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
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]