From e7c79face6ec361e4ad0ff8303f1becafac8b2b6 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 21 Nov 2012 15:45:18 +0200 Subject: [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 --- util/local_database/cldr2qlocalexml.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'util/local_database/cldr2qlocalexml.py') 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") -- cgit v1.2.3