Merge lp:~ahayzen/ubuntu-weather-app/fix-link-windspeed-to-windunits-not-tempunits into lp:ubuntu-weather-app

Proposed by Andrew Hayzen on 2015-10-22
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„ on 2015-10-22
Approved revision: 150
Merged at revision: 150
Proposed branch: lp:~ahayzen/ubuntu-weather-app/fix-link-windspeed-to-windunits-not-tempunits
Merge into: lp:ubuntu-weather-app
Diff against target: 47 lines (+5/-3)
3 files modified
app/ui/LocationPane.qml (+3/-2)
debian/changelog (+1/-0)
po/com.ubuntu.weather.pot (+1/-1)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/fix-link-windspeed-to-windunits-not-tempunits
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-10-22
Alan Pope 🍺🐧🐱 πŸ¦„ 2015-10-22 Approve on 2015-10-22
Review via email: mp+275369@code.launchpad.net

Commit message

* Fix to link the Wind Speed unit to the Wind Unit setting and not the Temperature Unit setting

Description of the change

* Fix to link the Wind Speed unit to the Wind Unit setting and not the Temperature Unit setting

To post a comment you must log in.

LGTM!

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml 2015-10-20 01:37:58 +0000
+++ app/ui/LocationPane.qml 2015-10-22 15:27:30 +0000
@@ -140,6 +140,7 @@
140140
141 function getDayData(data) {141 function getDayData(data) {
142 var tempUnits = settings.tempScale === "Β°C" ? "metric" : "imperial"142 var tempUnits = settings.tempScale === "Β°C" ? "metric" : "imperial"
143 var windUnits = settings.windUnits === "kph" ? "metric" : "imperial";
143 var timezoneOffset = new Date().getTimezoneOffset();144 var timezoneOffset = new Date().getTimezoneOffset();
144 var offset = (data.location.timezone && data.location.timezone.dstOffset !== undefined) ? (data.location.timezone.dstOffset*60 + timezoneOffset)*60*1000: 0145 var offset = (data.location.timezone && data.location.timezone.dstOffset !== undefined) ? (data.location.timezone.dstOffset*60 + timezoneOffset)*60*1000: 0
145 var options = { timeZone: data.location.timezone.timeZoneId, timeZoneName: 'long' };146 var options = { timeZone: data.location.timezone.timeZoneId, timeZoneName: 'long' };
@@ -157,8 +158,8 @@
157 sunrise: data.sunrise || sunrise.toLocaleTimeString(Qt.locale().name, options),158 sunrise: data.sunrise || sunrise.toLocaleTimeString(Qt.locale().name, options),
158 sunset: data.sunset || sunset.toLocaleTimeString(Qt.locale().name, options),159 sunset: data.sunset || sunset.toLocaleTimeString(Qt.locale().name, options),
159 uvIndex: emptyIfUndefined(data.uv),160 uvIndex: emptyIfUndefined(data.uv),
160 wind: data[tempUnits].windSpeed === undefined || data.windDir === undefined161 wind: data[windUnits].windSpeed === undefined || data.windDir === undefined
161 ? "" : Math.round(data[tempUnits].windSpeed) + settings.windUnits + " " + data.windDir162 ? "" : Math.round(data[windUnits].windSpeed) + settings.windUnits + " " + data.windDir
162 };163 };
163 }164 }
164165
165166
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-22 12:49:35 +0000
+++ debian/changelog 2015-10-22 15:27:30 +0000
@@ -59,6 +59,7 @@
59 * Add autopilot test for expanding the today info59 * Add autopilot test for expanding the today info
60 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)60 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)
61 * Fix for autopilot tests not using custom back button and for possible flaky test due to expandHeight changing dynamically61 * Fix for autopilot tests not using custom back button and for possible flaky test due to expandHeight changing dynamically
62 * Fix to link the Wind Speed unit to the Wind Unit setting and not the Temperature Unit setting
6263
63 [ Carla Sella ]64 [ Carla Sella ]
64 * Create autopilot test which shows the day delegate (LP: #1452491)65 * Create autopilot test which shows the day delegate (LP: #1452491)
6566
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-10-22 12:49:35 +0000
+++ po/com.ubuntu.weather.pot 2015-10-22 15:27:30 +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-10-22 13:33+0100\n"11"POT-Creation-Date: 2015-10-22 16:15+0100\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"

Subscribers

People subscribed via source and target branches

to all changes: