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
1=== modified file 'app/ui/LocationPane.qml'
2--- app/ui/LocationPane.qml 2015-10-20 01:37:58 +0000
3+++ app/ui/LocationPane.qml 2015-10-22 15:27:30 +0000
4@@ -140,6 +140,7 @@
5
6 function getDayData(data) {
7 var tempUnits = settings.tempScale === "Β°C" ? "metric" : "imperial"
8+ var windUnits = settings.windUnits === "kph" ? "metric" : "imperial";
9 var timezoneOffset = new Date().getTimezoneOffset();
10 var offset = (data.location.timezone && data.location.timezone.dstOffset !== undefined) ? (data.location.timezone.dstOffset*60 + timezoneOffset)*60*1000: 0
11 var options = { timeZone: data.location.timezone.timeZoneId, timeZoneName: 'long' };
12@@ -157,8 +158,8 @@
13 sunrise: data.sunrise || sunrise.toLocaleTimeString(Qt.locale().name, options),
14 sunset: data.sunset || sunset.toLocaleTimeString(Qt.locale().name, options),
15 uvIndex: emptyIfUndefined(data.uv),
16- wind: data[tempUnits].windSpeed === undefined || data.windDir === undefined
17- ? "" : Math.round(data[tempUnits].windSpeed) + settings.windUnits + " " + data.windDir
18+ wind: data[windUnits].windSpeed === undefined || data.windDir === undefined
19+ ? "" : Math.round(data[windUnits].windSpeed) + settings.windUnits + " " + data.windDir
20 };
21 }
22
23
24=== modified file 'debian/changelog'
25--- debian/changelog 2015-10-22 12:49:35 +0000
26+++ debian/changelog 2015-10-22 15:27:30 +0000
27@@ -59,6 +59,7 @@
28 * Add autopilot test for expanding the today info
29 * Implement extra info expandable for today info (LP: #1496422, LP: #1478255)
30 * Fix for autopilot tests not using custom back button and for possible flaky test due to expandHeight changing dynamically
31+ * Fix to link the Wind Speed unit to the Wind Unit setting and not the Temperature Unit setting
32
33 [ Carla Sella ]
34 * Create autopilot test which shows the day delegate (LP: #1452491)
35
36=== modified file 'po/com.ubuntu.weather.pot'
37--- po/com.ubuntu.weather.pot 2015-10-22 12:49:35 +0000
38+++ po/com.ubuntu.weather.pot 2015-10-22 15:27:30 +0000
39@@ -8,7 +8,7 @@
40 msgstr ""
41 "Project-Id-Version: ubuntu-weather-app\n"
42 "Report-Msgid-Bugs-To: \n"
43-"POT-Creation-Date: 2015-10-22 13:33+0100\n"
44+"POT-Creation-Date: 2015-10-22 16:15+0100\n"
45 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
46 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
47 "Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches

to all changes: