Merge lp:~paulliu/unity/i18n into lp:unity/phablet

Proposed by Ying-Chun Liu
Status: Merged
Approved by: Michał Sawicz
Approved revision: no longer in the source branch.
Merged at revision: 693
Proposed branch: lp:~paulliu/unity/i18n
Merge into: lp:unity/phablet
Diff against target: 491 lines (+302/-7)
19 files modified
CMakeLists.txt (+5/-0)
CODING (+4/-1)
Components/PageHeader.qml (+1/-1)
Dash/DashApps.qml (+1/-1)
Dash/DashHome.qml (+1/-1)
Dash/DashMusic.qml (+1/-1)
Dash/DashPeople.qml (+1/-1)
Dash/DashVideos.qml (+1/-1)
Shell.qml (+6/-0)
debian/changelog (+4/-0)
debian/control (+1/-0)
debian/qml-phone-shell.install (+1/-0)
main.cpp (+5/-0)
paths.h.in (+4/-0)
po/CMakeLists.txt (+18/-0)
po/pl.po (+74/-0)
po/unity8.pot (+74/-0)
po/update-unity-pot (+26/-0)
po/zh_TW.po (+74/-0)
To merge this branch: bzr merge lp:~paulliu/unity/i18n
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+165160@code.launchpad.net

Commit message

Add i18n support.

Description of the change

Add i18n support.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:682
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~paulliu/unity/i18n/+merge/165160/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-phablet-ci/997/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/unity-phablet-qmluitests/972/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-raring-armhf-ci/873/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-raring-i386-ci/877/console

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity-phablet-ci/997/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Hey,

* we need a commit message
* unity.pot needs to be in the repository - and updated manually
* the domain should be "unity8" to not conflict with current unity
* no need for that
  49 + id: i18nbinding
* debian/control should have libc6-dev in Build-depends for that
  +#include <libintl.h>

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

12 +find_package(Gettext REQUIRED)

245 +find_package(Gettext REQUIRED)

Duplicated - should be enough to keep it in po/CMakeLists.txt

=====

77 - - Add/update Vcs-Browser, Vcs-Bzr and add a notice to uploaders.
78 + - Add/update Vcs-Browser, Vcs-Bzr and add a notice to uploaders.

There's a bunch of changes to debian/* that should not happen in this MR, and I'm not sure about putting ${} depends at the end, isn't it a convention to keep them at the beginning?

=====

259 +ADD_CUSTOM_TARGET(pot_file ${_all}

the ${_all} seems undefined?

=====

257 + COMMAND ./update-unity-pot

You should use ${CMAKE_CURRENT_SOURCE_DIR} here

=====

286 +#: builddir/install/share/qml-phone-shell/Components/PageHeader.qml:300
...

Builddir should be excluded from pot generation.

=====

362 + --copyright-holder "Canonical Ltd"

Missing dot at the end.

=====

370 +# SOME DESCRIPTIVE TITLE.
371 +# Copyright (C) YEAR Canonical Ltd
372 +# This file is distributed under the same license as the PACKAGE package.
373 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.

378 +"Project-Id-Version: unity\n"
379 +"Report-Msgid-Bugs-To: \n"
380 +"POT-Creation-Date: 2013-05-22 20:32+0800\n"
381 +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
382 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
383 +"Language-Team: LANGUAGE <email address hidden>\n"
384 +"Language: \n"

Please complete the header data.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

Here's the Polish translation, please include it with your MR: http://pastebin.ubuntu.com/5694011/

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-05-22 16:16:08 +0000
3+++ CMakeLists.txt 2013-05-24 13:58:40 +0000
4@@ -216,3 +216,8 @@
5 install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/lib${UNITY_API_LIB}
6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc)
7 endif()
8+
9+#
10+# Translation
11+#
12+add_subdirectory(po)
13
14=== modified file 'CODING'
15--- CODING 2013-05-10 12:04:09 +0000
16+++ CODING 2013-05-24 13:58:40 +0000
17@@ -52,7 +52,10 @@
18 this will:
19 - create an EDS address book
20 - populate the address book with sample data
21-
22+- to get the translations work, currently you have to do make install to
23+ put the *.mo files into correct structure. We'll look for a better solution
24+ later.
25+ $ cd builddir; make install
26
27 Running UnityNext on devices
28 ============================
29
30=== modified file 'Components/PageHeader.qml'
31--- Components/PageHeader.qml 2013-05-01 16:56:34 +0000
32+++ Components/PageHeader.qml 2013-05-24 13:58:40 +0000
33@@ -297,7 +297,7 @@
34 right: parent.right
35 }
36
37- ListItem.Standard { enabled: false; text: "Recent searches" }
38+ ListItem.Standard { enabled: false; text: i18n.tr("Recent searches") }
39
40 Repeater {
41 id: recentSearches
42
43=== modified file 'Dash/DashApps.qml'
44--- Dash/DashApps.qml 2013-04-29 23:47:43 +0000
45+++ Dash/DashApps.qml 2013-05-24 13:58:40 +0000
46@@ -160,7 +160,7 @@
47 pageHeader: PageHeader {
48 id: pageHeader
49 width: categoryView.width
50- text: "Apps"
51+ text: i18n.tr("Apps")
52 searchEntryEnabled: true
53 searchHistory: lensView.searchHistory
54 }
55
56=== modified file 'Dash/DashHome.qml'
57--- Dash/DashHome.qml 2013-05-21 11:49:22 +0000
58+++ Dash/DashHome.qml 2013-05-24 13:58:40 +0000
59@@ -176,7 +176,7 @@
60 }
61 pageHeader: PageHeader {
62 width: listView.width
63- text: "Home"
64+ text: i18n.tr("Home")
65 }
66 }
67 }
68
69=== modified file 'Dash/DashMusic.qml'
70--- Dash/DashMusic.qml 2013-04-29 23:47:43 +0000
71+++ Dash/DashMusic.qml 2013-05-24 13:58:40 +0000
72@@ -89,7 +89,7 @@
73 pageHeader: PageHeader {
74 id: pageHeader
75 width: categoryView.width
76- text: "Music"
77+ text: i18n.tr("Music")
78 searchEntryEnabled: true
79 searchHistory: lensView.searchHistory
80 }
81
82=== modified file 'Dash/DashPeople.qml'
83--- Dash/DashPeople.qml 2013-04-29 23:47:43 +0000
84+++ Dash/DashPeople.qml 2013-05-24 13:58:40 +0000
85@@ -113,7 +113,7 @@
86 pageHeader: PageHeader {
87 id: pageHeader
88 width: categoryView.width
89- text: "People"
90+ text: i18n.tr("People")
91 searchEntryEnabled: true
92 searchHistory: lensView.searchHistory
93 }
94
95=== modified file 'Dash/DashVideos.qml'
96--- Dash/DashVideos.qml 2013-05-08 11:22:15 +0000
97+++ Dash/DashVideos.qml 2013-05-24 13:58:40 +0000
98@@ -145,7 +145,7 @@
99 pageHeader: PageHeader {
100 id: pageHeader
101 width: categoryView.width
102- text: "Videos"
103+ text: i18n.tr("Videos")
104 searchEntryEnabled: true
105 searchHistory: lensView.searchHistory
106 }
107
108=== modified file 'Shell.qml'
109--- Shell.qml 2013-05-23 09:54:15 +0000
110+++ Shell.qml 2013-05-24 13:58:40 +0000
111@@ -514,6 +514,12 @@
112 blockInput: true
113 }
114
115+ Binding {
116+ target: i18n
117+ property: "domain"
118+ value: "unity8"
119+ }
120+
121 //FIXME: This should be handled in the input stack, keyboard shouldnt propagate
122 MouseArea {
123 anchors.bottom: parent.bottom
124
125=== modified file 'debian/changelog'
126--- debian/changelog 2013-05-22 21:00:05 +0000
127+++ debian/changelog 2013-05-24 13:58:40 +0000
128@@ -3,6 +3,10 @@
129 * Replacing the music and ski safari mock apps with calendar and weather in
130 the launcher (LP: #1178262).
131
132+ [ Ying-Chun Liu (PaulLiu) ]
133+ * Add i18n support.
134+ * Add libc6-dev to Build-Depends.
135+
136 -- Sergio Schvezov <sergio.schvezov@canonical.com> Wed, 22 May 2013 17:34:27 -0300
137
138 qml-phone-shell (1.77) raring; urgency=low
139
140=== modified file 'debian/control'
141--- debian/control 2013-05-17 15:22:09 +0000
142+++ debian/control 2013-05-24 13:58:40 +0000
143@@ -8,6 +8,7 @@
144 graphviz,
145 libboost-regex1.49-dev (>= 1.49),
146 libboost1.49-dev (>= 1.49),
147+ libc6-dev,
148 libdee-qt5-dev (>= 3.0),
149 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
150 libgl1-mesa-dri,
151
152=== modified file 'debian/qml-phone-shell.install'
153--- debian/qml-phone-shell.install 2013-05-20 15:42:40 +0000
154+++ debian/qml-phone-shell.install 2013-05-24 13:58:40 +0000
155@@ -1,5 +1,6 @@
156 /usr/bin/qml-phone-shell
157 /usr/share/applications/qml-phone-shell.desktop
158+/usr/share/locale/*
159 /usr/share/qml-phone-shell/Applications/*
160 /usr/share/qml-phone-shell/Bottombar/*
161 /usr/share/qml-phone-shell/Components/*
162
163=== modified file 'main.cpp'
164--- main.cpp 2013-05-22 16:16:08 +0000
165+++ main.cpp 2013-05-24 13:58:40 +0000
166@@ -24,6 +24,7 @@
167 #include <QtQml/QQmlEngine>
168 #include <qpa/qplatformnativeinterface.h>
169 #include <QLibrary>
170+#include <libintl.h>
171
172 // local
173 #include "paths.h"
174@@ -82,6 +83,10 @@
175 }
176 }
177
178+ if (!isRunningInstalled()) {
179+ bindtextdomain("unity8", translationDirectory().toUtf8().data());
180+ }
181+
182 QQuickView* view = new QQuickView();
183 view->setResizeMode(QQuickView::SizeRootObjectToView);
184 view->setTitle("Qml Phone Shell");
185
186=== modified file 'paths.h.in'
187--- paths.h.in 2013-04-18 18:21:23 +0000
188+++ paths.h.in 2013-05-24 13:58:40 +0000
189@@ -27,6 +27,10 @@
190 return installed;
191 }
192
193+inline QString translationDirectory() {
194+ return QString("@CMAKE_INSTALL_PREFIX@/share/locale");
195+}
196+
197 inline QString shellAppDirectory() {
198 if (isRunningInstalled()) {
199 return QString("@CMAKE_INSTALL_PREFIX@/@SHELL_APP_DIR@/");
200
201=== added directory 'po'
202=== added file 'po/CMakeLists.txt'
203--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
204+++ po/CMakeLists.txt 2013-05-24 13:58:40 +0000
205@@ -0,0 +1,18 @@
206+cmake_minimum_required(VERSION 2.8.9)
207+find_package(Gettext REQUIRED)
208+
209+SET(POT_FILE
210+ unity8.pot
211+)
212+
213+FILE(GLOB PO_FILES
214+ *.po
215+)
216+
217+GETTEXT_CREATE_TRANSLATIONS(${POT_FILE} ALL ${PO_FILES})
218+ADD_CUSTOM_COMMAND(OUTPUT ${POT_FILE}
219+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/update-unity-pot
220+)
221+ADD_CUSTOM_TARGET(pot_file
222+ DEPENDS ${POT_FILE}
223+)
224
225=== added file 'po/pl.po'
226--- po/pl.po 1970-01-01 00:00:00 +0000
227+++ po/pl.po 2013-05-24 13:58:40 +0000
228@@ -0,0 +1,74 @@
229+# Unity 8 translation for Polish language.
230+# Copyright (C) 2013 Canonical Ltd.
231+# This file is distributed under the same license as the unity package.
232+# Michał Sawicz <michal.sawicz@canonical.com> 2013
233+#
234+msgid ""
235+msgstr ""
236+"Project-Id-Version: unity8\n"
237+"Report-Msgid-Bugs-To: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>\n"
238+"POT-Creation-Date: 2013-05-24 15:31+0200\n"
239+"PO-Revision-Date: 2013-05-24 15:32+0100\n"
240+"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
241+"Language-Team: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>\n"
242+"Language: pl\n"
243+"MIME-Version: 1.0\n"
244+"Content-Type: text/plain; charset=UTF-8\n"
245+"Content-Transfer-Encoding: 8bit\n"
246+"X-Generator: Poedit 1.5.4\n"
247+
248+#: Dash/DashApps.qml:163
249+msgid "Apps"
250+msgstr "Aplikacje"
251+
252+#: Hud/HudParametrizedActionsPage.qml:132
253+msgid "Confirm"
254+msgstr "Potwierdź"
255+
256+#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:38
257+msgid "Home"
258+msgstr "Dom"
259+
260+#: plugins/Unity/lenses.cpp:39
261+msgid "Home screen"
262+msgstr "Ekran domowy"
263+
264+#: Hud/Hud.qml:84
265+msgid "Loading. Please Wait..."
266+msgstr "Ładowanie. Proszę czekać..."
267+
268+#: Dash/DashMusic.qml:92
269+msgid "Music"
270+msgstr "Muzyka"
271+
272+#: Dash/DashPeople.qml:116
273+msgid "People"
274+msgstr "Ludzie"
275+
276+#: Components/PageHeader.qml:300
277+msgid "Recent searches"
278+msgstr "Ostatnie wyszukiwania"
279+
280+#: plugins/Unity/lenses.cpp:40
281+msgid "Search"
282+msgstr "Szukaj"
283+
284+#: plugins/Unity/lens.cpp:333
285+msgid "Sorry, there is nothing that matches your search."
286+msgstr "Nie znaleziono pasujących wyników."
287+
288+#: Hud/Hud.qml:89
289+msgid "Speak Now..."
290+msgstr "Mów teraz..."
291+
292+#: Hud/Hud.qml:94
293+msgid "Speaking..."
294+msgstr "Rozpoznanie..."
295+
296+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
297+msgid "Type or say a command"
298+msgstr "Wpisz lub wypowiedz polecenie"
299+
300+#: Dash/DashVideos.qml:148
301+msgid "Videos"
302+msgstr "Filmy"
303
304=== added file 'po/unity8.pot'
305--- po/unity8.pot 1970-01-01 00:00:00 +0000
306+++ po/unity8.pot 2013-05-24 13:58:40 +0000
307@@ -0,0 +1,74 @@
308+# SOME DESCRIPTIVE TITLE.
309+# Copyright (C) YEAR Canonical Ltd.
310+# This file is distributed under the same license as the PACKAGE package.
311+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
312+#
313+#, fuzzy
314+msgid ""
315+msgstr ""
316+"Project-Id-Version: unity8\n"
317+"Report-Msgid-Bugs-To: \n"
318+"POT-Creation-Date: 2013-05-24 21:36+0800\n"
319+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
320+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
321+"Language-Team: LANGUAGE <LL@li.org>\n"
322+"Language: \n"
323+"MIME-Version: 1.0\n"
324+"Content-Type: text/plain; charset=CHARSET\n"
325+"Content-Transfer-Encoding: 8bit\n"
326+
327+#: Components/PageHeader.qml:300
328+msgid "Recent searches"
329+msgstr ""
330+
331+#: Dash/DashApps.qml:163
332+msgid "Apps"
333+msgstr ""
334+
335+#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:38
336+msgid "Home"
337+msgstr ""
338+
339+#: Dash/DashMusic.qml:92
340+msgid "Music"
341+msgstr ""
342+
343+#: Dash/DashPeople.qml:116
344+msgid "People"
345+msgstr ""
346+
347+#: Dash/DashVideos.qml:148
348+msgid "Videos"
349+msgstr ""
350+
351+#: Hud/HudParametrizedActionsPage.qml:132
352+msgid "Confirm"
353+msgstr ""
354+
355+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
356+msgid "Type or say a command"
357+msgstr ""
358+
359+#: Hud/Hud.qml:84
360+msgid "Loading. Please Wait..."
361+msgstr ""
362+
363+#: Hud/Hud.qml:89
364+msgid "Speak Now..."
365+msgstr ""
366+
367+#: Hud/Hud.qml:94
368+msgid "Speaking..."
369+msgstr ""
370+
371+#: plugins/Unity/lens.cpp:333
372+msgid "Sorry, there is nothing that matches your search."
373+msgstr ""
374+
375+#: plugins/Unity/lenses.cpp:39
376+msgid "Home screen"
377+msgstr ""
378+
379+#: plugins/Unity/lenses.cpp:40
380+msgid "Search"
381+msgstr ""
382
383=== added file 'po/update-unity-pot'
384--- po/update-unity-pot 1970-01-01 00:00:00 +0000
385+++ po/update-unity-pot 2013-05-24 13:58:40 +0000
386@@ -0,0 +1,26 @@
387+#!/bin/sh
388+set -e
389+cd $(dirname $0)
390+PO_DIR=$PWD
391+
392+PROGNAME=$(basename $0)
393+
394+# Create a list of files to scan
395+GETTEXT_FILES=$(mktemp --tmpdir uitk-unity.lst.XXXXX)
396+trap 'rm -f "$GETTEXT_FILES"' EXIT
397+cd ..
398+find \( -name '*.h' -o -name '*.cpp' -o -name '*.qml' \) \
399+ -a ! \( -path './debian/*' -o -path './builddir/*' -o -path './build/*' -o -path './.bzr/*' \) | sort \
400+> $GETTEXT_FILES
401+
402+# Generate pot from our list
403+xgettext \
404+ --output $PO_DIR/unity8.pot \
405+ --files-from $GETTEXT_FILES \
406+ --qt --c++ \
407+ --add-comments=TRANSLATORS \
408+ --keyword=tr \
409+ --package-name="unity8" \
410+ --copyright-holder="Canonical Ltd."
411+
412+echo "$PROGNAME: $PO_DIR/auto-generated.pot updated"
413
414=== added file 'po/zh_TW.po'
415--- po/zh_TW.po 1970-01-01 00:00:00 +0000
416+++ po/zh_TW.po 2013-05-24 13:58:40 +0000
417@@ -0,0 +1,74 @@
418+# Unity 8 translation for Traditional Chinese language.
419+# Copyright (C) 2013 Canonical Ltd
420+# This file is distributed under the same license as the unity package.
421+# Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>, 2013.
422+#
423+#, fuzzy
424+msgid ""
425+msgstr ""
426+"Project-Id-Version: unity\n"
427+"Report-Msgid-Bugs-To: \n"
428+"POT-Creation-Date: 2013-05-24 21:36+0800\n"
429+"PO-Revision-Date: 2013-05-24 15:24+0800\n"
430+"Last-Translator: Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>\n"
431+"Language-Team: Ubuntu Touch Team <ubuntu-phone@lists.ubuntu.com>\n"
432+"Language: \n"
433+"MIME-Version: 1.0\n"
434+"Content-Type: text/plain; charset=UTF-8\n"
435+"Content-Transfer-Encoding: 8bit\n"
436+
437+#: Components/PageHeader.qml:300
438+msgid "Recent searches"
439+msgstr "近期的搜尋"
440+
441+#: Dash/DashApps.qml:163
442+msgid "Apps"
443+msgstr "應用程式"
444+
445+#: Dash/DashHome.qml:179 plugins/Unity/lenses.cpp:38
446+msgid "Home"
447+msgstr "家"
448+
449+#: Dash/DashMusic.qml:92
450+msgid "Music"
451+msgstr "音樂"
452+
453+#: Dash/DashPeople.qml:116
454+msgid "People"
455+msgstr "聯絡人"
456+
457+#: Dash/DashVideos.qml:148
458+msgid "Videos"
459+msgstr "影片"
460+
461+#: Hud/HudParametrizedActionsPage.qml:132
462+msgid "Confirm"
463+msgstr "確認 "
464+
465+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
466+msgid "Type or say a command"
467+msgstr "輸入或說出命令"
468+
469+#: Hud/Hud.qml:84
470+msgid "Loading. Please Wait..."
471+msgstr "戴入中。請梢等..."
472+
473+#: Hud/Hud.qml:89
474+msgid "Speak Now..."
475+msgstr "請說..."
476+
477+#: Hud/Hud.qml:94
478+msgid "Speaking..."
479+msgstr "說話中..."
480+
481+#: plugins/Unity/lens.cpp:333
482+msgid "Sorry, there is nothing that matches your search."
483+msgstr "抱歉, 沒有發現您搜尋的東西"
484+
485+#: plugins/Unity/lenses.cpp:39
486+msgid "Home screen"
487+msgstr "主畫面"
488+
489+#: plugins/Unity/lenses.cpp:40
490+msgid "Search"
491+msgstr "搜尋"

Subscribers

People subscribed via source and target branches