Merge lp:~dpm/ubuntu-weather-app/refresh-translations into lp:ubuntu-weather-app/obsolete.trunk

Proposed by David Planella
Status: Merged
Approved by: Martin Borho
Approved revision: 126
Merged at revision: 124
Proposed branch: lp:~dpm/ubuntu-weather-app/refresh-translations
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 320 lines (+187/-39)
7 files modified
.bzrignore (+1/-0)
README.translations (+36/-0)
components/LocationManagerSheet.qml (+3/-1)
components/WeatherTemperatureComponent.qml (+4/-2)
po/po.pro (+8/-1)
po/ubuntu-weather-app.pot (+124/-35)
ubuntu-weather-app.qmlproject (+11/-0)
To merge this branch: bzr merge lp:~dpm/ubuntu-weather-app/refresh-translations
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Martin Borho Approve
Review via email: mp+187704@code.launchpad.net

Commit message

Updated translatable strings, a couple of small fixes to ease translations

Description of the change

Updated translatable strings, a couple of small fixes to ease translations

To post a comment you must log in.
Revision history for this message
Martin Borho (martin-borho) wrote :

Looks good to me, thanks!

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2013-05-28 12:26:03 +0000
3+++ .bzrignore 2013-09-26 09:52:06 +0000
4@@ -5,3 +5,4 @@
5 debian/*.debhelper.log
6 debian/*.substvars
7 po/Makefile
8+.build
9
10=== added file 'README.translations'
11--- README.translations 1970-01-01 00:00:00 +0000
12+++ README.translations 2013-09-26 09:52:06 +0000
13@@ -0,0 +1,36 @@
14+# Updating translations
15+
16+Translations for the Weather app happen in [Launchpad Translations][] and
17+are automatically committed daily on the trunk branch in the po/ folder.
18+
19+They are then built and installed as part of the package build, so that
20+developers don't really need to worry about them.
21+
22+However, there is one task that needs to be taken care of: exposing new
23+translatable messages to translators. So whenever you add new translatable
24+messages in the code, make sure to follow these steps:
25+
26+ 1. Change directory to the po/ folder: `cd po`
27+ 2. Update the translations template: `qmake && make pot`
28+ 3. Commit the generated .pot file: `bzr commit -m"Updated translation template"`
29+ 4. Push the branch and send a merge proposal as usual
30+
31+And that's it, once the branch lands Launchpad should take care of all the rest!
32+
33+# Behind the scenes
34+
35+Behind the scenes, whenever the po/*.pot file (also known as translations template)
36+is committed to trunk Launchpad reads it and updates the translatable strings
37+exposed in the web UI. This will enable translators to work on the new strings.
38+The translations template contains all translatable strings that have been
39+extracted from the source code files.
40+
41+Launchpad will then store translations in its database and will commit them daily
42+in the form of textual po/*.po files to trunk. The PO files are also usually
43+referred to as the translations files. You'll find a translation file for each
44+language the app has got at least a translated message available for.
45+
46+Translations for core apps follow the standard [gettext format].
47+
48+ [Launchpad Translations]: https://translations.launchpad.net/ubuntu-weather-app
49+ [gettext format]: https://www.gnu.org/software/gettext/
50
51=== modified file 'components/LocationManagerSheet.qml'
52--- components/LocationManagerSheet.qml 2013-09-21 18:00:39 +0000
53+++ components/LocationManagerSheet.qml 2013-09-26 09:52:06 +0000
54@@ -129,7 +129,9 @@
55 objectName: "currentLocationItem"
56 id: lookupItemAddButton
57 anchors.verticalCenter: parent.verticalCenter
58- text: i18n.tr("add")
59+ // TRANSLATORS: this is the button to add a location (city) that has been
60+ // detected to be the current position
61+ text: i18n.tr("Add")
62 MouseArea {
63 anchors.fill: parent
64 onClicked: {
65
66=== modified file 'components/WeatherTemperatureComponent.qml'
67--- components/WeatherTemperatureComponent.qml 2013-09-14 11:46:25 +0000
68+++ components/WeatherTemperatureComponent.qml 2013-09-26 09:52:06 +0000
69@@ -80,7 +80,8 @@
70
71 Text {
72 id: max
73- text: i18n.tr("H: ")+tempComponent.maxTemp
74+ // TRANSLATORS: this refers to the High (max) temperature forecasted for a day
75+ text: i18n.tr("H:") + " " + tempComponent.maxTemp
76 color: Theme.palette.normal.baseText
77 style: Text.Raised
78 font.bold: false
79@@ -99,7 +100,8 @@
80
81 Text {
82 id: min
83- text: i18n.tr("L: ")+tempComponent.minTemp
84+ // TRANSLATORS: this refers to the Low (min) temperature forecasted for a day
85+ text: i18n.tr("L:") + " " + tempComponent.minTemp
86 color: Theme.palette.normal.baseText
87 style: Text.Raised
88 font.bold: false
89
90=== modified file 'po/po.pro'
91--- po/po.pro 2013-06-12 13:55:03 +0000
92+++ po/po.pro 2013-09-26 09:52:06 +0000
93@@ -1,3 +1,10 @@
94+## This .pro file is used to create a Makefile with the necessary rules
95+## to create an initial translations template and to update it whenever
96+## there are new translatable strings in the project that are ready to be
97+## exposed to translators
98+##
99+## See the ../README.translations file for more information
100+
101 TEMPLATE = subdirs
102
103 PROJECTNAME = $$system(basename ../*.qmlproject)
104@@ -32,7 +39,7 @@
105 QMAKE_EXTRA_TARGETS += potfile
106
107 ## Do not use this rule directly. It's a dependency rule to
108-## generate an intermediate .h file to extract translatable
109+## generate an intermediate .js file to extract translatable
110 ## strings from the .desktop file
111 desktopfile.target = desktopfile
112 desktopfile.commands = awk \'BEGIN { FS=\"=\" }; /Name/ {print \"var s = i18n.tr(\42\" \$$2 \"\42);\"}\' $${DESKTOPFILE} > $${DESKTOPFILETEMP}
113
114=== modified file 'po/ubuntu-weather-app.pot'
115--- po/ubuntu-weather-app.pot 2013-06-12 13:55:03 +0000
116+++ po/ubuntu-weather-app.pot 2013-09-26 09:52:06 +0000
117@@ -8,7 +8,7 @@
118 msgstr ""
119 "Project-Id-Version: ubuntu-weather-app\n"
120 "Report-Msgid-Bugs-To: \n"
121-"POT-Creation-Date: 2013-06-12 15:54+0200\n"
122+"POT-Creation-Date: 2013-09-26 07:22+0200\n"
123 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
124 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
125 "Language-Team: LANGUAGE <LL@li.org>\n"
126@@ -17,49 +17,138 @@
127 "Content-Type: text/plain; charset=CHARSET\n"
128 "Content-Transfer-Encoding: 8bit\n"
129
130-#: ../components/AddLocationDialog.qml:13
131-msgid "Add location"
132-msgstr ""
133-
134-#: ../components/AddLocationDialog.qml:14
135-msgid "Write a city name or pick it by your location"
136-msgstr ""
137-
138-#: ../components/AddLocationDialog.qml:43
139+#: ../components/AddLocationSheet.qml:30
140+#: ../components/LocationManagerSheet.qml:215
141+msgid "Add city"
142+msgstr ""
143+
144+#: ../components/AddLocationSheet.qml:77
145+msgid "No location was found for "
146+msgstr ""
147+
148+#: ../components/AddLocationSheet.qml:126
149 msgid "Enter a city name"
150 msgstr ""
151
152-#: ../components/AddLocationDialog.qml:63
153-msgid "Use my own location"
154-msgstr ""
155-
156-#: ../components/AddLocationDialog.qml:75
157-msgid "Cancel"
158-msgstr ""
159-
160-#: ../components/CurrentWeather.qml:59
161-msgid "Max."
162-msgstr ""
163-
164-#: ../components/CurrentWeather.qml:98
165-#: ../components/DayWeatherComponent.qml:50
166-msgid "Min."
167-msgstr ""
168-
169-#: ../components/LocationTab.qml:64 ../components/LocationTabEmpty.qml:20
170+#: ../components/CurrentWeather.qml:136
171+msgid "Humidity"
172+msgstr ""
173+
174+#: ../components/CurrentWeather.qml:152
175+msgid "Wind speed"
176+msgstr ""
177+
178+#: ../components/CurrentWeather.qml:177
179+msgid "Pressure"
180+msgstr ""
181+
182+#: ../components/CurrentWeather.qml:178
183+msgid "mbar"
184+msgstr ""
185+
186+#: ../components/CurrentWeather.qml:192
187+msgid "Precipitation"
188+msgstr ""
189+
190+#: ../components/LastUpdatedComponent.qml:32
191+msgid "Updated: "
192+msgstr ""
193+
194+#: ../components/LastUpdatedComponent.qml:36
195+msgid "Today, "
196+msgstr ""
197+
198+#: ../components/LoadingSpinnerComponent.qml:44
199+msgid "Loading..."
200+msgstr ""
201+
202+#: ../components/LocationManagerSheet.qml:32
203+msgid "Edit locations"
204+msgstr ""
205+
206+#: ../components/LocationManagerSheet.qml:84
207+msgid "Current location"
208+msgstr ""
209+
210+#: ../components/LocationManagerSheet.qml:102
211+msgid "Lookup location"
212+msgstr ""
213+
214+#. TRANSLATORS: this is the button to add a location (city) that has been
215+#. detected to be the current position
216+#: ../components/LocationManagerSheet.qml:134
217 msgid "Add"
218 msgstr ""
219
220-#: ../components/LocationTab.qml:77
221-msgid "Remove"
222-msgstr ""
223-
224-#: ../components/LocationTab.qml:87
225+#: ../components/LocationManagerSheet.qml:150
226+msgid "World"
227+msgstr ""
228+
229+#: ../components/LocationManagerSheet.qml:233
230+msgid "Location already added."
231+msgstr ""
232+
233+#: ../components/LocationManagerSheet.qml:235
234+msgid "OK"
235+msgstr ""
236+
237+#: ../components/LocationTab.qml:164
238+msgid ""
239+"No weather data available at the moment, please try to refresh later again!"
240+msgstr ""
241+
242+#: ../components/LocationTab.qml:180
243 msgid "Refresh"
244 msgstr ""
245
246-#: ../components/LocationTabEmpty.qml:8
247-msgid "No Locations"
248+#: ../components/LocationTab.qml:192
249+msgid "Edit"
250+msgstr ""
251+
252+#: ../components/LocationTab.qml:204 ../components/SettingsSheet.qml:27
253+msgid "Settings"
254+msgstr ""
255+
256+#: ../components/SettingsSheet.qml:36
257+msgid "Temperature units"
258+msgstr ""
259+
260+#: ../components/SettingsSheet.qml:37
261+msgid "Celsius"
262+msgstr ""
263+
264+#: ../components/SettingsSheet.qml:37
265+msgid "Fahrenheit"
266+msgstr ""
267+
268+#: ../components/SettingsSheet.qml:43
269+msgid "Wind speed units"
270+msgstr ""
271+
272+#: ../components/SettingsSheet.qml:44
273+msgid "Kilometers per hour"
274+msgstr ""
275+
276+#: ../components/SettingsSheet.qml:44
277+msgid "Miles per hour"
278+msgstr ""
279+
280+#: ../components/SplashComponent.qml:34
281+msgid "Couldn't load weather data, please try later again!"
282+msgstr ""
283+
284+#: ../components/SwipeDelete.qml:52 ../components/SwipeDelete.qml:60
285+msgid "Delete"
286+msgstr ""
287+
288+#. TRANSLATORS: this refers to the High (max) temperature forecasted for a day
289+#: ../components/WeatherTemperatureComponent.qml:84
290+msgid "H:"
291+msgstr ""
292+
293+#. TRANSLATORS: this refers to the Low (min) temperature forecasted for a day
294+#: ../components/WeatherTemperatureComponent.qml:104
295+msgid "L:"
296 msgstr ""
297
298 #: ../.build/ubuntu-weather-app.desktop.js:1
299
300=== modified file 'ubuntu-weather-app.qmlproject'
301--- ubuntu-weather-app.qmlproject 2013-04-24 14:21:46 +0000
302+++ ubuntu-weather-app.qmlproject 2013-09-26 09:52:06 +0000
303@@ -15,6 +15,17 @@
304 ImageFiles {
305 directory: "."
306 }
307+ /* Shows the README files in the project view */
308+ Files {
309+ filter: "README*"
310+ }
311+ /* Shows the translation files and the .pro file used to generate the .pot template */
312+ Files {
313+ filter: "*.po*"
314+ }
315+ Files {
316+ filter: "*.pro"
317+ }
318 /* List of plugin directories passed to QML runtime */
319 importPaths: [ "." ,"/usr/lib/x86_64-linux-gnu/qt5/qml" ]
320 }

Subscribers

People subscribed via source and target branches