[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>
This commit is contained in:
parent
7a49d8dc06
commit
e7c79face6
@ -99,15 +99,30 @@ QLocale::Language QLocalePrivate::codeToLanguage(const QString &code)
|
||||
ushort uc2 = len-- > 0 ? code[1].toLower().unicode() : 0;
|
||||
ushort uc3 = len-- > 0 ? code[2].toLower().unicode() : 0;
|
||||
|
||||
if (uc1 == 'n' && uc2 == 'o' && uc3 == 0)
|
||||
uc2 = 'b';
|
||||
|
||||
const unsigned char *c = language_code_list;
|
||||
for (; *c != 0; c += 3) {
|
||||
if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
|
||||
return QLocale::Language((c - language_code_list)/3);
|
||||
}
|
||||
|
||||
// legacy codes
|
||||
if (uc1 == 'n' && uc2 == 'o' && uc3 == 0) { // no -> nb
|
||||
Q_STATIC_ASSERT(QLocale::Norwegian == QLocale::NorwegianBokmal);
|
||||
return QLocale::Norwegian;
|
||||
}
|
||||
if (uc1 == 't' && uc2 == 'l' && uc3 == 0) { // tl -> fil
|
||||
Q_STATIC_ASSERT(QLocale::Tagalog == QLocale::Filipino);
|
||||
return QLocale::Tagalog;
|
||||
}
|
||||
if (uc1 == 's' && uc2 == 'h' && uc3 == 0) { // sh -> sr[_Latn]
|
||||
Q_STATIC_ASSERT(QLocale::SerboCroatian == QLocale::Serbian);
|
||||
return QLocale::SerboCroatian;
|
||||
}
|
||||
if (uc1 == 'm' && uc2 == 'o' && uc3 == 0) { // mo -> ro
|
||||
Q_STATIC_ASSERT(QLocale::Moldavian == QLocale::Romanian);
|
||||
return QLocale::Moldavian;
|
||||
}
|
||||
|
||||
return QLocale::C;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
AnyLanguage = 0,
|
||||
C = 1,
|
||||
Abkhazian = 2,
|
||||
Afan = 3,
|
||||
Oromo = 3,
|
||||
Afar = 4,
|
||||
Afrikaans = 5,
|
||||
Albanian = 6,
|
||||
@ -94,14 +94,14 @@ public:
|
||||
Bashkir = 13,
|
||||
Basque = 14,
|
||||
Bengali = 15,
|
||||
Bhutani = 16,
|
||||
Dzongkha = 16,
|
||||
Bihari = 17,
|
||||
Bislama = 18,
|
||||
Breton = 19,
|
||||
Bulgarian = 20,
|
||||
Burmese = 21,
|
||||
Byelorussian = 22,
|
||||
Cambodian = 23,
|
||||
Belarusian = 22,
|
||||
Khmer = 23,
|
||||
Catalan = 24,
|
||||
Chinese = 25,
|
||||
Corsican = 26,
|
||||
@ -113,7 +113,7 @@ public:
|
||||
Esperanto = 32,
|
||||
Estonian = 33,
|
||||
Faroese = 34,
|
||||
FijiLanguage = 35,
|
||||
Fijian = 35,
|
||||
Finnish = 36,
|
||||
French = 37,
|
||||
Frisian = 38,
|
||||
@ -146,8 +146,8 @@ public:
|
||||
Kirghiz = 65,
|
||||
Korean = 66,
|
||||
Kurdish = 67,
|
||||
Kurundi = 68,
|
||||
Laothian = 69,
|
||||
Rundi = 68,
|
||||
Lao = 69,
|
||||
Latin = 70,
|
||||
Latvian = 71,
|
||||
Lingala = 72,
|
||||
@ -159,11 +159,11 @@ public:
|
||||
Maltese = 78,
|
||||
Maori = 79,
|
||||
Marathi = 80,
|
||||
Moldavian = 81,
|
||||
Marshallese = 81,
|
||||
Mongolian = 82,
|
||||
NauruLanguage = 83,
|
||||
Nepali = 84,
|
||||
Norwegian = 85,
|
||||
NorwegianBokmal = 85,
|
||||
Occitan = 86,
|
||||
Oriya = 87,
|
||||
Pashto = 88,
|
||||
@ -172,14 +172,14 @@ public:
|
||||
Portuguese = 91,
|
||||
Punjabi = 92,
|
||||
Quechua = 93,
|
||||
RhaetoRomance = 94,
|
||||
Romansh = 94,
|
||||
Romanian = 95,
|
||||
Russian = 96,
|
||||
Samoan = 97,
|
||||
Sangho = 98,
|
||||
Sanskrit = 99,
|
||||
Serbian = 100,
|
||||
SerboCroatian = 101,
|
||||
Ossetic = 101,
|
||||
Sesotho = 102,
|
||||
Setswana = 103,
|
||||
Shona = 104,
|
||||
@ -193,7 +193,7 @@ public:
|
||||
Sundanese = 112,
|
||||
Swahili = 113,
|
||||
Swedish = 114,
|
||||
Tagalog = 115,
|
||||
Sardinian = 115,
|
||||
Tajik = 116,
|
||||
Tamil = 117,
|
||||
Tatar = 118,
|
||||
@ -205,7 +205,7 @@ public:
|
||||
Tsonga = 124,
|
||||
Turkish = 125,
|
||||
Turkmen = 126,
|
||||
Twi = 127,
|
||||
Tahitian = 127,
|
||||
Uigur = 128,
|
||||
Ukrainian = 129,
|
||||
Urdu = 130,
|
||||
@ -219,7 +219,7 @@ public:
|
||||
Yoruba = 138,
|
||||
Zhuang = 139,
|
||||
Zulu = 140,
|
||||
Nynorsk = 141,
|
||||
NorwegianNynorsk = 141,
|
||||
Bosnian = 142,
|
||||
Divehi = 143,
|
||||
Manx = 144,
|
||||
@ -294,9 +294,39 @@ public:
|
||||
KoyraboroSenni = 213,
|
||||
Shambala = 214,
|
||||
Bodo = 215,
|
||||
NorwegianBokmal = Norwegian,
|
||||
NorwegianNynorsk = Nynorsk,
|
||||
LastLanguage = Bodo
|
||||
Avaric = 216,
|
||||
Chamorro = 217,
|
||||
Chechen = 218,
|
||||
Church = 219,
|
||||
Chuvash = 220,
|
||||
Cree = 221,
|
||||
Haitian = 222,
|
||||
Herero = 223,
|
||||
HiriMotu = 224,
|
||||
Kanuri = 225,
|
||||
Komi = 226,
|
||||
Kongo = 227,
|
||||
Kwanyama = 228,
|
||||
Limburgish = 229,
|
||||
LubaKatanga = 230,
|
||||
Luxembourgish = 231,
|
||||
Navaho = 232,
|
||||
Ndonga = 233,
|
||||
Ojibwa = 234,
|
||||
Pali = 235,
|
||||
Walloon = 236,
|
||||
Norwegian = NorwegianBokmal,
|
||||
Moldavian = Romanian,
|
||||
SerboCroatian = Serbian,
|
||||
Tagalog = Filipino,
|
||||
Twi = Akan,
|
||||
Afan = Oromo,
|
||||
Byelorussian = Belarusian,
|
||||
Bhutani = Dzongkha,
|
||||
Cambodian = Khmer,
|
||||
Kurundi = Rundi,
|
||||
RhaetoRomance = Romansh,
|
||||
LastLanguage = Walloon
|
||||
};
|
||||
|
||||
enum Script {
|
||||
@ -372,7 +402,7 @@ public:
|
||||
BouvetIsland = 29,
|
||||
Brazil = 30,
|
||||
BritishIndianOceanTerritory = 31,
|
||||
BruneiDarussalam = 32,
|
||||
Brunei = 32,
|
||||
Bulgaria = 33,
|
||||
BurkinaFaso = 34,
|
||||
Burundi = 35,
|
||||
@ -389,8 +419,8 @@ public:
|
||||
CocosIslands = 46,
|
||||
Colombia = 47,
|
||||
Comoros = 48,
|
||||
DemocraticRepublicOfCongo = 49,
|
||||
PeoplesRepublicOfCongo = 50,
|
||||
CongoKinshasa = 49,
|
||||
CongoBrazzaville = 50,
|
||||
CookIslands = 51,
|
||||
CostaRica = 52,
|
||||
IvoryCoast = 53,
|
||||
@ -412,10 +442,10 @@ public:
|
||||
Ethiopia = 69,
|
||||
FalklandIslands = 70,
|
||||
FaroeIslands = 71,
|
||||
FijiCountry = 72,
|
||||
Fiji = 72,
|
||||
Finland = 73,
|
||||
France = 74,
|
||||
MetropolitanFrance = 75,
|
||||
Guernsey = 75,
|
||||
FrenchGuiana = 76,
|
||||
FrenchPolynesia = 77,
|
||||
FrenchSouthernTerritories = 78,
|
||||
@ -453,16 +483,16 @@ public:
|
||||
Kazakhstan = 110,
|
||||
Kenya = 111,
|
||||
Kiribati = 112,
|
||||
DemocraticRepublicOfKorea = 113,
|
||||
RepublicOfKorea = 114,
|
||||
NorthKorea = 113,
|
||||
SouthKorea = 114,
|
||||
Kuwait = 115,
|
||||
Kyrgyzstan = 116,
|
||||
Lao = 117,
|
||||
Laos = 117,
|
||||
Latvia = 118,
|
||||
Lebanon = 119,
|
||||
Lesotho = 120,
|
||||
Liberia = 121,
|
||||
LibyanArabJamahiriya = 122,
|
||||
Libya = 122,
|
||||
Liechtenstein = 123,
|
||||
Lithuania = 124,
|
||||
Luxembourg = 125,
|
||||
@ -505,7 +535,7 @@ public:
|
||||
Oman = 162,
|
||||
Pakistan = 163,
|
||||
Palau = 164,
|
||||
PalestinianTerritory = 165,
|
||||
PalestinianTerritories = 165,
|
||||
Panama = 166,
|
||||
PapuaNewGuinea = 167,
|
||||
Paraguay = 168,
|
||||
@ -518,11 +548,11 @@ public:
|
||||
Qatar = 175,
|
||||
Reunion = 176,
|
||||
Romania = 177,
|
||||
RussianFederation = 178,
|
||||
Russia = 178,
|
||||
Rwanda = 179,
|
||||
SaintKittsAndNevis = 180,
|
||||
StLucia = 181,
|
||||
StVincentAndTheGrenadines = 182,
|
||||
SaintLucia = 181,
|
||||
SaintVincentAndTheGrenadines = 182,
|
||||
Samoa = 183,
|
||||
SanMarino = 184,
|
||||
SaoTomeAndPrincipe = 185,
|
||||
@ -539,15 +569,15 @@ public:
|
||||
SouthGeorgiaAndTheSouthSandwichIslands = 196,
|
||||
Spain = 197,
|
||||
SriLanka = 198,
|
||||
StHelena = 199,
|
||||
StPierreAndMiquelon = 200,
|
||||
SaintHelena = 199,
|
||||
SaintPierreAndMiquelon = 200,
|
||||
Sudan = 201,
|
||||
Suriname = 202,
|
||||
SvalbardAndJanMayenIslands = 203,
|
||||
Swaziland = 204,
|
||||
Sweden = 205,
|
||||
Switzerland = 206,
|
||||
SyrianArabRepublic = 207,
|
||||
Syria = 207,
|
||||
Taiwan = 208,
|
||||
Tajikistan = 209,
|
||||
Tanzania = 210,
|
||||
@ -572,22 +602,35 @@ public:
|
||||
Vanuatu = 229,
|
||||
VaticanCityState = 230,
|
||||
Venezuela = 231,
|
||||
VietNam = 232,
|
||||
Vietnam = 232,
|
||||
BritishVirginIslands = 233,
|
||||
USVirginIslands = 234,
|
||||
UnitedStatesVirginIslands = 234,
|
||||
WallisAndFutunaIslands = 235,
|
||||
WesternSahara = 236,
|
||||
Yemen = 237,
|
||||
Yugoslavia = 238,
|
||||
CanaryIslands = 238,
|
||||
Zambia = 239,
|
||||
Zimbabwe = 240,
|
||||
SerbiaAndMontenegro = 241,
|
||||
ClippertonIsland = 241,
|
||||
Montenegro = 242,
|
||||
Serbia = 243,
|
||||
SaintBarthelemy = 244,
|
||||
SaintMartin = 245,
|
||||
LatinAmericaAndTheCaribbean = 246,
|
||||
LastCountry = LatinAmericaAndTheCaribbean
|
||||
AscensionIsland = 247,
|
||||
AlandIslands = 248,
|
||||
DiegoGarcia = 249,
|
||||
CeutaAndMelilla = 250,
|
||||
IsleOfMan = 251,
|
||||
Jersey = 252,
|
||||
TristanDaCunha = 253,
|
||||
DemocraticRepublicOfCongo = CongoKinshasa,
|
||||
PeoplesRepublicOfCongo = CongoBrazzaville,
|
||||
DemocraticRepublicOfKorea = NorthKorea,
|
||||
RepublicOfKorea = SouthKorea,
|
||||
RussianFederation = Russia,
|
||||
SyrianArabRepublic = Syria,
|
||||
LastCountry = TristanDaCunha
|
||||
};
|
||||
// GENERATED PART ENDS HERE
|
||||
|
||||
|
@ -126,7 +126,8 @@
|
||||
\value AnyLanguage
|
||||
\value C The "C" locale is identical in behavior to English/UnitedStates.
|
||||
\value Abkhazian
|
||||
\value Afan
|
||||
\value Oromo
|
||||
\value Afan Obsolete, please use Oromo
|
||||
\value Afar
|
||||
\value Afrikaans
|
||||
\value Albanian
|
||||
@ -134,24 +135,34 @@
|
||||
\value Arabic
|
||||
\value Armenian
|
||||
\value Assamese
|
||||
\value Avaric
|
||||
\value Aymara
|
||||
\value Azerbaijani
|
||||
\value Bashkir
|
||||
\value Basque
|
||||
\value Bengali
|
||||
\value Bhutani
|
||||
\value Dzongkha
|
||||
\value Bhutani Obsolete, please use Dzongkha
|
||||
\value Bihari
|
||||
\value Bislama
|
||||
\value Bosnian
|
||||
\value Bodo
|
||||
\value Breton
|
||||
\value Bulgarian
|
||||
\value Burmese
|
||||
\value Byelorussian
|
||||
\value Cambodian
|
||||
\value Belarusian
|
||||
\value Byelorussian Obsolete, please use Belarusian
|
||||
\value Khmer
|
||||
\value Cambodian Obsolete, please use Khmer
|
||||
\value Catalan
|
||||
\value Chamorro
|
||||
\value Chechen
|
||||
\value Chinese
|
||||
\value Church
|
||||
\value Chuvash
|
||||
\value Cornish
|
||||
\value Corsican
|
||||
\value Cree
|
||||
\value Croatian
|
||||
\value Czech
|
||||
\value Danish
|
||||
@ -161,7 +172,7 @@
|
||||
\value Esperanto
|
||||
\value Estonian
|
||||
\value Faroese
|
||||
\value FijiLanguage
|
||||
\value Fijian
|
||||
\value Finnish
|
||||
\value French
|
||||
\value Frisian
|
||||
@ -173,9 +184,12 @@
|
||||
\value Greenlandic
|
||||
\value Guarani
|
||||
\value Gujarati
|
||||
\value Haitian
|
||||
\value Hausa
|
||||
\value Hebrew
|
||||
\value Herero
|
||||
\value Hindi
|
||||
\value HiriMotu
|
||||
\value Hungarian
|
||||
\value Icelandic
|
||||
\value Indonesian
|
||||
@ -188,18 +202,27 @@
|
||||
\value Japanese
|
||||
\value Javanese
|
||||
\value Kannada
|
||||
\value Kanuri
|
||||
\value Kashmiri
|
||||
\value Kazakh
|
||||
\value Kinyarwanda
|
||||
\value Kirghiz
|
||||
\value Komi
|
||||
\value Kongo
|
||||
\value Korean
|
||||
\value Kurdish
|
||||
\value Kurundi
|
||||
\value Laothian
|
||||
\value Rundi
|
||||
\value Kurundi Obsolete, please use Rundi
|
||||
\value Kwanyama
|
||||
\value Lao
|
||||
\value Latin
|
||||
\value Latvian
|
||||
\value Limburgish
|
||||
\value Lingala
|
||||
\value Lithuanian
|
||||
\value LubaKatanga
|
||||
\value Luxembourgish
|
||||
\value Marshallese
|
||||
\value Macedonian
|
||||
\value Malagasy
|
||||
\value Malay
|
||||
@ -208,30 +231,36 @@
|
||||
\value Manx
|
||||
\value Maori
|
||||
\value Marathi
|
||||
\value Moldavian
|
||||
\value Moldavian Obsolete, please use Romanian
|
||||
\value Mongolian
|
||||
\value NauruLanguage
|
||||
\value Navaho
|
||||
\value Ndonga
|
||||
\value Nepali
|
||||
\value Norwegian
|
||||
\value NorwegianBokmal
|
||||
\value Nynorsk Obsolete, please use NorwegianNynorsk
|
||||
\value Norwegian same as NorwegianBokmal
|
||||
\value NorwegianBokmal same as Norwegian
|
||||
\value NorwegianNynorsk
|
||||
\value Occitan
|
||||
\value Ojibwa
|
||||
\value Oriya
|
||||
\value Ossetic
|
||||
\value Pali
|
||||
\value Pashto
|
||||
\value Persian
|
||||
\value Polish
|
||||
\value Portuguese
|
||||
\value Punjabi
|
||||
\value Quechua
|
||||
\value RhaetoRomance
|
||||
\value Romansh
|
||||
\value RhaetoRomance Obsolete, please use Romansh
|
||||
\value Romanian
|
||||
\value Russian
|
||||
\value Samoan
|
||||
\value Sangho
|
||||
\value Sanskrit
|
||||
\value Sardinian
|
||||
\value Serbian
|
||||
\value SerboCroatian
|
||||
\value SerboCroatian Obsolete, please use Serbian
|
||||
\value Sesotho
|
||||
\value Setswana
|
||||
\value Shona
|
||||
@ -245,7 +274,8 @@
|
||||
\value Sundanese
|
||||
\value Swahili
|
||||
\value Swedish
|
||||
\value Tagalog
|
||||
\value Tagalog Obsolete, please use Filipino
|
||||
\value Tahitian
|
||||
\value Tajik
|
||||
\value Tamil
|
||||
\value Tatar
|
||||
@ -257,13 +287,14 @@
|
||||
\value Tsonga
|
||||
\value Turkish
|
||||
\value Turkmen
|
||||
\value Twi
|
||||
\value Twi Obsolete, please use Akan
|
||||
\value Uigur
|
||||
\value Ukrainian
|
||||
\value Urdu
|
||||
\value Uzbek
|
||||
\value Vietnamese
|
||||
\value Volapuk
|
||||
\value Walloon
|
||||
\value Welsh
|
||||
\value Wolof
|
||||
\value Xhosa
|
||||
@ -386,7 +417,7 @@
|
||||
\value BouvetIsland
|
||||
\value Brazil
|
||||
\value BritishIndianOceanTerritory
|
||||
\value BruneiDarussalam
|
||||
\value Brunei
|
||||
\value Bulgaria
|
||||
\value BurkinaFaso
|
||||
\value Burundi
|
||||
@ -403,8 +434,10 @@
|
||||
\value CocosIslands
|
||||
\value Colombia
|
||||
\value Comoros
|
||||
\value DemocraticRepublicOfCongo
|
||||
\value PeoplesRepublicOfCongo
|
||||
\value CongoKinshasa
|
||||
\value CongoBrazzaville
|
||||
\value DemocraticRepublicOfCongo Obsolete, please use CongoKinshasa
|
||||
\value PeoplesRepublicOfCongo Obsolete, please use CongoBrazzaville
|
||||
\value CookIslands
|
||||
\value CostaRica
|
||||
\value IvoryCoast
|
||||
@ -426,10 +459,9 @@
|
||||
\value Ethiopia
|
||||
\value FalklandIslands
|
||||
\value FaroeIslands
|
||||
\value FijiCountry
|
||||
\value Fiji
|
||||
\value Finland
|
||||
\value France
|
||||
\value MetropolitanFrance
|
||||
\value FrenchGuiana
|
||||
\value FrenchPolynesia
|
||||
\value FrenchSouthernTerritories
|
||||
@ -467,16 +499,18 @@
|
||||
\value Kazakhstan
|
||||
\value Kenya
|
||||
\value Kiribati
|
||||
\value DemocraticRepublicOfKorea
|
||||
\value RepublicOfKorea
|
||||
\value NorthKorea
|
||||
\value SouthKorea
|
||||
\value DemocraticRepublicOfKorea Obsolete, please use NorthKorea
|
||||
\value RepublicOfKorea Obsolete, please use SouthKorea
|
||||
\value Kuwait
|
||||
\value Kyrgyzstan
|
||||
\value Lao
|
||||
\value Laos
|
||||
\value Latvia
|
||||
\value Lebanon
|
||||
\value Lesotho
|
||||
\value Liberia
|
||||
\value LibyanArabJamahiriya
|
||||
\value Libya
|
||||
\value Liechtenstein
|
||||
\value Lithuania
|
||||
\value Luxembourg
|
||||
@ -519,7 +553,7 @@
|
||||
\value Oman
|
||||
\value Pakistan
|
||||
\value Palau
|
||||
\value PalestinianTerritory
|
||||
\value PalestinianTerritories
|
||||
\value Panama
|
||||
\value PapuaNewGuinea
|
||||
\value Paraguay
|
||||
@ -532,17 +566,17 @@
|
||||
\value Qatar
|
||||
\value Reunion
|
||||
\value Romania
|
||||
\value RussianFederation
|
||||
\value Russia same as RussianFederation
|
||||
\value RussianFederation same as Russia
|
||||
\value Rwanda
|
||||
\value SaintKittsAndNevis
|
||||
\value StLucia
|
||||
\value StVincentAndTheGrenadines
|
||||
\value SaintLucia
|
||||
\value SaintVincentAndTheGrenadines
|
||||
\value Samoa
|
||||
\value SanMarino
|
||||
\value SaoTomeAndPrincipe
|
||||
\value SaudiArabia
|
||||
\value Senegal
|
||||
\value SerbiaAndMontenegro
|
||||
\value Seychelles
|
||||
\value SierraLeone
|
||||
\value Singapore
|
||||
@ -554,15 +588,16 @@
|
||||
\value SouthGeorgiaAndTheSouthSandwichIslands
|
||||
\value Spain
|
||||
\value SriLanka
|
||||
\value StHelena
|
||||
\value StPierreAndMiquelon
|
||||
\value SaintHelena
|
||||
\value SaintPierreAndMiquelon
|
||||
\value Sudan
|
||||
\value Suriname
|
||||
\value SvalbardAndJanMayenIslands
|
||||
\value Swaziland
|
||||
\value Sweden
|
||||
\value Switzerland
|
||||
\value SyrianArabRepublic
|
||||
\value Syria
|
||||
\value SyrianArabRepublic Obsolete, please use Syria
|
||||
\value Taiwan
|
||||
\value Tajikistan
|
||||
\value Tanzania
|
||||
@ -589,11 +624,10 @@
|
||||
\value Venezuela
|
||||
\value VietNam
|
||||
\value BritishVirginIslands
|
||||
\value USVirginIslands
|
||||
\value UnitedStatesVirginIslands
|
||||
\value WallisAndFutunaIslands
|
||||
\value WesternSahara
|
||||
\value Yemen
|
||||
\value Yugoslavia
|
||||
\value Zambia
|
||||
\value Zimbabwe
|
||||
\value Montenegro
|
||||
@ -601,6 +635,13 @@
|
||||
\value SaintBarthelemy
|
||||
\value SaintMartin
|
||||
\value LatinAmericaAndTheCaribbean
|
||||
\value AscensionIsland
|
||||
\value AlandIslands
|
||||
\value DiegoGarcia
|
||||
\value CeutaAndMelilla
|
||||
\value IsleOfMan
|
||||
\value Jersey
|
||||
\value TristanDaCunha
|
||||
\omitvalue LastCountry
|
||||
|
||||
\sa country(), countryToString()
|
||||
@ -623,6 +664,31 @@
|
||||
\value LatinScript
|
||||
\value MongolianScript
|
||||
\value TifinaghScript
|
||||
\value ArmenianScript
|
||||
\value BengaliScript
|
||||
\value CherokeeScript
|
||||
\value DevanagariScript
|
||||
\value EthiopicScript
|
||||
\value GeorgianScript
|
||||
\value GreekScript
|
||||
\value GujaratiScript
|
||||
\value HebrewScript
|
||||
\value JapaneseScript
|
||||
\value KhmerScript
|
||||
\value KannadaScript
|
||||
\value KoreanScript
|
||||
\value LaoScript
|
||||
\value MalayalamScript
|
||||
\value MyanmarScript
|
||||
\value OriyaScript
|
||||
\value TamilScript
|
||||
\value TeluguScript
|
||||
\value ThaanaScript
|
||||
\value ThaiScript
|
||||
\value TibetanScript
|
||||
\value SinhalaScript
|
||||
\value SyriacScript
|
||||
\value YiScript
|
||||
\omitvalue LastScript
|
||||
|
||||
\sa script(), scriptToString(), languageToString()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -98,6 +98,7 @@ private slots:
|
||||
#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
|
||||
void emptyCtor();
|
||||
#endif
|
||||
void legacyNames();
|
||||
void unixLocaleName();
|
||||
void double_conversion_data();
|
||||
void double_conversion();
|
||||
@ -186,8 +187,8 @@ void tst_QLocale::ctor()
|
||||
#define TEST_CTOR(req_lang, req_country, exp_lang, exp_country) \
|
||||
{ \
|
||||
QLocale l(QLocale::req_lang, QLocale::req_country); \
|
||||
QCOMPARE(l.language(), exp_lang); \
|
||||
QCOMPARE(l.country(), exp_country); \
|
||||
QCOMPARE((int)l.language(), (int)exp_lang); \
|
||||
QCOMPARE((int)l.country(), (int)exp_country); \
|
||||
}
|
||||
{
|
||||
QLocale l(QLocale::C, QLocale::AnyCountry);
|
||||
@ -495,6 +496,42 @@ void tst_QLocale::emptyCtor()
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QLocale::legacyNames()
|
||||
{
|
||||
QLocale::setDefault(QLocale(QLocale::C));
|
||||
|
||||
#define TEST_CTOR(req_lang, req_country, exp_lang, exp_country) \
|
||||
{ \
|
||||
QLocale l(QLocale::req_lang, QLocale::req_country); \
|
||||
QCOMPARE((int)l.language(), (int)QLocale::exp_lang); \
|
||||
QCOMPARE((int)l.country(), (int)QLocale::exp_country); \
|
||||
}
|
||||
|
||||
TEST_CTOR(Moldavian, Moldova, Romanian, Moldova)
|
||||
TEST_CTOR(Norwegian, AnyCountry, Norwegian, Norway)
|
||||
TEST_CTOR(SerboCroatian, Montenegro, Serbian, Montenegro)
|
||||
TEST_CTOR(Tagalog, AnyCountry, Filipino, Philippines)
|
||||
|
||||
#undef TEST_CTOR
|
||||
|
||||
#define TEST_CTOR(req_lc, exp_lang, exp_country) \
|
||||
{ \
|
||||
QLocale l(req_lc); \
|
||||
QVERIFY2(l.language() == QLocale::exp_lang \
|
||||
&& l.country() == QLocale::exp_country, \
|
||||
QString("requested: \"" + QString(req_lc) + "\", got: " \
|
||||
+ QLocale::languageToString(l.language()) \
|
||||
+ "/" + QLocale::countryToString(l.country())).toLatin1().constData()); \
|
||||
}
|
||||
|
||||
TEST_CTOR("mo_MD", Romanian, Moldova)
|
||||
TEST_CTOR("no", Norwegian, Norway)
|
||||
TEST_CTOR("sh_ME", Serbian, Montenegro)
|
||||
TEST_CTOR("tl", Filipino, Philippines)
|
||||
|
||||
#undef TEST_CTOR
|
||||
}
|
||||
|
||||
void tst_QLocale::unixLocaleName()
|
||||
{
|
||||
#define TEST_NAME(req_lang, req_country, exp_name) \
|
||||
@ -1553,14 +1590,9 @@ static const LocaleListItem g_locale_list[] = {
|
||||
{ 96, 222}, // Russian/Ukraine
|
||||
{ 98, 41}, // Sangho/CentralAfricanRepublic
|
||||
{ 99, 100}, // Sanskrit/India
|
||||
{ 100, 241}, // Serbian/SerbiaAndMontenegro
|
||||
{ 100, 27}, // Serbian/BosniaAndHerzegowina
|
||||
{ 100, 238}, // Serbian/Yugoslavia
|
||||
{ 100, 242}, // Serbian/Montenegro
|
||||
{ 100, 243}, // Serbian/Serbia
|
||||
{ 101, 241}, // SerboCroatian/SerbiaAndMontenegro
|
||||
{ 101, 27}, // SerboCroatian/BosniaAndHerzegowina
|
||||
{ 101, 238}, // SerboCroatian/Yugoslavia
|
||||
{ 102, 120}, // Sesotho/Lesotho
|
||||
{ 102, 195}, // Sesotho/SouthAfrica
|
||||
{ 103, 195}, // Setswana/SouthAfrica
|
||||
|
@ -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")
|
||||
|
@ -48,29 +48,29 @@ language_list = {
|
||||
0 : [ "AnyLanguage", " " ],
|
||||
1 : [ "C", " " ],
|
||||
2 : [ "Abkhazian", "ab" ],
|
||||
3 : [ "Afan", "om" ],
|
||||
3 : [ "Oromo", "om" ], # macrolanguage
|
||||
4 : [ "Afar", "aa" ],
|
||||
5 : [ "Afrikaans", "af" ],
|
||||
6 : [ "Albanian", "sq" ],
|
||||
6 : [ "Albanian", "sq" ], # macrolanguage
|
||||
7 : [ "Amharic", "am" ],
|
||||
8 : [ "Arabic", "ar" ],
|
||||
8 : [ "Arabic", "ar" ], # macrolanguage
|
||||
9 : [ "Armenian", "hy" ],
|
||||
10 : [ "Assamese", "as" ],
|
||||
11 : [ "Aymara", "ay" ],
|
||||
12 : [ "Azerbaijani", "az" ],
|
||||
11 : [ "Aymara", "ay" ], # macrolanguage
|
||||
12 : [ "Azerbaijani", "az" ], # macrolanguage
|
||||
13 : [ "Bashkir", "ba" ],
|
||||
14 : [ "Basque", "eu" ],
|
||||
15 : [ "Bengali", "bn" ],
|
||||
16 : [ "Bhutani", "dz" ],
|
||||
16 : [ "Dzongkha", "dz" ],
|
||||
17 : [ "Bihari", "bh" ],
|
||||
18 : [ "Bislama", "bi" ],
|
||||
19 : [ "Breton", "br" ],
|
||||
20 : [ "Bulgarian", "bg" ],
|
||||
21 : [ "Burmese", "my" ],
|
||||
22 : [ "Byelorussian", "be" ],
|
||||
23 : [ "Cambodian", "km" ],
|
||||
22 : [ "Belarusian", "be" ],
|
||||
23 : [ "Khmer", "km" ],
|
||||
24 : [ "Catalan", "ca" ],
|
||||
25 : [ "Chinese", "zh" ],
|
||||
25 : [ "Chinese", "zh" ], # macrolanguage
|
||||
26 : [ "Corsican", "co" ],
|
||||
27 : [ "Croatian", "hr" ],
|
||||
28 : [ "Czech", "cs" ],
|
||||
@ -78,9 +78,9 @@ language_list = {
|
||||
30 : [ "Dutch", "nl" ],
|
||||
31 : [ "English", "en" ],
|
||||
32 : [ "Esperanto", "eo" ],
|
||||
33 : [ "Estonian", "et" ],
|
||||
33 : [ "Estonian", "et" ], # macrolanguage
|
||||
34 : [ "Faroese", "fo" ],
|
||||
35 : [ "Fiji", "fj" ],
|
||||
35 : [ "Fijian", "fj" ],
|
||||
36 : [ "Finnish", "fi" ],
|
||||
37 : [ "French", "fr" ],
|
||||
38 : [ "Frisian", "fy" ],
|
||||
@ -90,7 +90,7 @@ language_list = {
|
||||
42 : [ "German", "de" ],
|
||||
43 : [ "Greek", "el" ],
|
||||
44 : [ "Greenlandic", "kl" ],
|
||||
45 : [ "Guarani", "gn" ],
|
||||
45 : [ "Guarani", "gn" ], # macrolanguage
|
||||
46 : [ "Gujarati", "gu" ],
|
||||
47 : [ "Hausa", "ha" ],
|
||||
48 : [ "Hebrew", "he" ],
|
||||
@ -100,8 +100,8 @@ language_list = {
|
||||
52 : [ "Indonesian", "id" ],
|
||||
53 : [ "Interlingua", "ia" ],
|
||||
54 : [ "Interlingue", "ie" ],
|
||||
55 : [ "Inuktitut", "iu" ],
|
||||
56 : [ "Inupiak", "ik" ],
|
||||
55 : [ "Inuktitut", "iu" ], # macrolanguage
|
||||
56 : [ "Inupiak", "ik" ], # macrolanguage
|
||||
57 : [ "Irish", "ga" ],
|
||||
58 : [ "Italian", "it" ],
|
||||
59 : [ "Japanese", "ja" ],
|
||||
@ -112,41 +112,41 @@ language_list = {
|
||||
64 : [ "Kinyarwanda", "rw" ],
|
||||
65 : [ "Kirghiz", "ky" ],
|
||||
66 : [ "Korean", "ko" ],
|
||||
67 : [ "Kurdish", "ku" ],
|
||||
68 : [ "Kurundi", "rn" ],
|
||||
69 : [ "Laothian", "lo" ],
|
||||
67 : [ "Kurdish", "ku" ], # macrolanguage
|
||||
68 : [ "Rundi", "rn" ],
|
||||
69 : [ "Lao", "lo" ],
|
||||
70 : [ "Latin", "la" ],
|
||||
71 : [ "Latvian", "lv" ],
|
||||
71 : [ "Latvian", "lv" ], # macrolanguage
|
||||
72 : [ "Lingala", "ln" ],
|
||||
73 : [ "Lithuanian", "lt" ],
|
||||
74 : [ "Macedonian", "mk" ],
|
||||
75 : [ "Malagasy", "mg" ],
|
||||
76 : [ "Malay", "ms" ],
|
||||
75 : [ "Malagasy", "mg" ], # macrolanguage
|
||||
76 : [ "Malay", "ms" ], # macrolanguage
|
||||
77 : [ "Malayalam", "ml" ],
|
||||
78 : [ "Maltese", "mt" ],
|
||||
79 : [ "Maori", "mi" ],
|
||||
80 : [ "Marathi", "mr" ],
|
||||
81 : [ "Moldavian", "mo" ], # deprecated (alias to "ro_MD")
|
||||
82 : [ "Mongolian", "mn" ],
|
||||
83 : [ "Nauru", "na" ],
|
||||
84 : [ "Nepali", "ne" ],
|
||||
85 : [ "Norwegian", "nb" ],
|
||||
81 : [ "Marshallese", "mh" ],
|
||||
82 : [ "Mongolian", "mn" ], # macrolanguage
|
||||
83 : [ "Nauru", "na" ],
|
||||
84 : [ "Nepali", "ne" ], # macrolanguage
|
||||
85 : [ "NorwegianBokmal", "nb" ],
|
||||
86 : [ "Occitan", "oc" ],
|
||||
87 : [ "Oriya", "or" ],
|
||||
88 : [ "Pashto", "ps" ],
|
||||
89 : [ "Persian", "fa" ],
|
||||
87 : [ "Oriya", "or" ], # macrolanguage
|
||||
88 : [ "Pashto", "ps" ], # macrolanguage
|
||||
89 : [ "Persian", "fa" ], # macrolanguage
|
||||
90 : [ "Polish", "pl" ],
|
||||
91 : [ "Portuguese", "pt" ],
|
||||
92 : [ "Punjabi", "pa" ],
|
||||
93 : [ "Quechua", "qu" ],
|
||||
94 : [ "RhaetoRomance", "rm" ],
|
||||
93 : [ "Quechua", "qu" ], # macrolanguage
|
||||
94 : [ "Romansh", "rm" ],
|
||||
95 : [ "Romanian", "ro" ],
|
||||
96 : [ "Russian", "ru" ],
|
||||
97 : [ "Samoan", "sm" ],
|
||||
98 : [ "Sangho", "sg" ],
|
||||
99 : [ "Sanskrit", "sa" ],
|
||||
100 : [ "Serbian", "sr" ],
|
||||
101 : [ "SerboCroatian", "sh" ], # legacy (alias to "sr_Latn")
|
||||
101 : [ "Ossetic", "os" ],
|
||||
102 : [ "Sesotho", "st" ],
|
||||
103 : [ "Setswana", "tn" ],
|
||||
104 : [ "Shona", "sn" ],
|
||||
@ -158,9 +158,9 @@ language_list = {
|
||||
110 : [ "Somali", "so" ],
|
||||
111 : [ "Spanish", "es" ],
|
||||
112 : [ "Sundanese", "su" ],
|
||||
113 : [ "Swahili", "sw" ],
|
||||
113 : [ "Swahili", "sw" ], # macrolanguage
|
||||
114 : [ "Swedish", "sv" ],
|
||||
115 : [ "Tagalog", "tl" ], # legacy (alias to "fil")
|
||||
115 : [ "Sardinian", "sc" ], # macrolanguage
|
||||
116 : [ "Tajik", "tg" ],
|
||||
117 : [ "Tamil", "ta" ],
|
||||
118 : [ "Tatar", "tt" ],
|
||||
@ -168,30 +168,30 @@ language_list = {
|
||||
120 : [ "Thai", "th" ],
|
||||
121 : [ "Tibetan", "bo" ],
|
||||
122 : [ "Tigrinya", "ti" ],
|
||||
123 : [ "Tonga", "to" ],
|
||||
123 : [ "Tonga", "to" ],
|
||||
124 : [ "Tsonga", "ts" ],
|
||||
125 : [ "Turkish", "tr" ],
|
||||
126 : [ "Turkmen", "tk" ],
|
||||
127 : [ "Twi", "tw" ], # should be an alias to Akan
|
||||
127 : [ "Tahitian", "ty" ],
|
||||
128 : [ "Uigur", "ug" ],
|
||||
129 : [ "Ukrainian", "uk" ],
|
||||
130 : [ "Urdu", "ur" ],
|
||||
131 : [ "Uzbek", "uz" ],
|
||||
131 : [ "Uzbek", "uz" ], # macrolanguage
|
||||
132 : [ "Vietnamese", "vi" ],
|
||||
133 : [ "Volapuk", "vo" ],
|
||||
134 : [ "Welsh", "cy" ],
|
||||
135 : [ "Wolof", "wo" ],
|
||||
136 : [ "Xhosa", "xh" ],
|
||||
137 : [ "Yiddish", "yi" ],
|
||||
137 : [ "Yiddish", "yi" ], # macrolanguage
|
||||
138 : [ "Yoruba", "yo" ],
|
||||
139 : [ "Zhuang", "za" ],
|
||||
139 : [ "Zhuang", "za" ], # macrolanguage
|
||||
140 : [ "Zulu", "zu" ],
|
||||
141 : [ "Nynorsk", "nn" ],
|
||||
141 : [ "NorwegianNynorsk", "nn" ],
|
||||
142 : [ "Bosnian", "bs" ],
|
||||
143 : [ "Divehi", "dv" ],
|
||||
144 : [ "Manx", "gv" ],
|
||||
145 : [ "Cornish", "kw" ],
|
||||
146 : [ "Akan", "ak" ],
|
||||
146 : [ "Akan", "ak" ], # macrolanguage
|
||||
147 : [ "Konkani", "kok" ],
|
||||
148 : [ "Ga", "gaa" ],
|
||||
149 : [ "Igbo", "ig" ],
|
||||
@ -222,7 +222,7 @@ language_list = {
|
||||
174 : [ "Taroko", "trv" ],
|
||||
175 : [ "Gusii", "guz" ],
|
||||
176 : [ "Taita", "dav" ],
|
||||
177 : [ "Fulah", "ff" ],
|
||||
177 : [ "Fulah", "ff" ], # macrolanguage
|
||||
178 : [ "Kikuyu", "ki" ],
|
||||
179 : [ "Samburu", "saq" ],
|
||||
180 : [ "Sena", "seh" ],
|
||||
@ -260,7 +260,28 @@ language_list = {
|
||||
212 : [ "Central Morocco Tamazight", "tzm" ],
|
||||
213 : [ "Koyraboro Senni", "ses" ],
|
||||
214 : [ "Shambala", "ksb" ],
|
||||
215 : [ "Bodo", "brx" ]
|
||||
215 : [ "Bodo", "brx" ],
|
||||
216 : [ "Avaric", "av" ],
|
||||
217 : [ "Chamorro", "ch" ],
|
||||
218 : [ "Chechen", "ce" ],
|
||||
219 : [ "Church", "cu" ], # macrolanguage
|
||||
220 : [ "Chuvash", "cv" ],
|
||||
221 : [ "Cree", "cr" ], # macrolanguage
|
||||
222 : [ "Haitian", "ht" ],
|
||||
223 : [ "Herero", "hz" ],
|
||||
224 : [ "Hiri Motu", "ho" ],
|
||||
225 : [ "Kanuri", "kr" ], # macrolanguage
|
||||
226 : [ "Komi", "kv" ], # macrolanguage
|
||||
227 : [ "Kongo", "kg" ], # macrolanguage
|
||||
228 : [ "Kwanyama", "kj" ],
|
||||
229 : [ "Limburgish", "li" ],
|
||||
230 : [ "LubaKatanga", "lu" ],
|
||||
231 : [ "Luxembourgish", "lb" ],
|
||||
232 : [ "Navaho", "nv" ],
|
||||
233 : [ "Ndonga", "ng" ],
|
||||
234 : [ "Ojibwa", "oj" ], # macrolanguage
|
||||
235 : [ "Pali", "pi" ], # macrolanguage
|
||||
236 : [ "Walloon", "wa" ]
|
||||
}
|
||||
|
||||
country_list = {
|
||||
@ -296,7 +317,7 @@ country_list = {
|
||||
29 : [ "BouvetIsland", "BV" ],
|
||||
30 : [ "Brazil", "BR" ],
|
||||
31 : [ "BritishIndianOceanTerritory", "IO" ],
|
||||
32 : [ "BruneiDarussalam", "BN" ],
|
||||
32 : [ "Brunei", "BN" ],
|
||||
33 : [ "Bulgaria", "BG" ],
|
||||
34 : [ "BurkinaFaso", "BF" ],
|
||||
35 : [ "Burundi", "BI" ],
|
||||
@ -313,8 +334,8 @@ country_list = {
|
||||
46 : [ "CocosIslands", "CC" ],
|
||||
47 : [ "Colombia", "CO" ],
|
||||
48 : [ "Comoros", "KM" ],
|
||||
49 : [ "DemocraticRepublicOfCongo", "CD" ],
|
||||
50 : [ "PeoplesRepublicOfCongo", "CG" ],
|
||||
49 : [ "CongoKinshasa", "CD" ],
|
||||
50 : [ "CongoBrazzaville", "CG" ],
|
||||
51 : [ "CookIslands", "CK" ],
|
||||
52 : [ "CostaRica", "CR" ],
|
||||
53 : [ "IvoryCoast", "CI" ],
|
||||
@ -336,10 +357,10 @@ country_list = {
|
||||
69 : [ "Ethiopia", "ET" ],
|
||||
70 : [ "FalklandIslands", "FK" ],
|
||||
71 : [ "FaroeIslands", "FO" ],
|
||||
72 : [ "Fiji", "FJ" ],
|
||||
72 : [ "Fiji", "FJ" ],
|
||||
73 : [ "Finland", "FI" ],
|
||||
74 : [ "France", "FR" ],
|
||||
75 : [ "MetropolitanFrance", "FX" ],
|
||||
75 : [ "Guernsey", "GG" ],
|
||||
76 : [ "FrenchGuiana", "GF" ],
|
||||
77 : [ "FrenchPolynesia", "PF" ],
|
||||
78 : [ "FrenchSouthernTerritories", "TF" ],
|
||||
@ -377,16 +398,16 @@ country_list = {
|
||||
110 : [ "Kazakhstan", "KZ" ],
|
||||
111 : [ "Kenya", "KE" ],
|
||||
112 : [ "Kiribati", "KI" ],
|
||||
113 : [ "DemocraticRepublicOfKorea", "KP" ],
|
||||
114 : [ "RepublicOfKorea", "KR" ],
|
||||
113 : [ "NorthKorea", "KP" ],
|
||||
114 : [ "SouthKorea", "KR" ],
|
||||
115 : [ "Kuwait", "KW" ],
|
||||
116 : [ "Kyrgyzstan", "KG" ],
|
||||
117 : [ "Lao", "LA" ],
|
||||
117 : [ "Laos", "LA" ],
|
||||
118 : [ "Latvia", "LV" ],
|
||||
119 : [ "Lebanon", "LB" ],
|
||||
120 : [ "Lesotho", "LS" ],
|
||||
121 : [ "Liberia", "LR" ],
|
||||
122 : [ "LibyanArabJamahiriya", "LY" ],
|
||||
122 : [ "Libya", "LY" ],
|
||||
123 : [ "Liechtenstein", "LI" ],
|
||||
124 : [ "Lithuania", "LT" ],
|
||||
125 : [ "Luxembourg", "LU" ],
|
||||
@ -413,7 +434,7 @@ country_list = {
|
||||
146 : [ "Mozambique", "MZ" ],
|
||||
147 : [ "Myanmar", "MM" ],
|
||||
148 : [ "Namibia", "NA" ],
|
||||
149 : [ "Nauru", "NR" ],
|
||||
149 : [ "Nauru", "NR" ],
|
||||
150 : [ "Nepal", "NP" ],
|
||||
151 : [ "Netherlands", "NL" ],
|
||||
152 : [ "NetherlandsAntilles", "AN" ],
|
||||
@ -429,7 +450,7 @@ country_list = {
|
||||
162 : [ "Oman", "OM" ],
|
||||
163 : [ "Pakistan", "PK" ],
|
||||
164 : [ "Palau", "PW" ],
|
||||
165 : [ "PalestinianTerritory", "PS" ],
|
||||
165 : [ "PalestinianTerritories", "PS" ],
|
||||
166 : [ "Panama", "PA" ],
|
||||
167 : [ "PapuaNewGuinea", "PG" ],
|
||||
168 : [ "Paraguay", "PY" ],
|
||||
@ -442,11 +463,11 @@ country_list = {
|
||||
175 : [ "Qatar", "QA" ],
|
||||
176 : [ "Reunion", "RE" ],
|
||||
177 : [ "Romania", "RO" ],
|
||||
178 : [ "RussianFederation", "RU" ],
|
||||
178 : [ "Russia", "RU" ],
|
||||
179 : [ "Rwanda", "RW" ],
|
||||
180 : [ "SaintKittsAndNevis", "KN" ],
|
||||
181 : [ "StLucia", "LC" ],
|
||||
182 : [ "StVincentAndTheGrenadines", "VC" ],
|
||||
181 : [ "SaintLucia", "LC" ],
|
||||
182 : [ "SaintVincentAndTheGrenadines", "VC" ],
|
||||
183 : [ "Samoa", "WS" ],
|
||||
184 : [ "SanMarino", "SM" ],
|
||||
185 : [ "SaoTomeAndPrincipe", "ST" ],
|
||||
@ -463,22 +484,22 @@ country_list = {
|
||||
196 : [ "SouthGeorgiaAndTheSouthSandwichIslands", "GS" ],
|
||||
197 : [ "Spain", "ES" ],
|
||||
198 : [ "SriLanka", "LK" ],
|
||||
199 : [ "StHelena", "SH" ],
|
||||
200 : [ "StPierreAndMiquelon", "PM" ],
|
||||
199 : [ "SaintHelena", "SH" ],
|
||||
200 : [ "SaintPierreAndMiquelon", "PM" ],
|
||||
201 : [ "Sudan", "SD" ],
|
||||
202 : [ "Suriname", "SR" ],
|
||||
203 : [ "SvalbardAndJanMayenIslands", "SJ" ],
|
||||
204 : [ "Swaziland", "SZ" ],
|
||||
205 : [ "Sweden", "SE" ],
|
||||
206 : [ "Switzerland", "CH" ],
|
||||
207 : [ "SyrianArabRepublic", "SY" ],
|
||||
207 : [ "Syria", "SY" ],
|
||||
208 : [ "Taiwan", "TW" ],
|
||||
209 : [ "Tajikistan", "TJ" ],
|
||||
210 : [ "Tanzania", "TZ" ],
|
||||
211 : [ "Thailand", "TH" ],
|
||||
212 : [ "Togo", "TG" ],
|
||||
213 : [ "Tokelau", "TK" ],
|
||||
214 : [ "Tonga", "TO" ],
|
||||
214 : [ "Tonga", "TO" ],
|
||||
215 : [ "TrinidadAndTobago", "TT" ],
|
||||
216 : [ "Tunisia", "TN" ],
|
||||
217 : [ "Turkey", "TR" ],
|
||||
@ -496,21 +517,28 @@ country_list = {
|
||||
229 : [ "Vanuatu", "VU" ],
|
||||
230 : [ "VaticanCityState", "VA" ],
|
||||
231 : [ "Venezuela", "VE" ],
|
||||
232 : [ "VietNam", "VN" ],
|
||||
232 : [ "Vietnam", "VN" ],
|
||||
233 : [ "BritishVirginIslands", "VG" ],
|
||||
234 : [ "USVirginIslands", "VI" ],
|
||||
234 : [ "UnitedStatesVirginIslands", "VI" ],
|
||||
235 : [ "WallisAndFutunaIslands", "WF" ],
|
||||
236 : [ "WesternSahara", "EH" ],
|
||||
237 : [ "Yemen", "YE" ],
|
||||
238 : [ "Yugoslavia", "YU" ],
|
||||
238 : [ "CanaryIslands", "IC" ],
|
||||
239 : [ "Zambia", "ZM" ],
|
||||
240 : [ "Zimbabwe", "ZW" ],
|
||||
241 : [ "SerbiaAndMontenegro", "CS" ],
|
||||
241 : [ "ClippertonIsland", "CP" ],
|
||||
242 : [ "Montenegro", "ME" ],
|
||||
243 : [ "Serbia", "RS" ],
|
||||
244 : [ "Saint Barthelemy", "BL" ],
|
||||
245 : [ "Saint Martin", "MF" ],
|
||||
246 : [ "LatinAmericaAndTheCaribbean", "419" ]
|
||||
246 : [ "LatinAmericaAndTheCaribbean", "419" ],
|
||||
247 : [ "AscensionIsland", "AC" ],
|
||||
248 : [ "AlandIslands", "AX" ],
|
||||
249 : [ "DiegoGarcia", "DG" ],
|
||||
250 : [ "CeutaAndMelilla", "EA" ],
|
||||
251 : [ "IsleOfMan", "IM" ],
|
||||
252 : [ "Jersey", "JE" ],
|
||||
253 : [ "TristanDaCunha", "TA" ]
|
||||
}
|
||||
|
||||
script_list = {
|
||||
|
@ -803,9 +803,19 @@ def main():
|
||||
for key in language_map.keys():
|
||||
language = fixedLanguageName(language_map[key][0], dupes)
|
||||
qlocaleh_temp_file.write(" " + language + " = " + str(key) + ",\n")
|
||||
# special cases for norwegian. we really need to make it right at some point.
|
||||
qlocaleh_temp_file.write(" NorwegianBokmal = Norwegian,\n")
|
||||
qlocaleh_temp_file.write(" NorwegianNynorsk = Nynorsk,\n")
|
||||
# legacy. should disappear at some point
|
||||
qlocaleh_temp_file.write(" Norwegian = NorwegianBokmal,\n")
|
||||
qlocaleh_temp_file.write(" Moldavian = Romanian,\n")
|
||||
qlocaleh_temp_file.write(" SerboCroatian = Serbian,\n")
|
||||
qlocaleh_temp_file.write(" Tagalog = Filipino,\n")
|
||||
qlocaleh_temp_file.write(" Twi = Akan,\n")
|
||||
# renamings
|
||||
qlocaleh_temp_file.write(" Afan = Oromo,\n")
|
||||
qlocaleh_temp_file.write(" Byelorussian = Belarusian,\n")
|
||||
qlocaleh_temp_file.write(" Bhutani = Dzongkha,\n")
|
||||
qlocaleh_temp_file.write(" Cambodian = Khmer,\n")
|
||||
qlocaleh_temp_file.write(" Kurundi = Rundi,\n")
|
||||
qlocaleh_temp_file.write(" RhaetoRomance = Romansh,\n")
|
||||
qlocaleh_temp_file.write(" LastLanguage = " + language + "\n")
|
||||
qlocaleh_temp_file.write(" };\n")
|
||||
|
||||
@ -817,6 +827,7 @@ def main():
|
||||
for key in script_map.keys():
|
||||
script = fixedScriptName(script_map[key][0], dupes)
|
||||
qlocaleh_temp_file.write(" " + script + " = " + str(key) + ",\n")
|
||||
# renamings
|
||||
qlocaleh_temp_file.write(" SimplifiedChineseScript = SimplifiedHanScript,\n")
|
||||
qlocaleh_temp_file.write(" TraditionalChineseScript = TraditionalHanScript,\n")
|
||||
qlocaleh_temp_file.write(" LastScript = " + script + "\n")
|
||||
@ -828,6 +839,13 @@ def main():
|
||||
for key in country_map.keys():
|
||||
country = fixedCountryName(country_map[key][0], dupes)
|
||||
qlocaleh_temp_file.write(" " + country + " = " + str(key) + ",\n")
|
||||
# renamings
|
||||
qlocaleh_temp_file.write(" DemocraticRepublicOfCongo = CongoKinshasa,\n")
|
||||
qlocaleh_temp_file.write(" PeoplesRepublicOfCongo = CongoBrazzaville,\n")
|
||||
qlocaleh_temp_file.write(" DemocraticRepublicOfKorea = NorthKorea,\n")
|
||||
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(" LastCountry = " + country + "\n")
|
||||
qlocaleh_temp_file.write(" };\n")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user