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
1=== modified file 'app/components/DayDelegate.qml'
2--- app/components/DayDelegate.qml 2015-08-09 12:20:27 +0000
3+++ app/components/DayDelegate.qml 2015-08-26 00:31:17 +0000
4@@ -190,6 +190,7 @@
5 Label {
6 id: conditionForecast
7 color: UbuntuColors.coolGrey
8+ font.capitalization: Font.Capitalize
9 fontSize: "x-large"
10 horizontalAlignment: Text.AlignHCenter
11 width: parent.width
12
13=== modified file 'app/components/HomeTempInfo.qml'
14--- app/components/HomeTempInfo.qml 2015-06-18 01:42:03 +0000
15+++ app/components/HomeTempInfo.qml 2015-08-26 00:31:17 +0000
16@@ -40,6 +40,7 @@
17
18 Label {
19 id: descriptionLabel
20+ font.capitalization: Font.Capitalize
21 font.weight: Font.Normal
22 fontSize: "large"
23 }
24
25=== modified file 'app/data/WeatherApi.js'
26--- app/data/WeatherApi.js 2015-06-26 21:51:28 +0000
27+++ app/data/WeatherApi.js 2015-08-26 00:31:17 +0000
28@@ -233,7 +233,7 @@
29 windDeg: data.wind.deg,
30 windDir: calcWindDir(data.wind.deg),
31 icon: _icon_map[data.weather[0].icon],
32- condition: data.weather[0].main
33+ condition: data.weather[0].description
34 };
35 if(data.id !== undefined) {
36 result["service"] = _serviceName;
37@@ -263,7 +263,7 @@
38 pressure: data.pressure,
39 humidity: data.humidity,
40 icon: _icon_map[data.weather[0].icon],
41- condition: data.weather[0].main,
42+ condition: data.weather[0].description,
43 windDeg: data.deg,
44 windDir: calcWindDir(data.deg),
45 hourly: []
46@@ -324,14 +324,14 @@
47 latLongParams = "&lat="+encodeURIComponent(params.location.coord.lat)
48 + "&lon="+encodeURIComponent(params.location.coord.lon);
49 if(params.location.services && params.location.services[_serviceName]) {
50- urls.current = _baseUrl + "weather?units="+params.units+"&id="+params.location.services[_serviceName];
51- urls.daily = _baseUrl + "forecast/daily?id="+params.location.services[_serviceName]+"&cnt=10&units="+params.units
52- urls.forecast = _baseUrl + "forecast?id="+params.location.services[_serviceName]+"&units="+params.units
53+ urls.current = _baseUrl + "weather?units="+params.units+"&id="+params.location.services[_serviceName]+"&lang="+Qt.locale().name.split("_")[0];
54+ urls.daily = _baseUrl + "forecast/daily?id="+params.location.services[_serviceName]+"&cnt=10&units="+params.units+"&lang="+Qt.locale().name.split("_")[0];
55+ urls.forecast = _baseUrl + "forecast?id="+params.location.services[_serviceName]+"&units="+params.units+"&lang="+Qt.locale().name.split("_")[0];
56
57 } else if (params.location.coord) {
58- urls.current = _baseUrl + "weather?units="+params.units+latLongParams;
59- urls.daily = _baseUrl+"forecast/daily?cnt=10&units="+params.units+latLongParams;
60- urls.forecast = _baseUrl+"forecast?units="+params.units+latLongParams;
61+ urls.current = _baseUrl + "weather?units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
62+ urls.daily = _baseUrl+"forecast/daily?cnt=10&units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
63+ urls.forecast = _baseUrl+"forecast?units="+params.units+latLongParams+"&lang="+Qt.locale().name.split("_")[0];
64 }
65 return urls;
66 }
67
68=== modified file 'debian/changelog'
69--- debian/changelog 2015-08-21 21:18:26 +0000
70+++ debian/changelog 2015-08-26 00:31:17 +0000
71@@ -22,6 +22,7 @@
72 * When location detection is off, make sure the correct location can be
73 selected (LP: #1482936)
74 * Lock app in portrait mode
75+ * Get the condition text to be translated from the OWM API. (LP: #1487793)
76
77 [ Andrew Hayzen ]
78 * Add mocked locations for autopilot and add a test using the data

Subscribers

People subscribed via source and target branches

to all changes: