summaryrefslogtreecommitdiffstats
path: root/util/local_database/enumdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'util/local_database/enumdata.py')
-rw-r--r--util/local_database/enumdata.py49
1 files changed, 46 insertions, 3 deletions
diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py
index 5505b68575..e24ac02b07 100644
--- a/util/local_database/enumdata.py
+++ b/util/local_database/enumdata.py
@@ -27,9 +27,13 @@
##
#############################################################################
-# language_list and country_list reflect the current values of enums in qlocale.h
-# If new xml language files are available in CLDR, these languages and countries
-# need to be *appended* to this list (for compatibility between versions).
+# Each *_list reflects the current values of its enums in qlocale.h;
+# if new xml language files are available in CLDR, these languages and
+# countries need to be *appended* to this list (for compatibility
+# between versions). Include any spaces present in names (scripts
+# shall squish them out for the enum entries) in *_list, but use the
+# squished forms of names in the *_aliases mappings.
+
### Qt 6: restore alphabetic order in each list.
language_list = {
@@ -395,6 +399,25 @@ language_list = {
359 : ["Tangut", "txg"]
}
+language_aliases = {
+ # Legacy - should disappear at some point:
+ 'Norwegian': 'NorwegianBokmal',
+ 'Moldavian': 'Romanian',
+ 'SerboCroatian': 'Serbian',
+ 'Tagalog': 'Filipino',
+ 'Twi': 'Akan',
+ # Renamings:
+ 'Afan': 'Oromo',
+ 'Byelorussian': 'Belarusian',
+ 'Bhutani': 'Dzongkha',
+ 'Cambodian': 'Khmer',
+ 'Kurundi': 'Rundi',
+ 'RhaetoRomance': 'Romansh',
+ 'Chewa': 'Nyanja',
+ 'Frisian': 'WesternFrisian',
+ 'Uigur': 'Uighur',
+}
+
country_list = {
0 : ["AnyCountry", "ZZ"],
1 : ["Afghanistan", "AF"],
@@ -660,6 +683,20 @@ country_list = {
261 : ["Europe", "150"]
}
+country_aliases = {
+ # Deprecated:
+ 'Tokelau': 'TokelauCountry',
+ 'Tuvalu': 'TuvaluCountry',
+ # Renamings:
+ 'DemocraticRepublicOfCongo': 'CongoKinshasa',
+ 'PeoplesRepublicOfCongo': 'CongoBrazzaville',
+ 'DemocraticRepublicOfKorea': 'NorthKorea',
+ 'RepublicOfKorea': 'SouthKorea',
+ 'RussianFederation': 'Russia',
+ 'SyrianArabRepublic': 'Syria',
+ 'LatinAmericaAndTheCaribbean': 'LatinAmerica',
+}
+
script_list = {
0 : ["AnyScript", "Zzzz"],
1 : ["Arabic", "Arab"],
@@ -805,6 +842,12 @@ script_list = {
141 : ["Jamo", "Jamo"]
}
+script_aliases = {
+ # Renamings:
+ 'SimplifiedChineseScript': 'SimplifiedHanScript',
+ 'TraditionalChineseScript': 'TraditionalHanScript',
+}
+
def countryCodeToId(code):
if not code:
return 0