summaryrefslogtreecommitdiffstats
path: root/util/local_database/qlocalexml2cpp.py
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-01-18 11:21:34 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-03-22 13:21:46 (GMT)
commitf7c9db16be26c0c273ae141a88da80fae44c2304 (patch)
tree2c5f0624890867a8dbf56b561faa22af32b6e1ba /util/local_database/qlocalexml2cpp.py
parent15d64b6e8c5ce98cb8c1061c007afe7f19751226 (diff)
downloadQt-f7c9db16be26c0c273ae141a88da80fae44c2304.zip
Qt-f7c9db16be26c0c273ae141a88da80fae44c2304.tar.gz
Qt-f7c9db16be26c0c273ae141a88da80fae44c2304.tar.bz2
Upgraded QLocale data to Unicode CLDR 1.8.0
Reviewed-by: Frans Englich
Diffstat (limited to 'util/local_database/qlocalexml2cpp.py')
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index 3c03ba6..da2da32 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -128,13 +128,13 @@ def loadDefaultMap(doc):
def fixedCountryName(name, dupes):
if name in dupes:
- return name + "Country"
- return name
+ return name.replace(" ", "") + "Country"
+ return name.replace(" ", "")
def fixedLanguageName(name, dupes):
if name in dupes:
- return name + "Language"
- return name
+ return name.replace(" ", "") + "Language"
+ return name.replace(" ", "")
def findDupes(country_map, language_map):
country_set = set([ v[0] for a, v in country_map.iteritems() ])
@@ -227,7 +227,11 @@ def loadLocaleMap(doc, language_map, country_map):
while locale_elt:
locale = Locale(locale_elt)
language_id = languageNameToId(locale.language, language_map)
+ if language_id == -1:
+ sys.stderr.write("Cannot find a language id for %s\n" % locale.language)
country_id = countryNameToId(locale.country, country_map)
+ if country_id == -1:
+ sys.stderr.write("Cannot find a country id for %s\n" % locale.country)
result[(language_id, country_id)] = locale
locale_elt = nextSiblingElt(locale_elt, "locale")