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
=== modified file 'app/components/DayDelegate.qml'
--- app/components/DayDelegate.qml 2015-06-30 00:48:43 +0000
+++ app/components/DayDelegate.qml 2015-06-30 00:48:43 +0000
@@ -31,7 +31,7 @@
31 property alias high: highLabel.text31 property alias high: highLabel.text
32 property alias low: lowLabel.text32 property alias low: lowLabel.text
3333
34 property alias description: descriptionForecast.text34 property alias condition: conditionForecast.text
35 property alias chanceOfRain: chanceOfRainForecast.value35 property alias chanceOfRain: chanceOfRainForecast.value
36 property alias humidity: humidityForecast.value36 property alias humidity: humidityForecast.value
37 property alias pollen: pollenForecast.value37 property alias pollen: pollenForecast.value
@@ -187,13 +187,11 @@
187187
188 // Overview text188 // Overview text
189 Label {189 Label {
190 id: descriptionForecast190 id: conditionForecast
191 color: UbuntuColors.coolGrey191 color: UbuntuColors.coolGrey
192 fontSize: "x-large"192 fontSize: "x-large"
193 horizontalAlignment: Text.AlignHCenter193 horizontalAlignment: Text.AlignHCenter
194 text: i18n.tr("Chance of rain")
195 width: parent.width194 width: parent.width
196 visible: false // FIXME: add overview text eg "Chance of flurries"
197 }195 }
198196
199 ForecastDetailsDelegate {197 ForecastDetailsDelegate {
200198
=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml 2015-06-30 00:48:43 +0000
+++ app/ui/LocationPane.qml 2015-06-30 00:48:43 +0000
@@ -97,6 +97,7 @@
97 low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,97 low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
98 high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",98 high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
99 image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",99 image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",
100 condition: emptyIfUndefined(forecasts[x].condition),
100 chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),101 chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),
101 humidity: emptyIfUndefined(forecasts[x].humidity, "%"),102 humidity: emptyIfUndefined(forecasts[x].humidity, "%"),
102 uvIndex: emptyIfUndefined(forecasts[x].uv),103 uvIndex: emptyIfUndefined(forecasts[x].uv),
@@ -181,6 +182,7 @@
181 image: model.image182 image: model.image
182 low: model.low183 low: model.low
183184
185 condition: model.condition
184 chanceOfRain: model.chanceOfRain186 chanceOfRain: model.chanceOfRain
185 humidity: model.humidity187 humidity: model.humidity
186 // TODO: extra from API188 // TODO: extra from API

Subscribers

People subscribed via source and target branches

to all changes: