summaryrefslogtreecommitdiffstats
path: root/util/local_database/cldr2qlocalexml.py
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-11-21 15:45:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-21 18:23:59 +0100
commite7c79face6ec361e4ad0ff8303f1becafac8b2b6 (patch)
tree1218fa5b00471fa4ed4d9416e0e637081de2e46a /util/local_database/cldr2qlocalexml.py
parent7a49d8dc06f1cf0d0c12cce9d12747df397c7fe2 (diff)
[SIC/BIC] QLocale: update enums up to CLRD 1.9.1
This patch adds some missing codes (two-letter ones only), removes an outdated ones, and updates some names. The legacy language codes are handled in QLocalePrivate::codeToLanguage() (fortunately, there are only 4 of such codes). Change-Id: Iff50aecd1c762b6399cd151aebb955f341d366c6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'util/local_database/cldr2qlocalexml.py')
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py
index b5c4a79d3c..893b662f25 100755
--- a/util/local_database/cldr2qlocalexml.py
+++ b/util/local_database/cldr2qlocalexml.py
@@ -124,10 +124,6 @@ def generateLocaleInfo(path):
script_code = findEntryInFile(path, "identity/script", attribute="type")[0]
variant_code = findEntryInFile(path, "identity/variant", attribute="type")[0]
- # we should handle fully qualified names with the territory
- if not country_code:
- return {}
-
# we do not support variants
# ### actually there is only one locale with variant: en_US_POSIX
# does anybody care about it at all?
@@ -146,6 +142,9 @@ def generateLocaleInfo(path):
return {}
script = enumdata.script_list[script_id][0]
+ # we should handle fully qualified names with the territory
+ if not country_code:
+ return {}
country_id = enumdata.countryCodeToId(country_code)
if country_id <= 0:
sys.stderr.write("unknown country code \"" + country_code + "\"\n")