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

Proposed by Victor Thompson on 2015-08-22
Status: Merged
Approved by: Victor Thompson on 2015-08-26
Approved revision: 104
Merged at revision: 104
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-translate-owm
Merge into: lp:ubuntu-weather-app
Diff against target: 78 lines (+11/-8)
4 files modified
app/components/DayDelegate.qml (+1/-0)
app/components/HomeTempInfo.qml (+1/-0)
app/data/WeatherApi.js (+8/-8)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-translate-owm
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-08-26
Andrew Hayzen 2015-08-22 Approve on 2015-08-25
Review via email: mp+268837@code.launchpad.net

Commit message

* Get the condition text to be translated from the OWM API.

Description of the change

* Get the condition text to be translated from the OWM API.

To post a comment you must log in.
Andrew Hayzen (ahayzen) wrote :

Works well, managed to get Spanish conditions :-)

review: Approve
104. By Victor Thompson on 2015-08-26

Merge of reboot and resolve changelog conflict.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/DayDelegate.qml'
--- app/components/DayDelegate.qml 2015-08-09 12:20:27 +0000
+++ app/components/DayDelegate.qml 2015-08-26 00:31:17 +0000
@@ -190,6 +190,7 @@
190 Label {190 Label {
191 id: conditionForecast191 id: conditionForecast
192 color: UbuntuColors.coolGrey192 color: UbuntuColors.coolGrey
193 font.capitalization: Font.Capitalize
193 fontSize: "x-large"194 fontSize: "x-large"
194 horizontalAlignment: Text.AlignHCenter195 horizontalAlignment: Text.AlignHCenter
195 width: parent.width196 width: parent.width
196197
=== modified file 'app/components/HomeTempInfo.qml'
--- app/components/HomeTempInfo.qml 2015-06-18 01:42:03 +0000
+++ app/components/HomeTempInfo.qml 2015-08-26 00:31:17 +0000
@@ -40,6 +40,7 @@
4040
41 Label {41 Label {
42 id: descriptionLabel42 id: descriptionLabel
43 font.capitalization: Font.Capitalize
43 font.weight: Font.Normal44 font.weight: Font.Normal
44 fontSize: "large"45 fontSize: "large"
45 }46 }
4647
=== modified file 'app/data/WeatherApi.js'
--- app/data/WeatherApi.js 2015-06-26 21:51:28 +0000
+++ app/data/WeatherApi.js 2015-08-26 00:31:17 +0000
@@ -233,7 +233,7 @@
233 windDeg: data.wind.deg,233 windDeg: data.wind.deg,
234 windDir: calcWindDir(data.wind.deg),234 windDir: calcWindDir(data.wind.deg),
235 icon: _icon_map[data.weather[0].icon],235 icon: _icon_map[data.weather[0].icon],
236 condition: data.weather[0].main236 condition: data.weather[0].description
237 };237 };
238 if(data.id !== undefined) {238 if(data.id !== undefined) {
239 result["service"] = _serviceName;239 result["service"] = _serviceName;
@@ -263,7 +263,7 @@
263 pressure: data.pressure,263 pressure: data.pressure,
264 humidity: data.humidity,264 humidity: data.humidity,
265 icon: _icon_map[data.weather[0].icon],265 icon: _icon_map[data.weather[0].icon],
266 condition: data.weather[0].main,266 condition: data.weather[0].description,
267 windDeg: data.deg,267 windDeg: data.deg,
268 windDir: calcWindDir(data.deg),268 windDir: calcWindDir(data.deg),
269 hourly: []269 hourly: []
@@ -324,14 +324,14 @@
324 latLongParams = "&lat="+encodeURIComponent(params.location.coord.lat)324 latLongParams = "&lat="+encodeURIComponent(params.location.coord.lat)
325 + "&lon="+encodeURIComponent(params.location.coord.lon);325 + "&lon="+encodeURIComponent(params.location.coord.lon);
326 if(params.location.services && params.location.services[_serviceName]) {326 if(params.location.services && params.location.services[_serviceName]) {
327 urls.current = _baseUrl + "weather?units="+params.units+"&id="+params.location.services[_serviceName];327 urls.current = _baseUrl + "weather?units="+params.units+"&id="+params.location.services[_serviceName]+"&lang="+Qt.locale().name.split("_")[0];
328 urls.daily = _baseUrl + "forecast/daily?id="+params.location.services[_serviceName]+"&cnt=10&units="+params.units328 urls.daily = _baseUrl + "forecast/daily?id="+params.location.services[_serviceName]+"&cnt=10&units="+params.units+"&lang="+Qt.locale().name.split("_")[0];
329 urls.forecast = _baseUrl + "forecast?id="+params.location.services[_serviceName]+"&units="+params.units329 urls.forecast = _baseUrl + "forecast?id="+params.location.services[_serviceName]+"&units="+params.units+"&lang="+Qt.locale().name.split("_")[0];
330330
331 } else if (params.location.coord) {331 } else if (params.location.coord) {
332 urls.current = _baseUrl + "weather?units="+params.units+latLongParams;332 urls.current = _baseUrl + "weather?units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
333 urls.daily = _baseUrl+"forecast/daily?cnt=10&units="+params.units+latLongParams;333 urls.daily = _baseUrl+"forecast/daily?cnt=10&units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
334 urls.forecast = _baseUrl+"forecast?units="+params.units+latLongParams;334 urls.forecast = _baseUrl+"forecast?units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
335 }335 }
336 return urls;336 return urls;
337 }337 }
338338
=== modified file 'debian/changelog'
--- debian/changelog 2015-08-21 21:18:26 +0000
+++ debian/changelog 2015-08-26 00:31:17 +0000
@@ -22,6 +22,7 @@
22 * When location detection is off, make sure the correct location can be22 * When location detection is off, make sure the correct location can be
23 selected (LP: #1482936)23 selected (LP: #1482936)
24 * Lock app in portrait mode24 * Lock app in portrait mode
25 * Get the condition text to be translated from the OWM API. (LP: #1487793)
2526
26 [ Andrew Hayzen ]27 [ Andrew Hayzen ]
27 * Add mocked locations for autopilot and add a test using the data28 * Add mocked locations for autopilot and add a test using the data

Subscribers

People subscribed via source and target branches

to all changes: