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

Proposed by David Planella on 2013-05-28
Status: Merged
Approved by: Martin Borho on 2013-05-28
Approved revision: 22
Merged at revision: 22
Proposed branch: lp:~dpm/ubuntu-weather-app/enable-translations
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 146 lines (+86/-7)
5 files modified
.bzrignore (+1/-0)
debian/changelog (+6/-0)
debian/rules (+9/-0)
po/po.pro (+3/-7)
po/ubuntu-weather-app.pot (+67/-0)
To merge this branch: bzr merge lp:~dpm/ubuntu-weather-app/enable-translations
Reviewer Review Type Date Requested Status
Martin Borho 2013-05-28 Approve on 2013-05-28
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2013-05-28
Review via email: mp+166038@code.launchpad.net

Commit message

Updated rule to create translations template, added translation support in packaging

Description of the change

Updated rule to create translations template, added translation support in packaging

To post a comment you must log in.
review: Approve (continuous-integration)
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2013-04-04 11:05:43 +0000
3+++ .bzrignore 2013-05-28 12:28:29 +0000
4@@ -4,3 +4,4 @@
5 debian/app-template/
6 debian/*.debhelper.log
7 debian/*.substvars
8+po/Makefile
9
10=== modified file 'debian/changelog'
11--- debian/changelog 2013-02-12 16:27:32 +0000
12+++ debian/changelog 2013-05-28 12:28:29 +0000
13@@ -1,3 +1,9 @@
14+ubuntu-weather-app (0.2) raring; urgency=low
15+
16+ * Added support for packaging and installing translations
17+
18+ -- David Planella <david.planella@ubuntu.com> Tue, 28 May 2013 14:21:33 +0200
19+
20 ubuntu-weather-app (0.1) raring; urgency=low
21
22 * Initial release
23
24=== modified file 'debian/rules'
25--- debian/rules 2013-04-19 07:14:52 +0000
26+++ debian/rules 2013-05-28 12:28:29 +0000
27@@ -10,3 +10,12 @@
28 override_dh_install:
29 tests/autopilot/install_autopilot.sh $(CURDIR)
30 dh_install --fail-missing
31+ appname=ubuntu-weather-app; \
32+ for pofile in $(shell find ./po -name "*.po"); do \
33+ pofilename="$${pofile##*/}"; \
34+ langcode="$${pofilename%.*}"; \
35+ localedir="debian/$$appname/usr/share/locale/$$langcode/LC_MESSAGES"; \
36+ mkdir -p $$localedir; \
37+ mofile="$$localedir/$$appname.mo"; \
38+ msgfmt -o $$mofile $$pofile; \
39+ done
40
41=== modified file 'po/po.pro'
42--- po/po.pro 2013-02-12 16:18:48 +0000
43+++ po/po.pro 2013-05-28 12:28:29 +0000
44@@ -4,27 +4,23 @@
45 PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)
46
47 SOURCECODE = ../*.qml
48+SOURCECODE += ../components/*.qml
49+SOURCECODE += ../components/*.js
50
51 message("")
52 message(" Project Name: $$PROJECTNAME ")
53 message(" Source Code: $$SOURCECODE ")
54 message("")
55 message(" run 'make pot' to generate the pot file from source code. ")
56-message(" run 'make translate' to create a new translation (po) based on pot. ")
57 message(" run 'make mo' to generate the mo files from po files. ")
58 message(" run 'qmake; make install' to install the mo files. ")
59 message("")
60
61 ## generate pot file 'make pot'
62 potfile.target = pot
63-potfile.commands = xgettext -o $${PROJECTNAME}.pot --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr $${SOURCECODE}
64+potfile.commands = xgettext -o $${PROJECTNAME}.pot --copyright=\"Canonical Ltd. \" --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr --keyword=tr:1,2 $${SOURCECODE}
65 QMAKE_EXTRA_TARGETS += potfile
66
67-## poedit target for new translations 'make translate'
68-poedit.target = translate
69-poedit.commands = cp messages.pot new_language.po; poedit new_language.po
70-QMAKE_EXTRA_TARGETS += poedit
71-
72 ## generate mo files 'make mo'
73 mofiles.target = mo
74 mofiles.commands = msgfmt *.po
75
76=== added file 'po/ubuntu-weather-app.pot'
77--- po/ubuntu-weather-app.pot 1970-01-01 00:00:00 +0000
78+++ po/ubuntu-weather-app.pot 2013-05-28 12:28:29 +0000
79@@ -0,0 +1,67 @@
80+# Ubuntu Touch Weather app translations
81+# Copyright (C) 2013 Canonical Ltd.
82+# This file is distributed under the same license as the ubuntu-weather-app package.
83+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
84+#
85+#, fuzzy
86+msgid ""
87+msgstr ""
88+"Project-Id-Version: ubuntu-weather-app\n"
89+"Report-Msgid-Bugs-To: \n"
90+"POT-Creation-Date: 2013-05-28 14:18+0200\n"
91+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
92+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
93+"Language-Team: LANGUAGE <LL@li.org>\n"
94+"Language: \n"
95+"MIME-Version: 1.0\n"
96+"Content-Type: text/plain; charset=CHARSET\n"
97+"Content-Transfer-Encoding: 8bit\n"
98+
99+#: ../components/AddLocationDialog.qml:13
100+msgid "Add location"
101+msgstr ""
102+
103+#: ../components/AddLocationDialog.qml:14
104+msgid "Write a city name o pick it by your location"
105+msgstr ""
106+
107+#: ../components/AddLocationDialog.qml:42
108+msgid "Enter a city name"
109+msgstr ""
110+
111+#: ../components/AddLocationDialog.qml:62
112+msgid "Use my own location"
113+msgstr ""
114+
115+#: ../components/AddLocationDialog.qml:74
116+msgid "Cancel"
117+msgstr ""
118+
119+#: ../components/CurrentWeather.qml:59
120+msgid "Max."
121+msgstr ""
122+
123+#: ../components/CurrentWeather.qml:98
124+#: ../components/DayWeatherComponent.qml:50
125+msgid "Min."
126+msgstr ""
127+
128+#: ../components/LoadingComponent.qml:29
129+msgid "Loading"
130+msgstr ""
131+
132+#: ../components/LocationTab.qml:64 ../components/LocationTabEmpty.qml:20
133+msgid "Add"
134+msgstr ""
135+
136+#: ../components/LocationTab.qml:77
137+msgid "Remove"
138+msgstr ""
139+
140+#: ../components/LocationTab.qml:87
141+msgid "Refresh"
142+msgstr ""
143+
144+#: ../components/LocationTabEmpty.qml:8
145+msgid "No Locations"
146+msgstr ""

Subscribers

People subscribed via source and target branches