From eb26f2b19babf8cdf2fb53da0cdbca09e85b2b65 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sat, 19 Mar 2016 23:51:57 +0400 Subject: Re-generate QLocale data from CLDR v29 * A bunch of fixes and additions to the locale data * Add new scripts from Unicode 8.0 and 9.0 * Map some potentially useful languages and territories [ChangeLog][QtCore] QLocale data updated to CLDR v29 Change-Id: I759ccb27fe19be2722be913c5c2e6aa5f36e5c14 Reviewed-by: Lars Knoll --- util/local_database/enumdata.py | 45 ++++++++++++++++++++++++++++++----- util/local_database/qlocalexml2cpp.py | 11 ++++++++- 2 files changed, 49 insertions(+), 7 deletions(-) (limited to 'util') diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py index 836c8afabf..aa2adfa52f 100644 --- a/util/local_database/enumdata.py +++ b/util/local_database/enumdata.py @@ -371,7 +371,27 @@ language_list = { 336 : [ "Bassa", "bsq" ], 337 : [ "Mono", "mru" ], 338 : [ "Tedim Chin", "ctd" ], - 339 : [ "Maithili", "mai" ] + 339 : [ "Maithili", "mai" ], + 340 : [ "Ahom", "aho" ], + 341 : [ "American Sign Language", "ase" ], + 342 : [ "Ardhamagadhi Prakrit", "pka" ], + 343 : [ "Bhojpuri", "bho" ], + 344 : [ "Hieroglyphic Luwian", "hlu" ], + 345 : [ "Literary Chinese", "lzh" ], + 346 : [ "Mazanderani", "mzn" ], + 347 : [ "Mru", "mro" ], + 348 : [ "Newari", "new" ], + 349 : [ "Northern Luri", "lrc" ], + 350 : [ "Palauan", "pau" ], + 351 : [ "Papiamento", "pap" ], + 352 : [ "Saraiki", "skr" ], + 353 : [ "Tokelau", "tkl" ], + 354 : [ "Tok Pisin", "tpi" ], + 355 : [ "Tuvalu", "tvl" ], + 356 : [ "UncodedLanguages", "mis" ], + 357 : [ "Cantonese", "yue" ], + 358 : [ "Osage", "osa" ], + 359 : [ "Tangut", "txg" ] } country_list = { @@ -632,7 +652,9 @@ country_list = { 254 : [ "SouthSudan", "SS" ], 255 : [ "Bonaire", "BQ" ], 256 : [ "SintMaarten", "SX" ], - 257 : [ "Kosovo", "XK" ] + 257 : [ "Kosovo", "XK" ], + 258 : [ "European Union", "EU" ], + 259 : [ "Outlying Oceania", "QO" ] } script_list = { @@ -763,10 +785,21 @@ script_list = { 124 : [ "Siddham", "Sidd" ], 125 : [ "Khudawadi", "Sind" ], 126 : [ "Tirhuta", "Tirh" ], - 127 : [ "Varang Kshiti", "Wara" ] - -# ### : [ "Blissymbols", "Blis" ], -# ### : [ "Naxi Geba", "Nkgb" ], + 127 : [ "Varang Kshiti", "Wara" ], + 128 : [ "Ahom", "Ahom" ], + 129 : [ "Anatolian Hieroglyphs", "Hluw" ], + 130 : [ "Hatran", "Hatr" ], + 131 : [ "Multani", "Mult" ], + 132 : [ "Old Hungarian", "Hung" ], + 133 : [ "SignWriting", "Sgnw" ], + 134 : [ "Adlam", "Adlm" ], + 135 : [ "Bhaiksuki", "Bhks" ], + 136 : [ "Marchen", "Marc" ], + 137 : [ "Newa", "Newa" ], + 138 : [ "Osage", "Osge" ], + 139 : [ "Tangut", "Tang" ], + 140 : [ "Han With Bopomofo", "Hanb" ], + 141 : [ "Jamo", "Jamo" ] } def countryCodeToId(code): diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py index aa23ca4008..9fd88c46fe 100755 --- a/util/local_database/qlocalexml2cpp.py +++ b/util/local_database/qlocalexml2cpp.py @@ -552,7 +552,7 @@ def main(): cmnt_to = cmnt_to + country_map[to_country][1] data_temp_file.write(" ") - data_temp_file.write("{ %3d, %2d, %3d }, { %3d, %2d, %3d }" % (from_language, from_script, from_country, to_language, to_script, to_country)) + data_temp_file.write("{ %3d, %3d, %3d }, { %3d, %3d, %3d }" % (from_language, from_script, from_country, to_language, to_script, to_country)) index += 1 if index != len(likely_subtags_map): data_temp_file.write(",") @@ -872,6 +872,7 @@ def main(): language = fixedLanguageName(language_map[key][0], dupes) qlocaleh_temp_file.write(" " + language + " = " + str(key) + ",\n") # legacy. should disappear at some point + qlocaleh_temp_file.write("\n") qlocaleh_temp_file.write(" Norwegian = NorwegianBokmal,\n") qlocaleh_temp_file.write(" Moldavian = Romanian,\n") qlocaleh_temp_file.write(" SerboCroatian = Serbian,\n") @@ -887,6 +888,7 @@ def main(): qlocaleh_temp_file.write(" Chewa = Nyanja,\n") qlocaleh_temp_file.write(" Frisian = WesternFrisian,\n") qlocaleh_temp_file.write(" Uigur = Uighur,\n") + qlocaleh_temp_file.write("\n") qlocaleh_temp_file.write(" LastLanguage = " + language + "\n") qlocaleh_temp_file.write(" };\n") @@ -899,8 +901,10 @@ def main(): script = fixedScriptName(script_map[key][0], dupes) qlocaleh_temp_file.write(" " + script + " = " + str(key) + ",\n") # renamings + qlocaleh_temp_file.write("\n") qlocaleh_temp_file.write(" SimplifiedChineseScript = SimplifiedHanScript,\n") qlocaleh_temp_file.write(" TraditionalChineseScript = TraditionalHanScript,\n") + qlocaleh_temp_file.write("\n") qlocaleh_temp_file.write(" LastScript = " + script + "\n") qlocaleh_temp_file.write(" };\n") @@ -910,6 +914,10 @@ def main(): for key in country_map.keys(): country = fixedCountryName(country_map[key][0], dupes) qlocaleh_temp_file.write(" " + country + " = " + str(key) + ",\n") + # deprecated + qlocaleh_temp_file.write("\n") + qlocaleh_temp_file.write(" Tokelau = TokelauCountry,\n") + qlocaleh_temp_file.write(" Tuvalu = TuvaluCountry,\n") # renamings qlocaleh_temp_file.write(" DemocraticRepublicOfCongo = CongoKinshasa,\n") qlocaleh_temp_file.write(" PeoplesRepublicOfCongo = CongoBrazzaville,\n") @@ -917,6 +925,7 @@ def main(): qlocaleh_temp_file.write(" RepublicOfKorea = SouthKorea,\n") qlocaleh_temp_file.write(" RussianFederation = Russia,\n") qlocaleh_temp_file.write(" SyrianArabRepublic = Syria,\n") + qlocaleh_temp_file.write("\n") qlocaleh_temp_file.write(" LastCountry = " + country + "\n") qlocaleh_temp_file.write(" };\n") -- cgit v1.2.3