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

Proposed by David Planella
Status: Merged
Approved by: Martin Borho
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 Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
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.
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
Martin Borho (martin-borho) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2013-04-04 11:05:43 +0000
+++ .bzrignore 2013-05-28 12:28:29 +0000
@@ -4,3 +4,4 @@
4debian/app-template/4debian/app-template/
5debian/*.debhelper.log5debian/*.debhelper.log
6debian/*.substvars6debian/*.substvars
7po/Makefile
78
=== modified file 'debian/changelog'
--- debian/changelog 2013-02-12 16:27:32 +0000
+++ debian/changelog 2013-05-28 12:28:29 +0000
@@ -1,3 +1,9 @@
1ubuntu-weather-app (0.2) raring; urgency=low
2
3 * Added support for packaging and installing translations
4
5 -- David Planella <david.planella@ubuntu.com> Tue, 28 May 2013 14:21:33 +0200
6
1ubuntu-weather-app (0.1) raring; urgency=low7ubuntu-weather-app (0.1) raring; urgency=low
28
3 * Initial release9 * Initial release
410
=== modified file 'debian/rules'
--- debian/rules 2013-04-19 07:14:52 +0000
+++ debian/rules 2013-05-28 12:28:29 +0000
@@ -10,3 +10,12 @@
10override_dh_install:10override_dh_install:
11 tests/autopilot/install_autopilot.sh $(CURDIR)11 tests/autopilot/install_autopilot.sh $(CURDIR)
12 dh_install --fail-missing12 dh_install --fail-missing
13 appname=ubuntu-weather-app; \
14 for pofile in $(shell find ./po -name "*.po"); do \
15 pofilename="$${pofile##*/}"; \
16 langcode="$${pofilename%.*}"; \
17 localedir="debian/$$appname/usr/share/locale/$$langcode/LC_MESSAGES"; \
18 mkdir -p $$localedir; \
19 mofile="$$localedir/$$appname.mo"; \
20 msgfmt -o $$mofile $$pofile; \
21 done
1322
=== modified file 'po/po.pro'
--- po/po.pro 2013-02-12 16:18:48 +0000
+++ po/po.pro 2013-05-28 12:28:29 +0000
@@ -4,27 +4,23 @@
4PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)4PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)
55
6SOURCECODE = ../*.qml6SOURCECODE = ../*.qml
7SOURCECODE += ../components/*.qml
8SOURCECODE += ../components/*.js
79
8message("")10message("")
9message(" Project Name: $$PROJECTNAME ")11message(" Project Name: $$PROJECTNAME ")
10message(" Source Code: $$SOURCECODE ")12message(" Source Code: $$SOURCECODE ")
11message("")13message("")
12message(" run 'make pot' to generate the pot file from source code. ")14message(" run 'make pot' to generate the pot file from source code. ")
13message(" run 'make translate' to create a new translation (po) based on pot. ")
14message(" run 'make mo' to generate the mo files from po files. ")15message(" run 'make mo' to generate the mo files from po files. ")
15message(" run 'qmake; make install' to install the mo files. ")16message(" run 'qmake; make install' to install the mo files. ")
16message("")17message("")
1718
18## generate pot file 'make pot'19## generate pot file 'make pot'
19potfile.target = pot20potfile.target = pot
20potfile.commands = xgettext -o $${PROJECTNAME}.pot --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr $${SOURCECODE}21potfile.commands = xgettext -o $${PROJECTNAME}.pot --copyright=\"Canonical Ltd. \" --package-name $${PROJECTNAME} --qt --c++ --add-comments=TRANSLATORS --keyword=tr --keyword=tr:1,2 $${SOURCECODE}
21QMAKE_EXTRA_TARGETS += potfile22QMAKE_EXTRA_TARGETS += potfile
2223
23## poedit target for new translations 'make translate'
24poedit.target = translate
25poedit.commands = cp messages.pot new_language.po; poedit new_language.po
26QMAKE_EXTRA_TARGETS += poedit
27
28## generate mo files 'make mo'24## generate mo files 'make mo'
29mofiles.target = mo25mofiles.target = mo
30mofiles.commands = msgfmt *.po26mofiles.commands = msgfmt *.po
3127
=== added file 'po/ubuntu-weather-app.pot'
--- po/ubuntu-weather-app.pot 1970-01-01 00:00:00 +0000
+++ po/ubuntu-weather-app.pot 2013-05-28 12:28:29 +0000
@@ -0,0 +1,67 @@
1# Ubuntu Touch Weather app translations
2# Copyright (C) 2013 Canonical Ltd.
3# This file is distributed under the same license as the ubuntu-weather-app package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2013-05-28 14:18+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#: ../components/AddLocationDialog.qml:13
21msgid "Add location"
22msgstr ""
23
24#: ../components/AddLocationDialog.qml:14
25msgid "Write a city name o pick it by your location"
26msgstr ""
27
28#: ../components/AddLocationDialog.qml:42
29msgid "Enter a city name"
30msgstr ""
31
32#: ../components/AddLocationDialog.qml:62
33msgid "Use my own location"
34msgstr ""
35
36#: ../components/AddLocationDialog.qml:74
37msgid "Cancel"
38msgstr ""
39
40#: ../components/CurrentWeather.qml:59
41msgid "Max."
42msgstr ""
43
44#: ../components/CurrentWeather.qml:98
45#: ../components/DayWeatherComponent.qml:50
46msgid "Min."
47msgstr ""
48
49#: ../components/LoadingComponent.qml:29
50msgid "Loading"
51msgstr ""
52
53#: ../components/LocationTab.qml:64 ../components/LocationTabEmpty.qml:20
54msgid "Add"
55msgstr ""
56
57#: ../components/LocationTab.qml:77
58msgid "Remove"
59msgstr ""
60
61#: ../components/LocationTab.qml:87
62msgid "Refresh"
63msgstr ""
64
65#: ../components/LocationTabEmpty.qml:8
66msgid "No Locations"
67msgstr ""

Subscribers

People subscribed via source and target branches