Merge lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text into lp:ubuntu-weather-app

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 59
Merged at revision: 68
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text
Merge into: lp:ubuntu-weather-app
Prerequisite: lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain
Diff against target: 47 lines (+4/-4)
2 files modified
app/components/DayDelegate.qml (+2/-4)
app/ui/LocationPane.qml (+2/-0)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+263307@code.launchpad.net

Commit message

Add conditions text to day delegate.

Description of the change

Add conditions text to day delegate.

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
Andrew Hayzen (ahayzen) wrote :

What happens regarding translations with this? Do we need to create a map which we can then put i18n.tr() around the values or something?

review: Needs Information
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

As discussed appears we are already [0] sending the locale in the requests :-)

Therefore LGTM :-)

0 - http://i.imgur.com/WsJY30q.png

review: Approve

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-06-30 00:48:43 +0000
3+++ app/components/DayDelegate.qml 2015-06-30 00:48:43 +0000
4@@ -31,7 +31,7 @@
5 property alias high: highLabel.text
6 property alias low: lowLabel.text
7
8- property alias description: descriptionForecast.text
9+ property alias condition: conditionForecast.text
10 property alias chanceOfRain: chanceOfRainForecast.value
11 property alias humidity: humidityForecast.value
12 property alias pollen: pollenForecast.value
13@@ -187,13 +187,11 @@
14
15 // Overview text
16 Label {
17- id: descriptionForecast
18+ id: conditionForecast
19 color: UbuntuColors.coolGrey
20 fontSize: "x-large"
21 horizontalAlignment: Text.AlignHCenter
22- text: i18n.tr("Chance of rain")
23 width: parent.width
24- visible: false // FIXME: add overview text eg "Chance of flurries"
25 }
26
27 ForecastDetailsDelegate {
28
29=== modified file 'app/ui/LocationPane.qml'
30--- app/ui/LocationPane.qml 2015-06-30 00:48:43 +0000
31+++ app/ui/LocationPane.qml 2015-06-30 00:48:43 +0000
32@@ -97,6 +97,7 @@
33 low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
34 high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
35 image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",
36+ condition: emptyIfUndefined(forecasts[x].condition),
37 chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),
38 humidity: emptyIfUndefined(forecasts[x].humidity, "%"),
39 uvIndex: emptyIfUndefined(forecasts[x].uv),
40@@ -181,6 +182,7 @@
41 image: model.image
42 low: model.low
43
44+ condition: model.condition
45 chanceOfRain: model.chanceOfRain
46 humidity: model.humidity
47 // TODO: extra from API

Subscribers

People subscribed via source and target branches

to all changes: