ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04160
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app.
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1477492 in Ubuntu Clock App: "Cities not translated on the main clock page if language is switched"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1477492
For more details, see:
https://code.launchpad.net/~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix/+merge/266153
Initial work for proper localization of city names:
Save CityId in User database instead of localized name
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app.
=== modified file 'app/worldclock/UserWorldCityDelegate.qml'
--- app/worldclock/UserWorldCityDelegate.qml 2015-05-27 16:03:23 +0000
+++ app/worldclock/UserWorldCityDelegate.qml 2015-08-11 10:31:19 +0000
@@ -52,7 +52,7 @@
}
Label {
- text: model.city
+ text: model.cityName
objectName: "userCityNameText"
width: parent.width
elide: Text.ElideRight
=== modified file 'app/worldclock/WorldCityList.qml'
--- app/worldclock/WorldCityList.qml 2015-07-24 13:16:28 +0000
+++ app/worldclock/WorldCityList.qml 2015-08-11 10:31:19 +0000
@@ -196,9 +196,9 @@
}
}
- sort.property: "city"
+ sort.property: "cityName"
sort.order: Qt.AscendingOrder
- filter.property: "city"
+ filter.property: "cityName"
filter.pattern: searchComponentLoader.status === Loader.Ready ? RegExp(searchComponentLoader.item.text, "gi")
: RegExp("", "gi")
}
@@ -266,24 +266,24 @@
id: cityList
objectName: "cityList"
- function addWorldCity(city, country, timezone) {
- console.log("[LOG]: Adding city to U1db Database")
+ function addWorldCity(cityId, country, timezone) {
+ console.log("[LOG]: Adding " + cityId.toString() + " city to U1db Database")
clockDB.putDoc
(
{
"worldlocation":
{
- "city": city,
+ "city": cityId,
"country": country,
"timezone": timezone
}
},
- encodeURIComponent(city + "_" + country)
+ encodeURIComponent(cityId + "_" + country)
)
}
function getSectionText(index) {
- return sortedTimeZoneModel.get(index).city.substring(0,1)
+ return sortedTimeZoneModel.get(index).cityName.substring(0,1)
}
onFlickStarted: {
@@ -299,7 +299,7 @@
clip: true
- section.property: "city"
+ section.property: "cityName"
section.criteria: ViewSection.FirstCharacter
section.labelPositioning: ViewSection.InlineLabels
@@ -334,7 +334,7 @@
}
Label {
- text: city
+ text: cityName
objectName: "defaultCityNameText"
width: parent.width
elide: Text.ElideRight
@@ -363,10 +363,10 @@
onClicked: {
var tempCountry = country.split(",")
if(tempCountry.length > 2) {
- cityList.addWorldCity(city, tempCountry[1] + ","
+ cityList.addWorldCity(cityId, tempCountry[1] + ","
+ tempCountry[2], timezoneID)
} else {
- cityList.addWorldCity(city, country, timezoneID)
+ cityList.addWorldCity(cityId, country, timezoneID)
}
mainStack.pop()
=== modified file 'backend/modules/Timezone/generictimezonemodel.cpp'
--- backend/modules/Timezone/generictimezonemodel.cpp 2014-08-10 13:06:37 +0000
+++ backend/modules/Timezone/generictimezonemodel.cpp 2015-08-11 10:31:19 +0000
@@ -17,6 +17,7 @@
*/
#include "generictimezonemodel.h"
+#include "statictimezonemodel.h"
#include <QDebug>
@@ -63,10 +64,21 @@
Cycle through the u1db query model results and transfer them to the
TimeZone list.
*/
+ StaticTimeZoneModel timeZonesData;
for (int i=0; i < m_results.size(); i++) {
// Map query model results to timezone tz
- tz.cityName = m_results.value(i).toMap().value("city").toString();
- tz.country = m_results.value(i).toMap().value("country").toString();
+ tz.cityId = m_results.value(i).toMap().value("city").toString();
+
+ QPair<QString, QString> trandslatedCityData = timeZonesData.getTranslatedCityName(tz.cityId);
+ if (trandslatedCityData.first == "") {
+ tz.cityName = tz.cityId;
+ tz.country = m_results.value(i).toMap().value("country").toString();
+ }
+ else
+ {
+ tz.cityName = trandslatedCityData.first;
+ tz.country = trandslatedCityData.second;
+ }
tz.timeZone = QTimeZone(m_results.value(i).toMap().value("timezone").toString().toLatin1());
m_timeZones.append(tz);
=== modified file 'backend/modules/Timezone/jsontimezonemodel.cpp'
--- backend/modules/Timezone/jsontimezonemodel.cpp 2014-08-17 10:50:57 +0000
+++ backend/modules/Timezone/jsontimezonemodel.cpp 2015-08-11 10:31:19 +0000
@@ -97,7 +97,8 @@
auto admin2 = data.value("admin2").toString();
auto country = data.value("country").toString();
- tz.cityName = data.value("name").toString();
+ tz.cityId = data.value("name").toString();
+ tz.cityName = tz.cityId;
if (!admin1.isEmpty() && !admin2.isEmpty()) {
tz.country = QString("%1, %2, %3").arg(admin2).arg(admin1).arg(country);
=== modified file 'backend/modules/Timezone/statictimezonemodel.cpp'
--- backend/modules/Timezone/statictimezonemodel.cpp 2015-03-31 13:44:52 +0000
+++ backend/modules/Timezone/statictimezonemodel.cpp 2015-08-11 10:31:19 +0000
@@ -29,9 +29,10 @@
loadDefaultCityList();
}
-void StaticTimeZoneModel::addCity(const QString &city, const QString &timezone, const QString &country) {
+void StaticTimeZoneModel::addCity(const QString &cityId, const QString &cityName, const QString &timezone, const QString &country) {
TimeZone tz;
- tz.cityName = city;
+ tz.cityId = cityId;
+ tz.cityName = cityName;
tz.country = country;
tz.timeZone = QTimeZone(timezone.toLatin1());
m_timeZones.append(tz);
@@ -44,307 +45,322 @@
m_timeZones.clear();
- addCity(_("Abidjan"), "Africa/Abidjan", _("Ivory Coast"));
- addCity(_("Accra"), "Africa/Accra", _("Ghana"));
- addCity(_("Addis Ababa"), "Africa/Addis_Ababa", _("Ethiopia"));
- addCity(_("Adelaide"), "Australia/Adelaide", _("Australia"));
- addCity(_("Albuquerque"), "America/Denver", _("United States"));
- addCity(_("Algiers"), "Africa/Algiers", _("Algeria"));
- addCity(_("Almaty"), "Asia/Almaty", _("Kazakhstan"));
- addCity(_("Amman"), "Asia/Amman", _("Jordan"));
- addCity(_("Amsterdam"), "Europe/Amsterdam", _("Netherlands"));
- addCity(_("Anadyr"), "Asia/Anadyr", _("Russia"));
- addCity(_("Anchorage"), "America/Anchorage", _("United States"));
- addCity(_("Andorra"), "Europe/Andorra", _("Andorra"));
- addCity(_("Ankara"), "Europe/Istanbul", _("Turkey"));
- addCity(_("Ann Arbor"), "America/Detroit", _("United States"));
- addCity(_("Antananarivo"), "Indian/Antananarivo", _("Madagascar"));
- addCity(_("Aqtau"), "Asia/Aqtau", _("Kazakhstan"));
- addCity(_("Aruba"), "America/Aruba", _("Aruba"));
- addCity(_("Asunción"), "America/Asuncion", _("Paraguay"));
- addCity(_("Athens"), "Europe/Athens", _("Greece"));
- addCity(_("Atlanta"), "America/New_York", _("United States"));
- addCity(_("Auckland"), "Pacific/Auckland", _("New Zealand"));
- addCity(_("Austin"), "America/Chicago", _("United States"));
-
- addCity(_("Baghdad"), "Asia/Baghdad", _("Iraq"));
- addCity(_("Bahrain"), "Asia/Bahrain", _("Bahrain"));
- addCity(_("Baku"), "Asia/Baku", _("Azerbaijan"));
- addCity(_("Baltimore"), "America/New_York", _("United States"));
- addCity(_("Bangalore"), "Asia/Kolkata", _("India"));
- addCity(_("Bangkok"), "Asia/Bangkok", _("Thailand"));
- addCity(_("Barbados"), "America/Barbados", _("Barbados"));
- addCity(_("Barcelona"), "Europe/Madrid", _("Spain"));
- addCity(_("Beijing"), "Asia/Shanghai", _("China"));
- addCity(_("Beirut"), "Asia/Beirut", _("Lebanon"));
- addCity(_("Belfast"), "Europe/Belfast", _("United Kingdom"));
- addCity(_("Belgrade"), "Europe/Belgrade", _("Serbia"));
- addCity(_("Belize"), "America/Belize", _("Belize"));
- addCity(_("Belo Horizonte"), "America/Sao_Paulo", _("Brazil"));
- addCity(_("Berlin"), "Europe/Berlin", _("Germany"));
- addCity(_("Bermuda"), "Atlantic/Bermuda", _("Bermuda"));
- addCity(_("Beulah"), "America/North_Dakota/Beulah", _("United States"));
- addCity(_("Black Rock City"), "America/Chicago", _("United States"));
- addCity(_("Blantyre"), "Africa/Blantyre", _("Malawi"));
- addCity(_("Bogotá"), "America/Bogota", _("Colombia"));
- addCity(_("Boston"), "America/New_York", _("United States"));
- addCity(_("Boulder"), "America/Denver", _("United States"));
- addCity(_("Brasília"), "America/Sao_Paulo", _("Brazil"));
- addCity(_("Bratislava"), "Europe/Bratislava", _("Slovakia"));
- addCity(_("Brazzaville"), "Africa/Brazzaville", _("Republic of the Congo"));
- addCity(_("Brisbane"), "Australia/Brisbane", _("Australia"));
- addCity(_("Brussels"), "Europe/Brussels", _("Belgium"));
- addCity(_("Bucharest"), "Europe/Bucharest", _("Romania"));
- addCity(_("Budapest"), "Europe/Budapest", _("Hungary"));
- addCity(_("Buenos Aires"), "America/Argentina/Buenos_Aires", _("Argentina"));
-
- addCity(_("Cairo"), "Africa/Cairo", _("Egypt"));
- addCity(_("Calcutta"), "Asia/Calcutta", _("India"));
- addCity(_("Calgary"), "America/Edmonton", _("Canada"));
- addCity(_("Cambridge"), "Europe/London", _("United Kingdom"));
- addCity(_("Canary"), "Atlantic/Canary", _("Australia"));
- addCity(_("Canberra"), "Australia/Canberra", _("Australia"));
- addCity(_("Cancún"), "America/Cancun", _("Mexico"));
- addCity(_("Cape Town"), "Africa/Johannesburg", _("South Africa"));
- addCity(_("Caracas"), "America/Caracas", _("Venezuela"));
- addCity(_("Casablanca"), "Africa/Casablanca", _("Morocco"));
- addCity(_("Cayman Palms"), "America/Cayman", _("Cayman Islands"));
- addCity(_("Chicago"), "America/Chicago", _("United States"));
- addCity(_("Chihuahua"), "America/Chihuahua", _("Mexico"));
- addCity(_("Chişinău"), "Europe/Chisinau", _("Moldova"));
- addCity(_("Cincinnati"), "America/New_York", _("United States"));
- addCity(_("Cleveland"), "America/New_York", _("United States"));
- addCity(_("Colombo"), "Asia/Colombo", _("Sri Lanka"));
- addCity(_("Columbus"), "America/New_York", _("United States"));
- addCity(_("Conakry"), "Africa/Conakry", _("Guinea"));
- addCity(_("Copenhagen"), "Europe/Copenhagen", _("Denmark"));
- addCity(_("Costa Rica"), "America/Costa_Rica", _("Costa Rica"));
- addCity(_("Curaçao"), "America/Curacao", _("Curacao"));
-
- addCity(_("Dakar"), "Africa/Dakar", _("Senegal"));
- addCity(_("Dallas"), "America/Chicago", _("United States"));
- addCity(_("Damascus"), "Asia/Damascus", _("Syria"));
- addCity(_("Dar es Salaam"), "Africa/Dar_es_Salaam", _("Tanzania"));
- addCity(_("Darwin"), "Australia/Darwin", _("Australia"));
- addCity(_("Dawson Creek"), "America/Dawson_Creek", _("Canada"));
- addCity(_("Delhi"), "Asia/Kolkata", _("India"));
- addCity(_("Denver"), "America/Denver", _("United States"));
- addCity(_("Detroit"), "America/Detroit", _("United States"));
- addCity(_("Dhaka"), "Asia/Dhaka", _("Bangladesh"));
- addCity(_("Djibouti"), "Africa/Djibouti", _("Djibouti"));
- addCity(_("Doha"), "Asia/Qatar", _("Qatar"));
- addCity(_("Dominica"), "America/Dominica", _("Dominica"));
- addCity(_("Dubai"), "Asia/Dubai", _("United Arab Emirates"));
- addCity(_("Dublin"), "Europe/Dublin", _("Ireland"));
-
- addCity(_("Easter Island"), "Pacific/Easter", _("Chile"));
- addCity(_("Edmonton"), "America/Edmonton", _("Canada"));
- addCity(_("El Salvador"), "America/El_Salvador", _("El Salvador"));
-
- addCity(_("Fiji"), "Pacific/Fiji", _("Fiji"));
- addCity(_("Fortaleza"), "America/Fortaleza", _("Brazil"));
- addCity(_("Frankfurt"), "Europe/Berlin", _("Germany"));
- addCity(_("Freetown"), "Africa/Freetown", _("Sierra Leone"));
-
- addCity(_("Gaborone"), "Africa/Gaborone", _("Botswana"));
- addCity(_("Gaza"), "Asia/Gaza", _("Palestine"));
- addCity(_("Gibraltar"), "Europe/Gibraltar", _("Gibraltar"));
- addCity(_("Grand Turk"), "America/Grand_Turk", _("Turks and Caicos Islands"));
- addCity(_("Grenada"), "America/Grenada", _("Grenada"));
- addCity(_("Guam"), "Pacific/Guam", _("Guam"));
- addCity(_("Guangzhou"), "Asia/Shanghai", _("China"));
- addCity(_("Guatemala"), "America/Guatemala", _("Guatemala"));
- addCity(_("Gurgaon"), "Asia/Kolkata", _("India"));
- addCity(_("Guyana"), "America/Guyana", _("Guyana"));
-
- addCity(_("Haifa"), "Asia/Jerusalem", _("Israel"));
- addCity(_("Halifax"), "America/Halifax", _("Canada"));
- addCity(_("Hamburg"), "Europe/Berlin", _("Germany"));
- addCity(_("Hanoi"), "Asia/Ho_Chi_Minh", _("Vietnam"));
- addCity(_("Harare"), "Africa/Harare", _("Zimbabwe"));
- addCity(_("Havana"), "America/Havana", _("Cuba"));
- addCity(_("Hebron"), "Asia/Hebron", _("Palestine"));
- addCity(_("Helsinki"), "Europe/Helsinki", _("Finland"));
- addCity(_("Ho Chi Minh City"), "Asia/Ho_Chi_Minh", _("Vietnam"));
- addCity(_("Hong Kong"), "Asia/Hong_Kong", _("Hong Kong"));
- addCity(_("Honolulu"), "Pacific/Honolulu", _("United States"));
- addCity(_("Houston"), "America/Chicago", _("United States"));
- addCity(_("Hyderabad"), "Asia/Kolkata", _("India"));
-
- addCity(_("Indianapolis"), "America/Indiana/Indianapolis", _("United States"));
- addCity(_("Islamabad"), "Asia/Karachi", _("Pakistan"));
- addCity(_("Isle of Man"), "Europe/Isle_of_Man", _("Isle of Man"));
- addCity(_("Istanbul"), "Europe/Istanbul", _("Turkey"));
-
- addCity(_("Jacksonville"), "America/New_York", _("United States"));
- addCity(_("Jakarta"), "Asia/Jakarta", _("Indonesia"));
- addCity(_("Jerusalem"), "Asia/Jerusalem", _("Israel"));
- addCity(_("Johannesburg"), "Africa/Johannesburg", _("South Africa"));
-
- addCity(_("Kabul"), "Asia/Kabul", _("Afghanistan"));
- addCity(_("Kampala"), "Africa/Kampala", _("Uganda"));
- addCity(_("Karachi"), "Asia/Karachi", _("Pakistan"));
- addCity(_("Khartoum"), "Africa/Khartoum", _("Sudan"));
- addCity(_("Kiev"), "Europe/Kiev", _("Ukraine"));
- addCity(_("Kigali"), "Africa/Kigali", _("Rwanda"));
- addCity(_("Kingston"), "America/Toronto", _("Canada"));
- addCity(_("Kinshasa"), "Africa/Kinshasa", _("Democratic Republic of the Congo"));
- addCity(_("Kiritimati"), "Pacific/Kiritimati", _("Kiribati"));
- addCity(_("Kirkland"), "America/Montreal", _("Canada"));
- addCity(_("Knox"), "Australia/Melbourne", _("Australia"));
- addCity(_("Knoxville"), "America/New_York", _("United States"));
- addCity(_("Kraków"), "Europe/Warsaw", _("Poland"));
- addCity(_("Kuala Lumpur"), "Asia/Kuala_Lumpur", _("Malaysia"));
- addCity(_("Kuwait City"), "Asia/Kuwait", _("Kuwait"));
- addCity(_("Kyiv"), "Europe/Kiev", _("Ukraine"));
-
- addCity(_("Lagos"), "Africa/Lagos", _("Nigeria"));
- addCity(_("Lahore"), "Asia/Karachi", _("Pakistan"));
- addCity(_("Las Vegas"), "America/Los_Angeles", _("United States"));
- addCity(_("Lima"), "America/Lima", _("Peru"));
- addCity(_("Lisbon"), "Europe/Lisbon", _("Portugal"));
- addCity(_("London"), "Europe/London", _("United Kingdom"));
- addCity(_("Longyearbyen"), "Arctic/Longyearbyen", _("Svalbard and Jan Mayen"));
- addCity(_("Los Angeles"), "America/Los_Angeles", _("United States"));
- addCity(_("Louisville"), "America/Kentucky/Louisville", _("United States"));
- addCity(_("Luxembourg"), "Europe/Luxembourg", _("Luxembourg"));
-
- addCity(_("Macau"), "Asia/Macau", _("Macao"));
- addCity(_("Madison"), "America/Chicago", _("United States"));
- addCity(_("Madrid"), "Europe/Madrid", _("Spain"));
- addCity(_("Maldives"), "Indian/Maldives", _("Maldives"));
- addCity(_("Malta"), "Europe/Malta", _("Malta"));
- addCity(_("Managua"), "America/Managua", _("Nicaragua"));
- addCity(_("Manchester"), "Europe/London", _("United Kingdom"));
- addCity(_("Manila"), "Asia/Manila", _("Philippines"));
- addCity(_("Marengo"), "America/Indiana/Marengo", _("United States"));
- addCity(_("Martinique"), "America/Martinique", _("Canada"));
- addCity(_("Maseru"), "Africa/Maseru", _("Lesotho"));
- addCity(_("Melbourne"), "Australia/Melbourne", _("Australia"));
- addCity(_("Memphis"), "America/Chicago", _("United States"));
- addCity(_("Mendoza"), "America/Argentina/Mendoza", _("Argentina"));
- addCity(_("Metlakatla"), "America/Metlakatla", _("United States"));
- addCity(_("Mexico City"), "America/Mexico_City", _("Mexico"));
- addCity(_("Miami"), "America/New_York", _("United States"));
- addCity(_("Milan"), "Europe/Rome", _("Italy"));
- addCity(_("Milwaukee"), "America/Chicago", _("United States"));
- addCity(_("Minneapolis"), "America/Chicago", _("United States"));
- addCity(_("Minsk"), "Europe/Minsk", _("Belarus"));
- addCity(_("Mogadishu"), "Africa/Mogadishu", _("Somalia"));
- addCity(_("Monrovia"), "Africa/Monrovia", _("Liberia"));
- addCity(_("Monaco"), "Europe/Monaco", _("Monaco"));
- addCity(_("Monterrey"), "America/Monterrey", _("Mexico"));
- addCity(_("Montevideo"), "America/Montevideo", _("Uruguay"));
- addCity(_("Montreal"), "America/Montreal", _("Canada"));
- addCity(_("Moscow"), "Europe/Moscow", _("Russia"));
- addCity(_("Mountain View"), "America/Los_Angeles", _("United States"));
- addCity(_("Mumbai"), "Asia/Kolkata", _("India"));
- addCity(_("Munich"), "Europe/Berlin", _("Germany"));
- addCity(_("Muscat"), "Asia/Muscat", _("Oman"));
-
- addCity(_("Nairobi"), "Africa/Nairobi", _("Kenya"));
- addCity(_("Nashville"), "America/Chicago", _("United States"));
- addCity(_("Nassau"), "America/Nassau", _("Bahamas"));
- addCity(_("New Orleans"), "America/Chicago", _("United States"));
- addCity(_("New Salem"), "America/North_Dakota/New_Salem", _("United States"));
- addCity(_("New South Wales"), "Australia/Sydney", _("Australia"));
- addCity(_("New York"), "America/New_York", _("United States"));
- addCity(_("Newfoundland"), "America/St_Johns", _("United States"));
- addCity(_("Nouméa"), "Pacific/Noumea", _("New Caledonia"));
- addCity(_("Nuestra Señora de La Paz"), "America/Bogota", _("Colombia"));
-
- addCity(_("Oklahoma City"), "America/Chicago", _("United States"));
- addCity(_("Osaka"), "Asia/Tokyo", _("Japan"));
- addCity(_("Oslo"), "Europe/Oslo", _("Norway"));
- addCity(_("Ottawa"), "America/Toronto", _("Canada"));
- addCity(_("Oulu"), "Europe/Helsinki", _("Finland"));
-
- addCity(_("Panamá"), "America/Panama", _("Panama"));
- addCity(_("Paramaribo"), "America/Paramaribo", _("Suriname"));
- addCity(_("Paris"), "Europe/Paris", _("France"));
- addCity(_("Perth"), "Australia/Perth", _("Australia"));
- addCity(_("Petersburg"), "America/Indiana/Petersburg", _("Russia"));
- addCity(_("Philadelphia"), "America/New_York", _("United States"));
- addCity(_("Phnom Penh"), "Asia/Phnom_Penh", _("Cambodia"));
- addCity(_("Phoenix"), "America/Phoenix", _("United States"));
- addCity(_("Pittsburgh"), "America/New_York", _("United States"));
- addCity(_("Port of Spain"), "America/Port_of_Spain", _("Trinidad and Tobago"));
- addCity(_("Port au Prince"), "America/Port-au-Prince", _("Haiti"));
- addCity(_("Portland"), "America/Los_Angeles", _("United States"));
- addCity(_("Prague"), "Europe/Prague", _("Czech"));
- addCity(_("Pyongyang"), "Asia/Pyongyang", _("North Korea"));
-
- addCity(_("Queensland"), "Australia/Brisbane", _("United States"));
- addCity(_("Quito"), "America/Guayaquil", _("Ecuador"));
-
- addCity(_("Rangoon"), "Asia/Rangoon", _("Myanmar"));
- addCity(_("Reno"), "America/Los_Angeles", _("United States"));
- addCity(_("Reston"), "America/New_York", _("United States"));
- addCity(_("Reykjavík"), "Atlantic/Reykjavik", _("Iceland"));
- addCity(_("Riga"), "Europe/Riga", _("Latvia"));
- addCity(_("Rio de Janeiro"), "America/Sao_Paulo", _("Brazil"));
- addCity(_("Riyadh"), "Asia/Riyadh", _("Saudi Arabia"));
- addCity(_("Rome"), "Europe/Rome", _("Italy"));
-
- addCity(_("Sacramento"), "America/Los_Angeles", _("United States"));
- addCity(_("Salt Lake City"), "America/Denver", _("United States"));
- addCity(_("Samoa"), "Pacific/Apia", _("Samoa"));
- addCity(_("San Antonio"), "America/Chicago", _("United States"));
- addCity(_("San Diego"), "America/Los_Angeles", _("United States"));
- addCity(_("San Francisco"), "America/Costa_Rica", _("United States"));
- addCity(_("San José"), "America/Costa_Rica", _("Costa Rica"));
- addCity(_("San Juan"), "America/Puerto_Rico", _("Puerto Rico"));
- addCity(_("San Marino"), "Europe/San_Marino", _("San Marino"));
- addCity(_("San Salvador"), "America/El_Salvador", _("El Salvador"));
- addCity(_("Sanaa"), "Asia/Aden", _("Yemen"));
- addCity(_("Santiago"), "America/Santiago", _("Chile"));
- addCity(_("Santo Domingo"), "America/Santo_Domingo", _("Dominican Republic"));
- addCity(_("São Paulo"), "America/Sao_Paulo", _("Brazil"));
- addCity(_("São Tomé"), "Africa/Sao_Tome", _("São Tomé and Príncipe"));
- addCity(_("Sarajevo"), "Europe/Sarajevo", _("Bosnia and Herzegovina"));
- addCity(_("Saskatchewan"), "America/Regina", _("Canada"));
- addCity(_("Seattle"), "America/Los_Angeles", _("United States"));
- addCity(_("Seoul"), "Asia/Seoul", _("South Korea"));
- addCity(_("Shanghai"), "Asia/Shanghai", _("China"));
- addCity(_("Singapore"), "Asia/Singapore", _("Singapore"));
- addCity(_("Simferopol"), "Europe/Simferopol", _("Ukraine"));
- addCity(_("Skopje"), "Europe/Skopje", _("Macedonia"));
- addCity(_("Sofia"), "Europe/Sofia", _("Bulgaria"));
- addCity(_("St.Johns"), "America/St_Johns", _("Canada"));
- addCity(_("St.Kitts"), "America/St_Kitts", _("Saint Kitts and Nevis"));
- addCity(_("St.Louis"), "America/Chicago", _("United States"));
- addCity(_("Stanley"), "Atlantic/Stanley", _("Falkland Islands"));
- addCity(_("Stockholm"), "Europe/Stockholm", _("Sweden"));
- addCity(_("Suva"), "Pacific/Fiji", _("Fiji"));
- addCity(_("Sydney"), "Australia/Sydney", _("Australia"));
-
- addCity(_("Taipei"), "Asia/Taipei", _("Taiwan"));
- addCity(_("Tallinn"), "Europe/Tallinn", _("Estonia"));
- addCity(_("Tehran"), "Asia/Tehran", _("Iran"));
- addCity(_("Tokyo"), "Asia/Tokyo", _("Japan"));
- addCity(_("Toronto"), "America/Toronto", _("Canada"));
- addCity(_("Tripoli"), "Africa/Tripoli", _("Libya"));
- addCity(_("Tunis"), "Africa/Tunis", _("Tunisia"));
-
- addCity(_("Ulan Bator"), "Asia/Ulan_Bator", _("Mongolia"));
- addCity(_("UTC"), "UTC", _("UTC"));
-
- addCity(_("Vancouver"), "America/Vancouver", _("Canada"));
- addCity(_("Vatican City"), "Europe/Vatican", _("Vatican City"));
- addCity(_("Vevay"), "America/Indiana/Vevay", _("United States"));
- addCity(_("Vienna"), "Europe/Vienna", _("Austria"));
- addCity(_("Vilnius"), "Europe/Vilnius", _("Lithuania"));
- addCity(_("Vincennes"), "America/Indiana/Vincennes", _("France"));
-
- addCity(_("Warsaw"), "Europe/Warsaw", _("Poland"));
- addCity(_("Washington D.C."), "America/New_York", _("United States"));
- addCity(_("Winamac"), "America/Indiana/Winamac", _("United States"));
- addCity(_("Winnipeg"), "America/Winnipeg", _("Canada"));
- addCity(_("Wrocław"), "Europe/Warsaw", _("Poland"));
-
- addCity(_("Zagreb"), "Europe/Zagreb", _("Croatia"));
- addCity(_("Zürich"), "Europe/Zurich", _("Switzerland"));
+ addCity(("Abidjan"), _("Abidjan"), "Africa/Abidjan", _("Ivory Coast"));
+ addCity(("Accra"), _("Accra"), "Africa/Accra", _("Ghana"));
+ addCity(("Addis Ababa"), _("Addis Ababa"), "Africa/Addis_Ababa", _("Ethiopia"));
+ addCity(("Adelaide"), _("Adelaide"), "Australia/Adelaide", _("Australia"));
+ addCity(("Albuquerque"), _("Albuquerque"), "America/Denver", _("United States"));
+ addCity(("Algiers"), _("Algiers"), "Africa/Algiers", _("Algeria"));
+ addCity(("Almaty"), _("Almaty"), "Asia/Almaty", _("Kazakhstan"));
+ addCity(("Amman"), _("Amman"), "Asia/Amman", _("Jordan"));
+ addCity(("Amsterdam"), _("Amsterdam"), "Europe/Amsterdam", _("Netherlands"));
+ addCity(("Anadyr"), _("Anadyr"), "Asia/Anadyr", _("Russia"));
+ addCity(("Anchorage"), _("Anchorage"), "America/Anchorage", _("United States"));
+ addCity(("Andorra"), _("Andorra"), "Europe/Andorra", _("Andorra"));
+ addCity(("Ankara"), _("Ankara"), "Europe/Istanbul", _("Turkey"));
+ addCity(("Ann Arbor"), _("Ann Arbor"), "America/Detroit", _("United States"));
+ addCity(("Antananarivo"), _("Antananarivo"), "Indian/Antananarivo", _("Madagascar"));
+ addCity(("Aqtau"), _("Aqtau"), "Asia/Aqtau", _("Kazakhstan"));
+ addCity(("Aruba"), _("Aruba"), "America/Aruba", _("Aruba"));
+ addCity(("Asunción"), _("Asunción"), "America/Asuncion", _("Paraguay"));
+ addCity(("Athens"), _("Athens"), "Europe/Athens", _("Greece"));
+ addCity(("Atlanta"), _("Atlanta"), "America/New_York", _("United States"));
+ addCity(("Auckland"), _("Auckland"), "Pacific/Auckland", _("New Zealand"));
+ addCity(("Austin"), _("Austin"), "America/Chicago", _("United States"));
+
+ addCity(("Baghdad"), _("Baghdad"), "Asia/Baghdad", _("Iraq"));
+ addCity(("Bahrain"), _("Bahrain"), "Asia/Bahrain", _("Bahrain"));
+ addCity(("Baku"), _("Baku"), "Asia/Baku", _("Azerbaijan"));
+ addCity(("Baltimore"), _("Baltimore"), "America/New_York", _("United States"));
+ addCity(("Bangalore"), _("Bangalore"), "Asia/Kolkata", _("India"));
+ addCity(("Bangkok"), _("Bangkok"), "Asia/Bangkok", _("Thailand"));
+ addCity(("Barbados"), _("Barbados"), "America/Barbados", _("Barbados"));
+ addCity(("Barcelona"), _("Barcelona"), "Europe/Madrid", _("Spain"));
+ addCity(("Beijing"), _("Beijing"), "Asia/Shanghai", _("China"));
+ addCity(("Beirut"), _("Beirut"), "Asia/Beirut", _("Lebanon"));
+ addCity(("Belfast"), _("Belfast"), "Europe/Belfast", _("United Kingdom"));
+ addCity(("Belgrade"), _("Belgrade"), "Europe/Belgrade", _("Serbia"));
+ addCity(("Belize"), _("Belize"), "America/Belize", _("Belize"));
+ addCity(("Belo Horizonte"), _("Belo Horizonte"), "America/Sao_Paulo", _("Brazil"));
+ addCity(("Berlin"), _("Berlin"), "Europe/Berlin", _("Germany"));
+ addCity(("Bermuda"), _("Bermuda"), "Atlantic/Bermuda", _("Bermuda"));
+ addCity(("Beulah"), _("Beulah"), "America/North_Dakota/Beulah", _("United States"));
+ addCity(("Black Rock City"), _("Black Rock City"), "America/Chicago", _("United States"));
+ addCity(("Blantyre"), _("Blantyre"), "Africa/Blantyre", _("Malawi"));
+ addCity(("Bogotá"), _("Bogotá"), "America/Bogota", _("Colombia"));
+ addCity(("Boston"), _("Boston"), "America/New_York", _("United States"));
+ addCity(("Boulder"), _("Boulder"), "America/Denver", _("United States"));
+ addCity(("Brasília"), _("Brasília"), "America/Sao_Paulo", _("Brazil"));
+ addCity(("Bratislava"), _("Bratislava"), "Europe/Bratislava", _("Slovakia"));
+ addCity(("Brazzaville"), _("Brazzaville"), "Africa/Brazzaville", _("Republic of the Congo"));
+ addCity(("Brisbane"), _("Brisbane"), "Australia/Brisbane", _("Australia"));
+ addCity(("Brussels"), _("Brussels"), "Europe/Brussels", _("Belgium"));
+ addCity(("Bucharest"), _("Bucharest"), "Europe/Bucharest", _("Romania"));
+ addCity(("Budapest"), _("Budapest"), "Europe/Budapest", _("Hungary"));
+ addCity(("Buenos Aires"), _("Buenos Aires"), "America/Argentina/Buenos_Aires", _("Argentina"));
+
+ addCity(("Cairo"), _("Cairo"), "Africa/Cairo", _("Egypt"));
+ addCity(("Calcutta"), _("Calcutta"), "Asia/Calcutta", _("India"));
+ addCity(("Calgary"), _("Calgary"), "America/Edmonton", _("Canada"));
+ addCity(("Cambridge"), _("Cambridge"), "Europe/London", _("United Kingdom"));
+ addCity(("Canary"), _("Canary"), "Atlantic/Canary", _("Australia"));
+ addCity(("Canberra"), _("Canberra"), "Australia/Canberra", _("Australia"));
+ addCity(("Cancún"), _("Cancún"), "America/Cancun", _("Mexico"));
+ addCity(("Cape Town"), _("Cape Town"), "Africa/Johannesburg", _("South Africa"));
+ addCity(("Caracas"), _("Caracas"), "America/Caracas", _("Venezuela"));
+ addCity(("Casablanca"), _("Casablanca"), "Africa/Casablanca", _("Morocco"));
+ addCity(("Cayman Palms"), _("Cayman Palms"), "America/Cayman", _("Cayman Islands"));
+ addCity(("Chicago"), _("Chicago"), "America/Chicago", _("United States"));
+ addCity(("Chihuahua"), _("Chihuahua"), "America/Chihuahua", _("Mexico"));
+ addCity(("Chişinău"), _("Chişinău"), "Europe/Chisinau", _("Moldova"));
+ addCity(("Cincinnati"), _("Cincinnati"), "America/New_York", _("United States"));
+ addCity(("Cleveland"), _("Cleveland"), "America/New_York", _("United States"));
+ addCity(("Colombo"), _("Colombo"), "Asia/Colombo", _("Sri Lanka"));
+ addCity(("Columbus"), _("Columbus"), "America/New_York", _("United States"));
+ addCity(("Conakry"), _("Conakry"), "Africa/Conakry", _("Guinea"));
+ addCity(("Copenhagen"), _("Copenhagen"), "Europe/Copenhagen", _("Denmark"));
+ addCity(("Costa Rica"), _("Costa Rica"), "America/Costa_Rica", _("Costa Rica"));
+ addCity(("Curaçao"), _("Curaçao"), "America/Curacao", _("Curacao"));
+
+ addCity(("Dakar"), _("Dakar"), "Africa/Dakar", _("Senegal"));
+ addCity(("Dallas"), _("Dallas"), "America/Chicago", _("United States"));
+ addCity(("Damascus"), _("Damascus"), "Asia/Damascus", _("Syria"));
+ addCity(("Dar es Salaam"), _("Dar es Salaam"), "Africa/Dar_es_Salaam", _("Tanzania"));
+ addCity(("Darwin"), _("Darwin"), "Australia/Darwin", _("Australia"));
+ addCity(("Dawson Creek"), _("Dawson Creek"), "America/Dawson_Creek", _("Canada"));
+ addCity(("Delhi"), _("Delhi"), "Asia/Kolkata", _("India"));
+ addCity(("Denver"), _("Denver"), "America/Denver", _("United States"));
+ addCity(("Detroit"), _("Detroit"), "America/Detroit", _("United States"));
+ addCity(("Dhaka"), _("Dhaka"), "Asia/Dhaka", _("Bangladesh"));
+ addCity(("Djibouti"), _("Djibouti"), "Africa/Djibouti", _("Djibouti"));
+ addCity(("Doha"), _("Doha"), "Asia/Qatar", _("Qatar"));
+ addCity(("Dominica"), _("Dominica"), "America/Dominica", _("Dominica"));
+ addCity(("Dubai"), _("Dubai"), "Asia/Dubai", _("United Arab Emirates"));
+ addCity(("Dublin"), _("Dublin"), "Europe/Dublin", _("Ireland"));
+
+ addCity(("Easter Island"), _("Easter Island"), "Pacific/Easter", _("Chile"));
+ addCity(("Edmonton"), _("Edmonton"), "America/Edmonton", _("Canada"));
+ addCity(("El Salvador"), _("El Salvador"), "America/El_Salvador", _("El Salvador"));
+
+ addCity(("Fiji"), _("Fiji"), "Pacific/Fiji", _("Fiji"));
+ addCity(("Fortaleza"), _("Fortaleza"), "America/Fortaleza", _("Brazil"));
+ addCity(("Frankfurt"), _("Frankfurt"), "Europe/Berlin", _("Germany"));
+ addCity(("Freetown"), _("Freetown"), "Africa/Freetown", _("Sierra Leone"));
+
+ addCity(("Gaborone"), _("Gaborone"), "Africa/Gaborone", _("Botswana"));
+ addCity(("Gaza"), _("Gaza"), "Asia/Gaza", _("Palestine"));
+ addCity(("Gibraltar"), _("Gibraltar"), "Europe/Gibraltar", _("Gibraltar"));
+ addCity(("Grand Turk"), _("Grand Turk"), "America/Grand_Turk", _("Turks and Caicos Islands"));
+ addCity(("Grenada"), _("Grenada"), "America/Grenada", _("Grenada"));
+ addCity(("Guam"), _("Guam"), "Pacific/Guam", _("Guam"));
+ addCity(("Guangzhou"), _("Guangzhou"), "Asia/Shanghai", _("China"));
+ addCity(("Guatemala"), _("Guatemala"), "America/Guatemala", _("Guatemala"));
+ addCity(("Gurgaon"), _("Gurgaon"), "Asia/Kolkata", _("India"));
+ addCity(("Guyana"), _("Guyana"), "America/Guyana", _("Guyana"));
+
+ addCity(("Haifa"), _("Haifa"), "Asia/Jerusalem", _("Israel"));
+ addCity(("Halifax"), _("Halifax"), "America/Halifax", _("Canada"));
+ addCity(("Hamburg"), _("Hamburg"), "Europe/Berlin", _("Germany"));
+ addCity(("Hanoi"), _("Hanoi"), "Asia/Ho_Chi_Minh", _("Vietnam"));
+ addCity(("Harare"), _("Harare"), "Africa/Harare", _("Zimbabwe"));
+ addCity(("Havana"), _("Havana"), "America/Havana", _("Cuba"));
+ addCity(("Hebron"), _("Hebron"), "Asia/Hebron", _("Palestine"));
+ addCity(("Helsinki"), _("Helsinki"), "Europe/Helsinki", _("Finland"));
+ addCity(("Ho Chi Minh City"), _("Ho Chi Minh City"), "Asia/Ho_Chi_Minh", _("Vietnam"));
+ addCity(("Hong Kong"), _("Hong Kong"), "Asia/Hong_Kong", _("Hong Kong"));
+ addCity(("Honolulu"), _("Honolulu"), "Pacific/Honolulu", _("United States"));
+ addCity(("Houston"), _("Houston"), "America/Chicago", _("United States"));
+ addCity(("Hyderabad"), _("Hyderabad"), "Asia/Kolkata", _("India"));
+
+ addCity(("Indianapolis"), _("Indianapolis"), "America/Indiana/Indianapolis", _("United States"));
+ addCity(("Islamabad"), _("Islamabad"), "Asia/Karachi", _("Pakistan"));
+ addCity(("Isle of Man"), _("Isle of Man"), "Europe/Isle_of_Man", _("Isle of Man"));
+ addCity(("Istanbul"), _("Istanbul"), "Europe/Istanbul", _("Turkey"));
+
+ addCity(("Jacksonville"), _("Jacksonville"), "America/New_York", _("United States"));
+ addCity(("Jakarta"), _("Jakarta"), "Asia/Jakarta", _("Indonesia"));
+ addCity(("Jerusalem"), _("Jerusalem"), "Asia/Jerusalem", _("Israel"));
+ addCity(("Johannesburg"), _("Johannesburg"), "Africa/Johannesburg", _("South Africa"));
+
+ addCity(("Kabul"), _("Kabul"), "Asia/Kabul", _("Afghanistan"));
+ addCity(("Kampala"), _("Kampala"), "Africa/Kampala", _("Uganda"));
+ addCity(("Karachi"), _("Karachi"), "Asia/Karachi", _("Pakistan"));
+ addCity(("Khartoum"), _("Khartoum"), "Africa/Khartoum", _("Sudan"));
+ addCity(("Kiev"), _("Kiev"), "Europe/Kiev", _("Ukraine"));
+ addCity(("Kigali"), _("Kigali"), "Africa/Kigali", _("Rwanda"));
+ addCity(("Kingston"), _("Kingston"), "America/Toronto", _("Canada"));
+ addCity(("Kinshasa"), _("Kinshasa"), "Africa/Kinshasa", _("Democratic Republic of the Congo"));
+ addCity(("Kiritimati"), _("Kiritimati"), "Pacific/Kiritimati", _("Kiribati"));
+ addCity(("Kirkland"), _("Kirkland"), "America/Montreal", _("Canada"));
+ addCity(("Knox"), _("Knox"), "Australia/Melbourne", _("Australia"));
+ addCity(("Knoxville"), _("Knoxville"), "America/New_York", _("United States"));
+ addCity(("Kraków"), _("Kraków"), "Europe/Warsaw", _("Poland"));
+ addCity(("Kuala Lumpur"), _("Kuala Lumpur"), "Asia/Kuala_Lumpur", _("Malaysia"));
+ addCity(("Kuwait Cit"), _("Kuwait City"), "Asia/Kuwait", _("Kuwait"));
+ addCity(("Kyiv"), _("Kyiv"), "Europe/Kiev", _("Ukraine"));
+
+ addCity(("Lagos"), _("Lagos"), "Africa/Lagos", _("Nigeria"));
+ addCity(("Lahore"), _("Lahore"), "Asia/Karachi", _("Pakistan"));
+ addCity(("Las Vegas"), _("Las Vegas"), "America/Los_Angeles", _("United States"));
+ addCity(("Lima"), _("Lima"), "America/Lima", _("Peru"));
+ addCity(("Lisbon"), _("Lisbon"), "Europe/Lisbon", _("Portugal"));
+ addCity(("London"), _("London"), "Europe/London", _("United Kingdom"));
+ addCity(("Longyearbyen"), _("Longyearbyen"), "Arctic/Longyearbyen", _("Svalbard and Jan Mayen"));
+ addCity(("Los Angeles"), _("Los Angeles"), "America/Los_Angeles", _("United States"));
+ addCity(("Louisville"), _("Louisville"), "America/Kentucky/Louisville", _("United States"));
+ addCity(("Luxembourg"), _("Luxembourg"), "Europe/Luxembourg", _("Luxembourg"));
+
+ addCity(("Macau"), _("Macau"), "Asia/Macau", _("Macao"));
+ addCity(("Madison"), _("Madison"), "America/Chicago", _("United States"));
+ addCity(("Madrid"), _("Madrid"), "Europe/Madrid", _("Spain"));
+ addCity(("Maldives"), _("Maldives"), "Indian/Maldives", _("Maldives"));
+ addCity(("Malta"), _("Malta"), "Europe/Malta", _("Malta"));
+ addCity(("Managua"), _("Managua"), "America/Managua", _("Nicaragua"));
+ addCity(("Manchester"), _("Manchester"), "Europe/London", _("United Kingdom"));
+ addCity(("Manila"), _("Manila"), "Asia/Manila", _("Philippines"));
+ addCity(("Marengo"), _("Marengo"), "America/Indiana/Marengo", _("United States"));
+ addCity(("Martinique"), _("Martinique"), "America/Martinique", _("Canada"));
+ addCity(("Maseru"), _("Maseru"), "Africa/Maseru", _("Lesotho"));
+ addCity(("Melbourne"), _("Melbourne"), "Australia/Melbourne", _("Australia"));
+ addCity(("Memphis"), _("Memphis"), "America/Chicago", _("United States"));
+ addCity(("Mendoza"), _("Mendoza"), "America/Argentina/Mendoza", _("Argentina"));
+ addCity(("Metlakatla"), _("Metlakatla"), "America/Metlakatla", _("United States"));
+ addCity(("Mexico City"), _("Mexico City"), "America/Mexico_City", _("Mexico"));
+ addCity(("Miami"), _("Miami"), "America/New_York", _("United States"));
+ addCity(("Milan"), _("Milan"), "Europe/Rome", _("Italy"));
+ addCity(("Milwaukee"), _("Milwaukee"), "America/Chicago", _("United States"));
+ addCity(("Minneapolis"), _("Minneapolis"), "America/Chicago", _("United States"));
+ addCity(("Minsk"), _("Minsk"), "Europe/Minsk", _("Belarus"));
+ addCity(("Mogadishu"), _("Mogadishu"), "Africa/Mogadishu", _("Somalia"));
+ addCity(("Monrovia"), _("Monrovia"), "Africa/Monrovia", _("Liberia"));
+ addCity(("Monaco"), _("Monaco"), "Europe/Monaco", _("Monaco"));
+ addCity(("Monterrey"), _("Monterrey"), "America/Monterrey", _("Mexico"));
+ addCity(("Montevideo"), _("Montevideo"), "America/Montevideo", _("Uruguay"));
+ addCity(("Montreal"), _("Montreal"), "America/Montreal", _("Canada"));
+ addCity(("Moscow"), _("Moscow"), "Europe/Moscow", _("Russia"));
+ addCity(("Mountain View"), _("Mountain View"), "America/Los_Angeles", _("United States"));
+ addCity(("Mumbai"), _("Mumbai"), "Asia/Kolkata", _("India"));
+ addCity(("Munich"), _("Munich"), "Europe/Berlin", _("Germany"));
+ addCity(("Muscat"), _("Muscat"), "Asia/Muscat", _("Oman"));
+
+ addCity(("Nairobi"), _("Nairobi"), "Africa/Nairobi", _("Kenya"));
+ addCity(("Nashville"), _("Nashville"), "America/Chicago", _("United States"));
+ addCity(("Nassau"), _("Nassau"), "America/Nassau", _("Bahamas"));
+ addCity(("New Orleans"), _("New Orleans"), "America/Chicago", _("United States"));
+ addCity(("New Salem"), _("New Salem"), "America/North_Dakota/New_Salem", _("United States"));
+ addCity(("New South Wales"), _("New South Wales"), "Australia/Sydney", _("Australia"));
+ addCity(("New York"), _("New York"), "America/New_York", _("United States"));
+ addCity(("Newfoundland"), _("Newfoundland"), "America/St_Johns", _("United States"));
+ addCity(("Nouméa"), _("Nouméa"), "Pacific/Noumea", _("New Caledonia"));
+ addCity(("Nuestra Señora de La Paz"), _("Nuestra Señora de La Paz"), "America/Bogota", _("Colombia"));
+
+ addCity(("Oklahoma City"), _("Oklahoma City"), "America/Chicago", _("United States"));
+ addCity(("Osaka"), _("Osaka"), "Asia/Tokyo", _("Japan"));
+ addCity(("Oslo"), _("Oslo"), "Europe/Oslo", _("Norway"));
+ addCity(("Ottawa"), _("Ottawa"), "America/Toronto", _("Canada"));
+ addCity(("Oulu"), _("Oulu"), "Europe/Helsinki", _("Finland"));
+
+ addCity(("Panamá"), _("Panamá"), "America/Panama", _("Panama"));
+ addCity(("Paramaribo"), _("Paramaribo"), "America/Paramaribo", _("Suriname"));
+ addCity(("Paris"), _("Paris"), "Europe/Paris", _("France"));
+ addCity(("Perth"), _("Perth"), "Australia/Perth", _("Australia"));
+ addCity(("Petersburg"), _("Petersburg"), "America/Indiana/Petersburg", _("Russia"));
+ addCity(("Philadelphia"), _("Philadelphia"), "America/New_York", _("United States"));
+ addCity(("Phnom Penh"), _("Phnom Penh"), "Asia/Phnom_Penh", _("Cambodia"));
+ addCity(("Phoenix"), _("Phoenix"), "America/Phoenix", _("United States"));
+ addCity(("Pittsburgh"), _("Pittsburgh"), "America/New_York", _("United States"));
+ addCity(("Port of Spain"), _("Port of Spain"), "America/Port_of_Spain", _("Trinidad and Tobago"));
+ addCity(("Port au Prince"), _("Port au Prince"), "America/Port-au-Prince", _("Haiti"));
+ addCity(("Portland"), _("Portland"), "America/Los_Angeles", _("United States"));
+ addCity(("Prague"), _("Prague"), "Europe/Prague", _("Czech"));
+ addCity(("Pyongyang"), _("Pyongyang"), "Asia/Pyongyang", _("North Korea"));
+
+ addCity(("Queensland"), _("Queensland"), "Australia/Brisbane", _("United States"));
+ addCity(("Quito"), _("Quito"), "America/Guayaquil", _("Ecuador"));
+
+ addCity(("Rangoon"), _("Rangoon"), "Asia/Rangoon", _("Myanmar"));
+ addCity(("Reno"), _("Reno"), "America/Los_Angeles", _("United States"));
+ addCity(("Reston"), _("Reston"), "America/New_York", _("United States"));
+ addCity(("Reykjavík"), _("Reykjavík"), "Atlantic/Reykjavik", _("Iceland"));
+ addCity(("Riga"), _("Riga"), "Europe/Riga", _("Latvia"));
+ addCity(("Rio de Janeiro"), _("Rio de Janeiro"), "America/Sao_Paulo", _("Brazil"));
+ addCity(("Riyadh"), _("Riyadh"), "Asia/Riyadh", _("Saudi Arabia"));
+ addCity(("Rome"), _("Rome"), "Europe/Rome", _("Italy"));
+
+ addCity(("Sacramento"), _("Sacramento"), "America/Los_Angeles", _("United States"));
+ addCity(("Salt Lake City"), _("Salt Lake City"), "America/Denver", _("United States"));
+ addCity(("Samoa"), _("Samoa"), "Pacific/Apia", _("Samoa"));
+ addCity(("San Antonio"), _("San Antonio"), "America/Chicago", _("United States"));
+ addCity(("San Diego"), _("San Diego"), "America/Los_Angeles", _("United States"));
+ addCity(("San Francisco"), _("San Francisco"), "America/Costa_Rica", _("United States"));
+ addCity(("San José"), _("San José"), "America/Costa_Rica", _("Costa Rica"));
+ addCity(("San Juan"), _("San Juan"), "America/Puerto_Rico", _("Puerto Rico"));
+ addCity(("San Marino"), _("San Marino"), "Europe/San_Marino", _("San Marino"));
+ addCity(("San Salvador"), _("San Salvador"), "America/El_Salvador", _("El Salvador"));
+ addCity(("Sanaa"), _("Sanaa"), "Asia/Aden", _("Yemen"));
+ addCity(("Santiago"), _("Santiago"), "America/Santiago", _("Chile"));
+ addCity(("Santo Domingo"), _("Santo Domingo"), "America/Santo_Domingo", _("Dominican Republic"));
+ addCity(("São Paulo"), _("São Paulo"), "America/Sao_Paulo", _("Brazil"));
+ addCity(("São Tomé"), _("São Tomé"), "Africa/Sao_Tome", _("São Tomé and Príncipe"));
+ addCity(("Sarajevo"), _("Sarajevo"), "Europe/Sarajevo", _("Bosnia and Herzegovina"));
+ addCity(("Saskatchewan"), _("Saskatchewan"), "America/Regina", _("Canada"));
+ addCity(("Seattle"), _("Seattle"), "America/Los_Angeles", _("United States"));
+ addCity(("Seoul"), _("Seoul"), "Asia/Seoul", _("South Korea"));
+ addCity(("Shanghai"), _("Shanghai"), "Asia/Shanghai", _("China"));
+ addCity(("Singapore"), _("Singapore"), "Asia/Singapore", _("Singapore"));
+ addCity(("Simferopol"), _("Simferopol"), "Europe/Simferopol", _("Ukraine"));
+ addCity(("Skopje"), _("Skopje"), "Europe/Skopje", _("Macedonia"));
+ addCity(("Sofia"), _("Sofia"), "Europe/Sofia", _("Bulgaria"));
+ addCity(("St.Johns"), _("St.Johns"), "America/St_Johns", _("Canada"));
+ addCity(("St.Kitts"), _("St.Kitts"), "America/St_Kitts", _("Saint Kitts and Nevis"));
+ addCity(("St.Louis"), _("St.Louis"), "America/Chicago", _("United States"));
+ addCity(("Stanley"), _("Stanley"), "Atlantic/Stanley", _("Falkland Islands"));
+ addCity(("Stockholm"), _("Stockholm"), "Europe/Stockholm", _("Sweden"));
+ addCity(("Suva"), _("Suva"), "Pacific/Fiji", _("Fiji"));
+ addCity(("Sydney"), _("Sydney"), "Australia/Sydney", _("Australia"));
+
+ addCity(("Taipei"), _("Taipei"), "Asia/Taipei", _("Taiwan"));
+ addCity(("Tallinn"), _("Tallinn"), "Europe/Tallinn", _("Estonia"));
+ addCity(("Tehran"), _("Tehran"), "Asia/Tehran", _("Iran"));
+ addCity(("Tokyo"), _("Tokyo"), "Asia/Tokyo", _("Japan"));
+ addCity(("Toronto"), _("Toronto"), "America/Toronto", _("Canada"));
+ addCity(("Tripoli"), _("Tripoli"), "Africa/Tripoli", _("Libya"));
+ addCity(("Tunis"), _("Tunis"), "Africa/Tunis", _("Tunisia"));
+
+ addCity(("Ulan Bator"), _("Ulan Bator"), "Asia/Ulan_Bator", _("Mongolia"));
+ addCity(("UTC"), _("UTC"), "UTC", _("UTC"));
+
+ addCity(("Vancouver"), _("Vancouver"), "America/Vancouver", _("Canada"));
+ addCity(("Vatican City"), _("Vatican City"), "Europe/Vatican", _("Vatican City"));
+ addCity(("Vevay"), _("Vevay"), "America/Indiana/Vevay", _("United States"));
+ addCity(("Vienna"), _("Vienna"), "Europe/Vienna", _("Austria"));
+ addCity(("Vilnius"), _("Vilnius"), "Europe/Vilnius", _("Lithuania"));
+ addCity(("Vincennes"), _("Vincennes"), "America/Indiana/Vincennes", _("France"));
+
+ addCity(("Warsaw"), _("Warsaw"), "Europe/Warsaw", _("Poland"));
+ addCity(("Washington D.C."), _("Washington D.C."), "America/New_York", _("United States"));
+ addCity(("Winamac"), _("Winamac"), "America/Indiana/Winamac", _("United States"));
+ addCity(("Winnipeg"), _("Winnipeg"), "America/Winnipeg", _("Canada"));
+ addCity(("Wrocław"), _("Wrocław"), "Europe/Warsaw", _("Poland"));
+
+ addCity(("Zagreb"), _("Zagreb"), "Europe/Zagreb", _("Croatia"));
+ addCity(("Zürich"), _("Zürich"), "Europe/Zurich", _("Switzerland"));
// Let QML know model is reusable again
endResetModel();
}
+
+QPair<QString, QString> StaticTimeZoneModel::getTranslatedCityName(const QString &cityId)
+{
+ qDebug() << "Called the getTranslatedCityName method with" << cityId;
+ QList<TimeZoneModel::TimeZone>::iterator i;
+ for (i = m_timeZones.begin(); i != m_timeZones.end(); ++i)
+ {
+ if (QString::compare(i->cityId, cityId) == 0)
+ {
+ return QPair<QString, QString>(i->cityName, i->country);
+ }
+ }
+ return QPair<QString, QString>("", "");
+}
+
=== modified file 'backend/modules/Timezone/statictimezonemodel.h'
--- backend/modules/Timezone/statictimezonemodel.h 2015-02-27 12:14:50 +0000
+++ backend/modules/Timezone/statictimezonemodel.h 2015-08-11 10:31:19 +0000
@@ -21,6 +21,7 @@
#include "timezonemodel.h"
#include <libintl.h>
+#include <QDebug>
#define _(value) dgettext(GETTEXT_PACKAGE, value)
@@ -31,12 +32,16 @@
public:
StaticTimeZoneModel(QObject *parent = 0);
+ // Function to
+ Q_INVOKABLE QPair<QString, QString> getTranslatedCityName(const QString &cityId);
+
private:
// Function to define the default city list
void loadDefaultCityList();
+
// Function to append city list item into m_timeZones object
- void addCity(const QString &city, const QString &timezone, const QString &country);
+ void addCity(const QString &cityId, const QString &cityName, const QString &timezone, const QString &country);
};
#endif // STATICTIMEZONEMODEL_H
=== modified file 'backend/modules/Timezone/timezonemodel.cpp'
--- backend/modules/Timezone/timezonemodel.cpp 2014-09-02 14:31:44 +0000
+++ backend/modules/Timezone/timezonemodel.cpp 2015-08-11 10:31:19 +0000
@@ -68,6 +68,8 @@
*/
switch (role) {
+ case RoleCityId:
+ return m_timeZones.at(row).cityId;
case RoleCityName:
return m_timeZones.at(row).cityName;
case RoleCountryName:
@@ -104,7 +106,8 @@
QHash<int, QByteArray> TimeZoneModel::roleNames() const
{
QHash<int, QByteArray> roles;
- roles.insert(RoleCityName, "city");
+ roles.insert(RoleCityId, "cityId");
+ roles.insert(RoleCityName, "cityName");
roles.insert(RoleCountryName, "country");
roles.insert(RoleTimeZoneId, "timezoneID");
roles.insert(RoleTimeString, "localTime");
=== modified file 'backend/modules/Timezone/timezonemodel.h'
--- backend/modules/Timezone/timezonemodel.h 2014-09-02 14:31:44 +0000
+++ backend/modules/Timezone/timezonemodel.h 2015-08-11 10:31:19 +0000
@@ -49,6 +49,7 @@
public:
enum Roles {
+ RoleCityId,
RoleCityName,
RoleCountryName,
RoleTimeZoneId,
@@ -114,6 +115,7 @@
protected:
// Create a simple container class to hold our information
struct TimeZone{
+ QString cityId;
QString cityName;
QString country;
QTimeZone timeZone;
Follow ups
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: noreply, 2015-08-16
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-16
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-16
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-16
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-16
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-16
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-16
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-16
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-14
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-14
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-14
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-12
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-12
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-12
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-12
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-12
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-12
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Nekhelesh Ramananthan, 2015-08-12
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-11
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-11
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Niklas Wenzel, 2015-08-11
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-11
-
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Bartosz Kosiorek, 2015-08-11
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-11
-
Re: [Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-city-name-fix into lp:ubuntu-clock-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-08-11