Allows translation of country names

This commit is contained in:
ngosang 2015-08-30 15:09:15 +02:00
parent 735b1cc6b9
commit c984902fbf

View file

@ -146,264 +146,264 @@ QString GeoIPManager::CountryName(const QString &countryISOCode)
static bool initialized = false; static bool initialized = false;
if (!initialized) { if (!initialized) {
countries[QString()] = "N/A"; countries[QString()] = tr("N/A");
countries["AP"] = "Asia/Pacific Region"; countries["AP"] = tr("Asia/Pacific Region");
countries["EU"] = "Europe"; countries["EU"] = tr("Europe");
countries["AD"] = "Andorra"; countries["AD"] = tr("Andorra");
countries["AE"] = "United Arab Emirates"; countries["AE"] = tr("United Arab Emirates");
countries["AF"] = "Afghanistan"; countries["AF"] = tr("Afghanistan");
countries["AG"] = "Antigua and Barbuda"; countries["AG"] = tr("Antigua and Barbuda");
countries["AI"] = "Anguilla"; countries["AI"] = tr("Anguilla");
countries["AL"] = "Albania"; countries["AL"] = tr("Albania");
countries["AM"] = "Armenia"; countries["AM"] = tr("Armenia");
countries["AN"] = "Netherlands Antilles"; countries["AN"] = tr("Netherlands Antilles");
countries["AO"] = "Angola"; countries["AO"] = tr("Angola");
countries["AQ"] = "Antarctica"; countries["AQ"] = tr("Antarctica");
countries["AR"] = "Argentina"; countries["AR"] = tr("Argentina");
countries["AS"] = "American Samoa"; countries["AS"] = tr("American Samoa");
countries["AT"] = "Austria"; countries["AT"] = tr("Austria");
countries["AU"] = "Australia"; countries["AU"] = tr("Australia");
countries["AW"] = "Aruba"; countries["AW"] = tr("Aruba");
countries["AZ"] = "Azerbaijan"; countries["AZ"] = tr("Azerbaijan");
countries["BA"] = "Bosnia and Herzegovina"; countries["BA"] = tr("Bosnia and Herzegovina");
countries["BB"] = "Barbados"; countries["BB"] = tr("Barbados");
countries["BD"] = "Bangladesh"; countries["BD"] = tr("Bangladesh");
countries["BE"] = "Belgium"; countries["BE"] = tr("Belgium");
countries["BF"] = "Burkina Faso"; countries["BF"] = tr("Burkina Faso");
countries["BG"] = "Bulgaria"; countries["BG"] = tr("Bulgaria");
countries["BH"] = "Bahrain"; countries["BH"] = tr("Bahrain");
countries["BI"] = "Burundi"; countries["BI"] = tr("Burundi");
countries["BJ"] = "Benin"; countries["BJ"] = tr("Benin");
countries["BM"] = "Bermuda"; countries["BM"] = tr("Bermuda");
countries["BN"] = "Brunei Darussalam"; countries["BN"] = tr("Brunei Darussalam");
countries["BO"] = "Bolivia"; countries["BO"] = tr("Bolivia");
countries["BR"] = "Brazil"; countries["BR"] = tr("Brazil");
countries["BS"] = "Bahamas"; countries["BS"] = tr("Bahamas");
countries["BT"] = "Bhutan"; countries["BT"] = tr("Bhutan");
countries["BV"] = "Bouvet Island"; countries["BV"] = tr("Bouvet Island");
countries["BW"] = "Botswana"; countries["BW"] = tr("Botswana");
countries["BY"] = "Belarus"; countries["BY"] = tr("Belarus");
countries["BZ"] = "Belize"; countries["BZ"] = tr("Belize");
countries["CA"] = "Canada"; countries["CA"] = tr("Canada");
countries["CC"] = "Cocos (Keeling) Islands"; countries["CC"] = tr("Cocos (Keeling) Islands");
countries["CD"] = "Congo, The Democratic Republic of the"; countries["CD"] = tr("Congo, The Democratic Republic of the");
countries["CF"] = "Central African Republic"; countries["CF"] = tr("Central African Republic");
countries["CG"] = "Congo"; countries["CG"] = tr("Congo");
countries["CH"] = "Switzerland"; countries["CH"] = tr("Switzerland");
countries["CI"] = "Cote D'Ivoire"; countries["CI"] = tr("Cote D'Ivoire");
countries["CK"] = "Cook Islands"; countries["CK"] = tr("Cook Islands");
countries["CL"] = "Chile"; countries["CL"] = tr("Chile");
countries["CM"] = "Cameroon"; countries["CM"] = tr("Cameroon");
countries["CN"] = "China"; countries["CN"] = tr("China");
countries["CO"] = "Colombia"; countries["CO"] = tr("Colombia");
countries["CR"] = "Costa Rica"; countries["CR"] = tr("Costa Rica");
countries["CU"] = "Cuba"; countries["CU"] = tr("Cuba");
countries["CV"] = "Cape Verde"; countries["CV"] = tr("Cape Verde");
countries["CX"] = "Christmas Island"; countries["CX"] = tr("Christmas Island");
countries["CY"] = "Cyprus"; countries["CY"] = tr("Cyprus");
countries["CZ"] = "Czech Republic"; countries["CZ"] = tr("Czech Republic");
countries["DE"] = "Germany"; countries["DE"] = tr("Germany");
countries["DJ"] = "Djibouti"; countries["DJ"] = tr("Djibouti");
countries["DK"] = "Denmark"; countries["DK"] = tr("Denmark");
countries["DM"] = "Dominica"; countries["DM"] = tr("Dominica");
countries["DO"] = "Dominican Republic"; countries["DO"] = tr("Dominican Republic");
countries["DZ"] = "Algeria"; countries["DZ"] = tr("Algeria");
countries["EC"] = "Ecuador"; countries["EC"] = tr("Ecuador");
countries["EE"] = "Estonia"; countries["EE"] = tr("Estonia");
countries["EG"] = "Egypt"; countries["EG"] = tr("Egypt");
countries["EH"] = "Western Sahara"; countries["EH"] = tr("Western Sahara");
countries["ER"] = "Eritrea"; countries["ER"] = tr("Eritrea");
countries["ES"] = "Spain"; countries["ES"] = tr("Spain");
countries["ET"] = "Ethiopia"; countries["ET"] = tr("Ethiopia");
countries["FI"] = "Finland"; countries["FI"] = tr("Finland");
countries["FJ"] = "Fiji"; countries["FJ"] = tr("Fiji");
countries["FK"] = "Falkland Islands (Malvinas)"; countries["FK"] = tr("Falkland Islands (Malvinas)");
countries["FM"] = "Micronesia, Federated States of"; countries["FM"] = tr("Micronesia, Federated States of");
countries["FO"] = "Faroe Islands"; countries["FO"] = tr("Faroe Islands");
countries["FR"] = "France"; countries["FR"] = tr("France");
countries["FX"] = "France, Metropolitan"; countries["FX"] = tr("France, Metropolitan");
countries["GA"] = "Gabon"; countries["GA"] = tr("Gabon");
countries["GB"] = "United Kingdom"; countries["GB"] = tr("United Kingdom");
countries["GD"] = "Grenada"; countries["GD"] = tr("Grenada");
countries["GE"] = "Georgia"; countries["GE"] = tr("Georgia");
countries["GF"] = "French Guiana"; countries["GF"] = tr("French Guiana");
countries["GH"] = "Ghana"; countries["GH"] = tr("Ghana");
countries["GI"] = "Gibraltar"; countries["GI"] = tr("Gibraltar");
countries["GL"] = "Greenland"; countries["GL"] = tr("Greenland");
countries["GM"] = "Gambia"; countries["GM"] = tr("Gambia");
countries["GN"] = "Guinea"; countries["GN"] = tr("Guinea");
countries["GP"] = "Guadeloupe"; countries["GP"] = tr("Guadeloupe");
countries["GQ"] = "Equatorial Guinea"; countries["GQ"] = tr("Equatorial Guinea");
countries["GR"] = "Greece"; countries["GR"] = tr("Greece");
countries["GS"] = "South Georgia and the South Sandwich Islands"; countries["GS"] = tr("South Georgia and the South Sandwich Islands");
countries["GT"] = "Guatemala"; countries["GT"] = tr("Guatemala");
countries["GU"] = "Guam"; countries["GU"] = tr("Guam");
countries["GW"] = "Guinea-Bissau"; countries["GW"] = tr("Guinea-Bissau");
countries["GY"] = "Guyana"; countries["GY"] = tr("Guyana");
countries["HK"] = "Hong Kong"; countries["HK"] = tr("Hong Kong");
countries["HM"] = "Heard Island and McDonald Islands"; countries["HM"] = tr("Heard Island and McDonald Islands");
countries["HN"] = "Honduras"; countries["HN"] = tr("Honduras");
countries["HR"] = "Croatia"; countries["HR"] = tr("Croatia");
countries["HT"] = "Haiti"; countries["HT"] = tr("Haiti");
countries["HU"] = "Hungary"; countries["HU"] = tr("Hungary");
countries["ID"] = "Indonesia"; countries["ID"] = tr("Indonesia");
countries["IE"] = "Ireland"; countries["IE"] = tr("Ireland");
countries["IL"] = "Israel"; countries["IL"] = tr("Israel");
countries["IN"] = "India"; countries["IN"] = tr("India");
countries["IO"] = "British Indian Ocean Territory"; countries["IO"] = tr("British Indian Ocean Territory");
countries["IQ"] = "Iraq"; countries["IQ"] = tr("Iraq");
countries["IR"] = "Iran, Islamic Republic of"; countries["IR"] = tr("Iran, Islamic Republic of");
countries["IS"] = "Iceland"; countries["IS"] = tr("Iceland");
countries["IT"] = "Italy"; countries["IT"] = tr("Italy");
countries["JM"] = "Jamaica"; countries["JM"] = tr("Jamaica");
countries["JO"] = "Jordan"; countries["JO"] = tr("Jordan");
countries["JP"] = "Japan"; countries["JP"] = tr("Japan");
countries["KE"] = "Kenya"; countries["KE"] = tr("Kenya");
countries["KG"] = "Kyrgyzstan"; countries["KG"] = tr("Kyrgyzstan");
countries["KH"] = "Cambodia"; countries["KH"] = tr("Cambodia");
countries["KI"] = "Kiribati"; countries["KI"] = tr("Kiribati");
countries["KM"] = "Comoros"; countries["KM"] = tr("Comoros");
countries["KN"] = "Saint Kitts and Nevis"; countries["KN"] = tr("Saint Kitts and Nevis");
countries["KP"] = "Korea, Democratic People's Republic of"; countries["KP"] = tr("Korea, Democratic People's Republic of");
countries["KR"] = "Korea, Republic of"; countries["KR"] = tr("Korea, Republic of");
countries["KW"] = "Kuwait"; countries["KW"] = tr("Kuwait");
countries["KY"] = "Cayman Islands"; countries["KY"] = tr("Cayman Islands");
countries["KZ"] = "Kazakhstan"; countries["KZ"] = tr("Kazakhstan");
countries["LA"] = "Lao People's Democratic Republic"; countries["LA"] = tr("Lao People's Democratic Republic");
countries["LB"] = "Lebanon"; countries["LB"] = tr("Lebanon");
countries["LC"] = "Saint Lucia"; countries["LC"] = tr("Saint Lucia");
countries["LI"] = "Liechtenstein"; countries["LI"] = tr("Liechtenstein");
countries["LK"] = "Sri Lanka"; countries["LK"] = tr("Sri Lanka");
countries["LR"] = "Liberia"; countries["LR"] = tr("Liberia");
countries["LS"] = "Lesotho"; countries["LS"] = tr("Lesotho");
countries["LT"] = "Lithuania"; countries["LT"] = tr("Lithuania");
countries["LU"] = "Luxembourg"; countries["LU"] = tr("Luxembourg");
countries["LV"] = "Latvia"; countries["LV"] = tr("Latvia");
countries["LY"] = "Libyan Arab Jamahiriya"; countries["LY"] = tr("Libyan Arab Jamahiriya");
countries["MA"] = "Morocco"; countries["MA"] = tr("Morocco");
countries["MC"] = "Monaco"; countries["MC"] = tr("Monaco");
countries["MD"] = "Moldova, Republic of"; countries["MD"] = tr("Moldova, Republic of");
countries["MG"] = "Madagascar"; countries["MG"] = tr("Madagascar");
countries["MH"] = "Marshall Islands"; countries["MH"] = tr("Marshall Islands");
countries["MK"] = "Macedonia"; countries["MK"] = tr("Macedonia");
countries["ML"] = "Mali"; countries["ML"] = tr("Mali");
countries["MM"] = "Myanmar"; countries["MM"] = tr("Myanmar");
countries["MN"] = "Mongolia"; countries["MN"] = tr("Mongolia");
countries["MO"] = "Macau"; countries["MO"] = tr("Macau");
countries["MP"] = "Northern Mariana Islands"; countries["MP"] = tr("Northern Mariana Islands");
countries["MQ"] = "Martinique"; countries["MQ"] = tr("Martinique");
countries["MR"] = "Mauritania"; countries["MR"] = tr("Mauritania");
countries["MS"] = "Montserrat"; countries["MS"] = tr("Montserrat");
countries["MT"] = "Malta"; countries["MT"] = tr("Malta");
countries["MU"] = "Mauritius"; countries["MU"] = tr("Mauritius");
countries["MV"] = "Maldives"; countries["MV"] = tr("Maldives");
countries["MW"] = "Malawi"; countries["MW"] = tr("Malawi");
countries["MX"] = "Mexico"; countries["MX"] = tr("Mexico");
countries["MY"] = "Malaysia"; countries["MY"] = tr("Malaysia");
countries["MZ"] = "Mozambique"; countries["MZ"] = tr("Mozambique");
countries["NA"] = "Namibia"; countries["NA"] = tr("Namibia");
countries["NC"] = "New Caledonia"; countries["NC"] = tr("New Caledonia");
countries["NE"] = "Niger"; countries["NE"] = tr("Niger");
countries["NF"] = "Norfolk Island"; countries["NF"] = tr("Norfolk Island");
countries["NG"] = "Nigeria"; countries["NG"] = tr("Nigeria");
countries["NI"] = "Nicaragua"; countries["NI"] = tr("Nicaragua");
countries["NL"] = "Netherlands"; countries["NL"] = tr("Netherlands");
countries["NO"] = "Norway"; countries["NO"] = tr("Norway");
countries["NP"] = "Nepal"; countries["NP"] = tr("Nepal");
countries["NR"] = "Nauru"; countries["NR"] = tr("Nauru");
countries["NU"] = "Niue"; countries["NU"] = tr("Niue");
countries["NZ"] = "New Zealand"; countries["NZ"] = tr("New Zealand");
countries["OM"] = "Oman"; countries["OM"] = tr("Oman");
countries["PA"] = "Panama"; countries["PA"] = tr("Panama");
countries["PE"] = "Peru"; countries["PE"] = tr("Peru");
countries["PF"] = "French Polynesia"; countries["PF"] = tr("French Polynesia");
countries["PG"] = "Papua New Guinea"; countries["PG"] = tr("Papua New Guinea");
countries["PH"] = "Philippines"; countries["PH"] = tr("Philippines");
countries["PK"] = "Pakistan"; countries["PK"] = tr("Pakistan");
countries["PL"] = "Poland"; countries["PL"] = tr("Poland");
countries["PM"] = "Saint Pierre and Miquelon"; countries["PM"] = tr("Saint Pierre and Miquelon");
countries["PN"] = "Pitcairn Islands"; countries["PN"] = tr("Pitcairn Islands");
countries["PR"] = "Puerto Rico"; countries["PR"] = tr("Puerto Rico");
countries["PS"] = "Palestinian Territory"; countries["PS"] = tr("Palestinian Territory");
countries["PT"] = "Portugal"; countries["PT"] = tr("Portugal");
countries["PW"] = "Palau"; countries["PW"] = tr("Palau");
countries["PY"] = "Paraguay"; countries["PY"] = tr("Paraguay");
countries["QA"] = "Qatar"; countries["QA"] = tr("Qatar");
countries["RE"] = "Reunion"; countries["RE"] = tr("Reunion");
countries["RO"] = "Romania"; countries["RO"] = tr("Romania");
countries["RU"] = "Russian Federation"; countries["RU"] = tr("Russian Federation");
countries["RW"] = "Rwanda"; countries["RW"] = tr("Rwanda");
countries["SA"] = "Saudi Arabia"; countries["SA"] = tr("Saudi Arabia");
countries["SB"] = "Solomon Islands"; countries["SB"] = tr("Solomon Islands");
countries["SC"] = "Seychelles"; countries["SC"] = tr("Seychelles");
countries["SD"] = "Sudan"; countries["SD"] = tr("Sudan");
countries["SE"] = "Sweden"; countries["SE"] = tr("Sweden");
countries["SG"] = "Singapore"; countries["SG"] = tr("Singapore");
countries["SH"] = "Saint Helena"; countries["SH"] = tr("Saint Helena");
countries["SI"] = "Slovenia"; countries["SI"] = tr("Slovenia");
countries["SJ"] = "Svalbard and Jan Mayen"; countries["SJ"] = tr("Svalbard and Jan Mayen");
countries["SK"] = "Slovakia"; countries["SK"] = tr("Slovakia");
countries["SL"] = "Sierra Leone"; countries["SL"] = tr("Sierra Leone");
countries["SM"] = "San Marino"; countries["SM"] = tr("San Marino");
countries["SN"] = "Senegal"; countries["SN"] = tr("Senegal");
countries["SO"] = "Somalia"; countries["SO"] = tr("Somalia");
countries["SR"] = "Suriname"; countries["SR"] = tr("Suriname");
countries["ST"] = "Sao Tome and Principe"; countries["ST"] = tr("Sao Tome and Principe");
countries["SV"] = "El Salvador"; countries["SV"] = tr("El Salvador");
countries["SY"] = "Syrian Arab Republic"; countries["SY"] = tr("Syrian Arab Republic");
countries["SZ"] = "Swaziland"; countries["SZ"] = tr("Swaziland");
countries["TC"] = "Turks and Caicos Islands"; countries["TC"] = tr("Turks and Caicos Islands");
countries["TD"] = "Chad"; countries["TD"] = tr("Chad");
countries["TF"] = "French Southern Territories"; countries["TF"] = tr("French Southern Territories");
countries["TG"] = "Togo"; countries["TG"] = tr("Togo");
countries["TH"] = "Thailand"; countries["TH"] = tr("Thailand");
countries["TJ"] = "Tajikistan"; countries["TJ"] = tr("Tajikistan");
countries["TK"] = "Tokelau"; countries["TK"] = tr("Tokelau");
countries["TM"] = "Turkmenistan"; countries["TM"] = tr("Turkmenistan");
countries["TN"] = "Tunisia"; countries["TN"] = tr("Tunisia");
countries["TO"] = "Tonga"; countries["TO"] = tr("Tonga");
countries["TL"] = "Timor-Leste"; countries["TL"] = tr("Timor-Leste");
countries["TR"] = "Turkey"; countries["TR"] = tr("Turkey");
countries["TT"] = "Trinidad and Tobago"; countries["TT"] = tr("Trinidad and Tobago");
countries["TV"] = "Tuvalu"; countries["TV"] = tr("Tuvalu");
countries["TW"] = "Taiwan"; countries["TW"] = tr("Taiwan");
countries["TZ"] = "Tanzania, United Republic of"; countries["TZ"] = tr("Tanzania, United Republic of");
countries["UA"] = "Ukraine"; countries["UA"] = tr("Ukraine");
countries["UG"] = "Uganda"; countries["UG"] = tr("Uganda");
countries["UM"] = "United States Minor Outlying Islands"; countries["UM"] = tr("United States Minor Outlying Islands");
countries["US"] = "United States"; countries["US"] = tr("United States");
countries["UY"] = "Uruguay"; countries["UY"] = tr("Uruguay");
countries["UZ"] = "Uzbekistan"; countries["UZ"] = tr("Uzbekistan");
countries["VA"] = "Holy See (Vatican City State)"; countries["VA"] = tr("Holy See (Vatican City State)");
countries["VC"] = "Saint Vincent and the Grenadines"; countries["VC"] = tr("Saint Vincent and the Grenadines");
countries["VE"] = "Venezuela"; countries["VE"] = tr("Venezuela");
countries["VG"] = "Virgin Islands, British"; countries["VG"] = tr("Virgin Islands, British");
countries["VI"] = "Virgin Islands, U.S."; countries["VI"] = tr("Virgin Islands, U.S.");
countries["VN"] = "Vietnam"; countries["VN"] = tr("Vietnam");
countries["VU"] = "Vanuatu"; countries["VU"] = tr("Vanuatu");
countries["WF"] = "Wallis and Futuna"; countries["WF"] = tr("Wallis and Futuna");
countries["WS"] = "Samoa"; countries["WS"] = tr("Samoa");
countries["YE"] = "Yemen"; countries["YE"] = tr("Yemen");
countries["YT"] = "Mayotte"; countries["YT"] = tr("Mayotte");
countries["RS"] = "Serbia"; countries["RS"] = tr("Serbia");
countries["ZA"] = "South Africa"; countries["ZA"] = tr("South Africa");
countries["ZM"] = "Zambia"; countries["ZM"] = tr("Zambia");
countries["ME"] = "Montenegro"; countries["ME"] = tr("Montenegro");
countries["ZW"] = "Zimbabwe"; countries["ZW"] = tr("Zimbabwe");
countries["A1"] = "Anonymous Proxy"; countries["A1"] = tr("Anonymous Proxy");
countries["A2"] = "Satellite Provider"; countries["A2"] = tr("Satellite Provider");
countries["O1"] = "Other"; countries["O1"] = tr("Other");
countries["AX"] = "Aland Islands"; countries["AX"] = tr("Aland Islands");
countries["GG"] = "Guernsey"; countries["GG"] = tr("Guernsey");
countries["IM"] = "Isle of Man"; countries["IM"] = tr("Isle of Man");
countries["JE"] = "Jersey"; countries["JE"] = tr("Jersey");
countries["BL"] = "Saint Barthelemy"; countries["BL"] = tr("Saint Barthelemy");
countries["MF"] = "Saint Martin"; countries["MF"] = tr("Saint Martin");
initialized = true; initialized = true;
} }
return countries.value(countryISOCode, "N/A"); return countries.value(countryISOCode, tr("N/A"));
} }
void GeoIPManager::configure() void GeoIPManager::configure()