Merge lp:~vthompson/ubuntu-weather-app/reboot-kph into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Martin Borho
Approved revision: 35
Merged at revision: 35
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-kph
Merge into: lp:ubuntu-weather-app
Diff against target: 112 lines (+12/-12)
4 files modified
app/data/WeatherApi.js (+7/-7)
app/ubuntu-weather-app.qml (+1/-1)
app/ui/settings/UnitsPage.qml (+2/-2)
po/com.ubuntu.weather.pot (+2/-2)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-kph
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+257489@code.launchpad.net

Commit message

Use kph for kilometers per hour.

Description of the change

Use kph for kilometers per hour. The spec also lists this as "Kph", which is correct. In the app that is currently in the store the user never sees this abbreviation, however, so this is only an issue with the reboot series.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/data/WeatherApi.js'
--- app/data/WeatherApi.js 2015-04-06 10:29:13 +0000
+++ app/data/WeatherApi.js 2015-04-27 00:59:36 +0000
@@ -44,12 +44,12 @@
44 return mm/25.4;44 return mm/25.4;
45}45}
46//46//
47function calcKmh(ms) {47function calcKph(ms) {
48 return ms*3.6;48 return ms*3.6;
49}49}
50//50//
51function convertKmhToMph(kmh) {51function convertKphToMph(kph) {
52 return kmh*0.621;52 return kph*0.621;
53}53}
54//54//
55function calcWindDir(degrees) {55function calcWindDir(degrees) {
@@ -218,7 +218,7 @@
218 date: date,218 date: date,
219 metric: {219 metric: {
220 temp:data.main.temp,220 temp:data.main.temp,
221 windSpeed: calcKmh(data.wind.speed),221 windSpeed: calcKph(data.wind.speed),
222 rain: data.main.rain || ((data.rain) ? data.rain["3h"] : false ) || 0,222 rain: data.main.rain || ((data.rain) ? data.rain["3h"] : false ) || 0,
223 snow: data.main.snow || ((data.snow) ? data.snow["3h"] : false ) || 0223 snow: data.main.snow || ((data.snow) ? data.snow["3h"] : false ) || 0
224 },224 },
@@ -249,7 +249,7 @@
249 metric: {249 metric: {
250 tempMin: data.temp.min,250 tempMin: data.temp.min,
251 tempMax: data.temp.max,251 tempMax: data.temp.max,
252 windSpeed: calcKmh(data.speed),252 windSpeed: calcKph(data.speed),
253 rain: data.rain || 0,253 rain: data.rain || 0,
254 snow: data.snow || 0254 snow: data.snow || 0
255 },255 },
@@ -450,7 +450,7 @@
450 imperial: {450 imperial: {
451 temp: calcFahrenheit(data.temp),451 temp: calcFahrenheit(data.temp),
452 tempFeels: calcFahrenheit(data.feelsLike),452 tempFeels: calcFahrenheit(data.feelsLike),
453 windSpeed: convertKmhToMph(data.wSpeed)453 windSpeed: convertKphToMph(data.wSpeed)
454 },454 },
455 precipType: (data.precip_type !== undefined) ? data.precip_type : null,455 precipType: (data.precip_type !== undefined) ? data.precip_type : null,
456 propPrecip: (data.pop !== undefined) ? data.pop : null,456 propPrecip: (data.pop !== undefined) ? data.pop : null,
@@ -481,7 +481,7 @@
481 imperial: {481 imperial: {
482 tempMin: calcFahrenheit(data.minTemp),482 tempMin: calcFahrenheit(data.minTemp),
483 tempMax: calcFahrenheit(data.maxTemp !== undefined ? data.maxTemp : data.minTemp),483 tempMax: calcFahrenheit(data.maxTemp !== undefined ? data.maxTemp : data.minTemp),
484 windSpeed: convertKmhToMph(partData.wSpeed)484 windSpeed: convertKphToMph(partData.wSpeed)
485 },485 },
486 precipType: partData.precip_type,486 precipType: partData.precip_type,
487 propPrecip: partData.pop,487 propPrecip: partData.pop,
488488
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2015-03-16 13:43:00 +0000
+++ app/ubuntu-weather-app.qml 2015-04-27 00:59:36 +0000
@@ -141,7 +141,7 @@
141 service = "weatherchannel"141 service = "weatherchannel"
142 tempScale = "°" + (metric ? "C" : "F")142 tempScale = "°" + (metric ? "C" : "F")
143 units = metric ? "metric" : "imperial"143 units = metric ? "metric" : "imperial"
144 windUnits = metric ? "kmh" : "mph"144 windUnits = metric ? "kph" : "mph"
145 }145 }
146 }146 }
147 }147 }
148148
=== modified file 'app/ui/settings/UnitsPage.qml'
--- app/ui/settings/UnitsPage.qml 2015-04-05 22:31:13 +0000
+++ app/ui/settings/UnitsPage.qml 2015-04-27 00:59:36 +0000
@@ -70,7 +70,7 @@
70 // TRANSLATORS: The strings are standard measurement units70 // TRANSLATORS: The strings are standard measurement units
71 // of wind speed in kilometers per hour and are shown in the settings page.71 // of wind speed in kilometers per hour and are shown in the settings page.
72 // Only the abbreviated form of kilometers per hour should be used.72 // Only the abbreviated form of kilometers per hour should be used.
73 windSpeedModel.append({"text": i18n.tr("kmh"), "value": "kmh"})73 windSpeedModel.append({"text": i18n.tr("kph"), "value": "kph"})
7474
75 // TRANSLATORS: The strings are standard measurement units75 // TRANSLATORS: The strings are standard measurement units
76 // of wind speed in miles per hour and are shown in the settings page.76 // of wind speed in miles per hour and are shown in the settings page.
@@ -145,7 +145,7 @@
145 listViewHeight: windSpeedModel.count*units.gu(6) - units.gu(0.5)145 listViewHeight: windSpeedModel.count*units.gu(6) - units.gu(0.5)
146 model: windSpeedModel146 model: windSpeedModel
147 text: i18n.tr("Wind Speed")147 text: i18n.tr("Wind Speed")
148 subText: settings.windUnits === "kmh" ? i18n.tr("kmh")148 subText: settings.windUnits === "kph" ? i18n.tr("kph")
149 : i18n.tr("mph")149 : i18n.tr("mph")
150150
151 delegate: ListItem.Standard {151 delegate: ListItem.Standard {
152152
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-04-19 21:10:44 +0000
+++ po/com.ubuntu.weather.pot 2015-04-27 00:59:36 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-04-19 16:08-0500\n"11"POT-Creation-Date: 2015-04-26 19:55-0500\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -141,7 +141,7 @@
141#. of wind speed in kilometers per hour and are shown in the settings page.141#. of wind speed in kilometers per hour and are shown in the settings page.
142#. Only the abbreviated form of kilometers per hour should be used.142#. Only the abbreviated form of kilometers per hour should be used.
143#: ../app/ui/settings/UnitsPage.qml:73 ../app/ui/settings/UnitsPage.qml:148143#: ../app/ui/settings/UnitsPage.qml:73 ../app/ui/settings/UnitsPage.qml:148
144msgid "kmh"144msgid "kph"
145msgstr ""145msgstr ""
146146
147#. TRANSLATORS: The strings are standard measurement units147#. TRANSLATORS: The strings are standard measurement units

Subscribers

People subscribed via source and target branches

to all changes: