Merge lp:~agateau/unity-2d/gettext into lp:unity-2d/3.0

Proposed by Aurélien Gâteau
Status: Merged
Approved by: Florian Boucault
Approved revision: 407
Merged at revision: 401
Proposed branch: lp:~agateau/unity-2d/gettext
Merge into: lp:unity-2d/3.0
Diff against target: 667 lines (+485/-1)
18 files modified
CMakeLists.txt (+2/-0)
debian/control (+1/-1)
debian/rules (+2/-0)
launcher/app/launcher.cpp (+6/-0)
libunity-2d-private/src/CMakeLists.txt (+1/-0)
libunity-2d-private/src/gettexttranslator.cpp (+85/-0)
libunity-2d-private/src/gettexttranslator.h (+61/-0)
libunity-2d-private/tests/CMakeLists.txt (+11/-0)
libunity-2d-private/tests/config-test.h.in (+1/-0)
libunity-2d-private/tests/fr.po (+10/-0)
libunity-2d-private/tests/gettexttest.cpp (+74/-0)
panel/app/main.cpp (+6/-0)
places/app/CMakeLists.txt (+2/-0)
places/app/places.cpp (+8/-0)
po/CMakeLists.txt (+7/-0)
po/fr.po (+92/-0)
po/unity-2d.pot (+92/-0)
po/update-unity-2d-pot (+24/-0)
To merge this branch: bzr merge lp:~agateau/unity-2d/gettext
Reviewer Review Type Date Requested Status
Florian Boucault Pending
unity-2d-team Pending
Review via email: mp+50605@code.launchpad.net

Commit message

[i18n] Implement gettext support

This branch provides:
- a po/update-unity-2d-pot file, which extracts translatable string from the code and generates po/unity-2d.pot
- a po/ dir containing translations, using the unity-2d domain. These files are compiled and installed as part of the regular "all" and "install" targets.
- a hook in debian/rules updating the .pot file, for LP to fetch it

Description of the change

This branch provides:
- a po/update-unity-2d-pot file, which extracts translatable string from the code and generates po/unity-2d.pot
- a po/ dir containing translations, using the unity-2d domain. These files are compiled and installed as part of the regular "all" and "install" targets.
- a hook in debian/rules updating the .pot file, for LP to fetch it

The debian/rules hook is inspired from Unity 3D hook. I hope it works, but having David Planella confirmation on it would be better.

To post a comment you must log in.
lp:~agateau/unity-2d/gettext updated
405. By Aurélien Gâteau

Create a update-po target

Attempting to mimick standard practices

406. By Aurélien Gâteau

Use the update-po target

407. By Aurélien Gâteau

update-unity-2d-pot requires bzr

Revision history for this message
Florian Boucault (fboucault) wrote :

Great stuff.

make check fails on me, any clue?

test 1
    Start 1: gettexttest

1: Test command: /home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttest
1: Test timeout computed to be: 9.99988e+06
1: ********* Start testing of GettextTest *********
1: Config: Using QTest library 4.7.0, Qt 4.7.0
1: PASS : GettextTest::initTestCase()
1: FAIL! : GettextTest::testTranslate() Compared values are not the same
1: Actual (QCoreApplication::translate("", "Hello")): Hello
1: Expected (QString("Bonjour")): Bonjour
1: Loc: [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttest.cpp(46)]
1: FAIL! : GettextTest::testTranslateWithDisambiguation() Compared values are not the same
1: Actual (QCoreApplication::translate("", "Close", "Closing a door")): Closing a door?Close
1: Expected (QString("Fermer")): Fermer
1: Loc: [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttest.cpp(58)]
1: FAIL! : GettextTest::testTranslateWithEmptyNonNullDisambiguation() Compared values are not the same
1: Actual (QCoreApplication::translate("", "Hello", "")): Hello
1: Expected (QString("Bonjour")): Bonjour
1: Loc: [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttest.cpp(68)]
1: PASS : GettextTest::cleanupTestCase()
1: Totals: 2 passed, 3 failed, 0 skipped
1: ********* Finished testing of GettextTest *********
1/4 Test #1: gettexttest ......................***Failed 0.01 sec

Revision history for this message
Aurélien Gâteau (agateau) wrote :

On Wednesday 23 February 2011 03:32:58 you wrote:
> Great stuff.
>
>
> make check fails on me, any clue?

Can you check the build generated a file named:
locale/fr/LC_MESSAGES/gettexttest.mo
in the test build dir?

If it is there, do you have the French locale installed? It works here even
with locales set to C, but I still have the French locale installed. Maybe it
is necessary.

> test 1
> Start 1: gettexttest
>
> 1: Test command:
> /home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttest
> 1: Test timeout computed to be: 9.99988e+06
> 1: ********* Start testing of GettextTest *********
> 1: Config: Using QTest library 4.7.0, Qt 4.7.0
> 1: PASS : GettextTest::initTestCase()
> 1: FAIL! : GettextTest::testTranslate() Compared values are not the same
> 1: Actual (QCoreApplication::translate("", "Hello")): Hello
> 1: Expected (QString("Bonjour")): Bonjour
> 1: Loc:
> [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttes
> t.cpp(46)] 1: FAIL! : GettextTest::testTranslateWithDisambiguation()
> Compared values are not the same 1: Actual
> (QCoreApplication::translate("", "Close", "Closing a door")): Closing a
> door?Close 1: Expected (QString("Fermer")): Fermer
> 1: Loc:
> [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttes
> t.cpp(58)] 1: FAIL! :
> GettextTest::testTranslateWithEmptyNonNullDisambiguation() Compared values
> are not the same 1: Actual (QCoreApplication::translate("", "Hello",
> "")): Hello 1: Expected (QString("Bonjour")): Bonjour
> 1: Loc:
> [/home/kaleo/Projects/upicek/unity-2d/libunity-2d-private/tests/gettexttes
> t.cpp(68)] 1: PASS : GettextTest::cleanupTestCase()
> 1: Totals: 2 passed, 3 failed, 0 skipped
> 1: ********* Finished testing of GettextTest *********
> 1/4 Test #1: gettexttest ......................***Failed 0.01 sec

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 2011-02-02 16:57:00 +0000
3+++ CMakeLists.txt 2011-02-21 16:05:48 +0000
4@@ -14,6 +14,7 @@
5 include(FindPkgConfig)
6 find_package(Qt4 REQUIRED)
7 find_package(X11 REQUIRED)
8+find_package(Gettext REQUIRED)
9
10 include_directories(
11 ${CMAKE_BINARY_DIR}
12@@ -35,3 +36,4 @@
13 add_subdirectory(panel)
14 add_subdirectory(places)
15 add_subdirectory(spread)
16+add_subdirectory(po)
17
18=== modified file 'debian/control'
19--- debian/control 2011-02-19 15:02:59 +0000
20+++ debian/control 2011-02-21 16:05:48 +0000
21@@ -4,7 +4,7 @@
22 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
23 XSBC-Original-Maintainer: Olivier Tilloy <olivier.tilloy@canonical.com>
24 Build-Depends: cdbs, debhelper (>= 7),
25- cmake, libqt4-dev,
26+ cmake, bzr, libqt4-dev,
27 libglib2.0-dev, libgtk2.0-dev, libwnck-dev,
28 libqtgconf-dev, libqtbamf-dev, libqtdee-dev, libdbusmenu-qt-dev,
29 libx11-dev, libindicator-dev, libgtk2.0-dev, libutouch-geis-dev
30
31=== modified file 'debian/rules'
32--- debian/rules 2011-01-14 22:05:40 +0000
33+++ debian/rules 2011-02-21 16:05:48 +0000
34@@ -6,3 +6,5 @@
35 include /usr/share/cdbs/1/rules/debhelper.mk
36 include /usr/share/cdbs/1/class/cmake.mk
37
38+common-build-indep::
39+ $(MAKE) -C $(DEB_BUILDDIR) update-po
40
41=== modified file 'launcher/app/launcher.cpp'
42--- launcher/app/launcher.cpp 2011-02-18 20:31:06 +0000
43+++ launcher/app/launcher.cpp 2011-02-21 16:05:48 +0000
44@@ -20,6 +20,7 @@
45 #include <gtk/gtk.h>
46
47 // unity-2d
48+#include <gettexttranslator.h>
49 #include <gnomesessionclient.h>
50
51 // Qt
52@@ -62,6 +63,11 @@
53 with that prefix resolves properly. */
54 QDir::addSearchPath("artwork", unity2dDirectory() + "/launcher/artwork");
55
56+ /* Configure translations */
57+ GettextTranslator translator;
58+ translator.init("unity-2d", INSTALL_PREFIX "/share/locale");
59+ QApplication::installTranslator(&translator);
60+
61 /* Panel containing the QML declarative view */
62 Unity2dPanel panel;
63 panel.setEdge(Unity2dPanel::LeftEdge);
64
65=== modified file 'libunity-2d-private/src/CMakeLists.txt'
66--- libunity-2d-private/src/CMakeLists.txt 2011-02-11 11:37:55 +0000
67+++ libunity-2d-private/src/CMakeLists.txt 2011-02-21 16:05:48 +0000
68@@ -1,5 +1,6 @@
69 # Sources
70 set(libunity-2d-private_SRCS
71+ gettexttranslator.cpp
72 gnomesessionclient.cpp
73 keyboardmodifiersmonitor.cpp
74 unity2dapplication.cpp
75
76=== added file 'libunity-2d-private/src/gettexttranslator.cpp'
77--- libunity-2d-private/src/gettexttranslator.cpp 1970-01-01 00:00:00 +0000
78+++ libunity-2d-private/src/gettexttranslator.cpp 2011-02-21 16:05:48 +0000
79@@ -0,0 +1,85 @@
80+/*
81+ * This file is part of unity-2d
82+ *
83+ * Copyright 2011 Canonical Ltd.
84+ *
85+ * Authors:
86+ * - Aurélien Gâteau <aurelien.gateau@canonical.com>
87+ *
88+ * This program is free software; you can redistribute it and/or modify
89+ * it under the terms of the GNU General Public License as published by
90+ * the Free Software Foundation; version 3.
91+ *
92+ * This program is distributed in the hope that it will be useful,
93+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
94+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95+ * GNU General Public License for more details.
96+ *
97+ * You should have received a copy of the GNU General Public License
98+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
99+ */
100+// Self
101+#include "gettexttranslator.h"
102+
103+// Local
104+#include <debug_p.h>
105+
106+// Qt
107+
108+// libc
109+#include <libintl.h>
110+
111+struct GettextTranslatorPrivate
112+{
113+};
114+
115+GettextTranslator::GettextTranslator(QObject* parent)
116+: QTranslator(parent)
117+, d(new GettextTranslatorPrivate)
118+{
119+}
120+
121+GettextTranslator::~GettextTranslator()
122+{
123+ delete d;
124+}
125+
126+QString GettextTranslator::translate(const char* context, const char* sourceText, const char* disambiguation) const
127+{
128+ char* text;
129+ if (qstrlen(disambiguation) > 0) {
130+ // Constant copied from /usr/share/gettext/gettext.h
131+ const char GETTEXT_CONTEXT_GLUE = '\004';
132+ QByteArray array(disambiguation);
133+ array.append(GETTEXT_CONTEXT_GLUE);
134+ array.append(sourceText);
135+ text = gettext(array.constData());
136+ } else {
137+ text = gettext(sourceText);
138+ }
139+ return QString::fromUtf8(text);
140+}
141+
142+bool GettextTranslator::init(const QString& domain_, const QString& directory)
143+{
144+ const char* domain = domain_.toLocal8Bit().constData();
145+ char* out;
146+ setlocale(LC_ALL, "");
147+ out = bindtextdomain(domain, directory.toLocal8Bit().constData());
148+ if (!out) {
149+ qWarning("bindtextdomain() failed: %s", strerror(errno));
150+ return false;
151+ }
152+
153+ out = textdomain(domain);
154+ if (!out) {
155+ qWarning("textdomain() failed: %s", strerror(errno));
156+ return false;
157+ }
158+
159+ bind_textdomain_codeset(domain, "UTF-8");
160+
161+ return true;
162+}
163+
164+#include "gettexttranslator.moc"
165
166=== added file 'libunity-2d-private/src/gettexttranslator.h'
167--- libunity-2d-private/src/gettexttranslator.h 1970-01-01 00:00:00 +0000
168+++ libunity-2d-private/src/gettexttranslator.h 2011-02-21 16:05:48 +0000
169@@ -0,0 +1,61 @@
170+/*
171+ * This file is part of unity-2d
172+ *
173+ * Copyright 2011 Canonical Ltd.
174+ *
175+ * Authors:
176+ * - Aurélien Gâteau <aurelien.gateau@canonical.com>
177+ *
178+ * This program is free software; you can redistribute it and/or modify
179+ * it under the terms of the GNU General Public License as published by
180+ * the Free Software Foundation; version 3.
181+ *
182+ * This program is distributed in the hope that it will be useful,
183+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
184+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
185+ * GNU General Public License for more details.
186+ *
187+ * You should have received a copy of the GNU General Public License
188+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
189+ */
190+#ifndef GETTEXTTRANSLATOR_H
191+#define GETTEXTTRANSLATOR_H
192+
193+// Local
194+
195+// Qt
196+#include <QTranslator>
197+
198+struct GettextTranslatorPrivate;
199+/**
200+ * A QTranslator which uses gettext
201+ */
202+class GettextTranslator : public QTranslator
203+{
204+ Q_OBJECT
205+public:
206+ GettextTranslator(QObject* parent = 0);
207+ ~GettextTranslator();
208+
209+ /**
210+ * Reimplemented. Note that context is ignored.
211+ */
212+ QString translate(const char* context, const char* sourceText, const char* disambiguation=0) const;
213+
214+ /**
215+ * Initialize the translator.
216+ * Translations are then loaded from:
217+ * $directory/$lang/locale/LC_MESSAGES/$domainName.mo
218+ */
219+ bool init(const QString& domainName, const QString& directory);
220+
221+private:
222+ Q_DISABLE_COPY(GettextTranslator)
223+ GettextTranslatorPrivate* const d;
224+
225+ // Hide "load" methods because they are used to load .qm
226+ bool load(const QString& filename, const QString& directory = QString(), const QString& search_delimiters = QString(), const QString& suffix = QString());
227+ bool load(const uchar* data, int len);
228+};
229+
230+#endif /* GETTEXTTRANSLATOR_H */
231
232=== modified file 'libunity-2d-private/tests/CMakeLists.txt'
233--- libunity-2d-private/tests/CMakeLists.txt 2011-02-10 09:31:13 +0000
234+++ libunity-2d-private/tests/CMakeLists.txt 2011-02-21 16:05:48 +0000
235@@ -1,4 +1,6 @@
236 # Common settings
237+configure_file(config-test.h.in config-test.h)
238+
239 include_directories(
240 ${libunity-2d-private_SOURCE_DIR}/src
241 ${CMAKE_CURRENT_BINARY_DIR}
242@@ -29,10 +31,19 @@
243 endmacro(libunity_2d_tests)
244
245 libunity_2d_tests(
246+ gettexttest
247 keyboardmodifiersmonitortest
248 paneltest
249 )
250
251+add_custom_target(gettexttest_po COMMAND
252+ mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/locale/fr/LC_MESSAGES/
253+ && ${GETTEXT_MSGFMT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fr.po
254+ -o ${CMAKE_CURRENT_BINARY_DIR}/locale/fr/LC_MESSAGES/gettexttest.mo
255+ )
256+
257+add_dependencies(gettexttest gettexttest_po)
258+
259 # gnomesessionclienttest
260 add_executable(gnomesessionclienttesthelper
261 gnomesessionclienttesthelper.cpp
262
263=== added file 'libunity-2d-private/tests/config-test.h.in'
264--- libunity-2d-private/tests/config-test.h.in 1970-01-01 00:00:00 +0000
265+++ libunity-2d-private/tests/config-test.h.in 2011-02-21 16:05:48 +0000
266@@ -0,0 +1,1 @@
267+#define TEST_LOCALE_DIR "${CMAKE_CURRENT_BINARY_DIR}/locale"
268
269=== added file 'libunity-2d-private/tests/fr.po'
270--- libunity-2d-private/tests/fr.po 1970-01-01 00:00:00 +0000
271+++ libunity-2d-private/tests/fr.po 2011-02-21 16:05:48 +0000
272@@ -0,0 +1,10 @@
273+msgid "Hello"
274+msgstr "Bonjour"
275+
276+msgctxt "Closing a door"
277+msgid "Close"
278+msgstr "Fermer"
279+
280+msgctxt "Not far"
281+msgid "Close"
282+msgstr "Près"
283
284=== added file 'libunity-2d-private/tests/gettexttest.cpp'
285--- libunity-2d-private/tests/gettexttest.cpp 1970-01-01 00:00:00 +0000
286+++ libunity-2d-private/tests/gettexttest.cpp 2011-02-21 16:05:48 +0000
287@@ -0,0 +1,74 @@
288+/*
289+ * This file is part of unity-2d
290+ *
291+ * Copyright 2011 Canonical Ltd.
292+ *
293+ * Authors:
294+ * - Aurélien Gâteau <aurelien.gateau@canonical.com>
295+ *
296+ * This program is free software; you can redistribute it and/or modify
297+ * it under the terms of the GNU General Public License as published by
298+ * the Free Software Foundation; version 3.
299+ *
300+ * This program is distributed in the hope that it will be useful,
301+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
302+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303+ * GNU General Public License for more details.
304+ *
305+ * You should have received a copy of the GNU General Public License
306+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
307+ */
308+
309+// Local
310+#include <gettexttranslator.h>
311+
312+// Qt
313+#include <QCoreApplication>
314+#include <QtTest>
315+
316+#include <config-test.h>
317+
318+class GettextTest : public QObject
319+{
320+ Q_OBJECT
321+private Q_SLOTS:
322+ void initTestCase()
323+ {
324+ setenv("LC_MESSAGES", "fr_FR.utf8", 1 /* overwrite */);
325+ GettextTranslator* translator = new GettextTranslator(QCoreApplication::instance());
326+ QVERIFY(translator->init("gettexttest", TEST_LOCALE_DIR));
327+ QCoreApplication::installTranslator(translator);
328+ }
329+
330+ void testTranslate()
331+ {
332+ QCOMPARE(QCoreApplication::translate("", "Hello"),
333+ QString("Bonjour"));
334+
335+ QCOMPARE(QCoreApplication::translate("Qt-context-is-ignored", "Hello"),
336+ QString("Bonjour"));
337+
338+ QCOMPARE(QCoreApplication::translate("", "Not translated"),
339+ QString("Not translated"));
340+ }
341+
342+ void testTranslateWithDisambiguation()
343+ {
344+ QCOMPARE(QCoreApplication::translate("", "Close", "Closing a door"),
345+ QString("Fermer"));
346+
347+ QCOMPARE(QCoreApplication::translate("", "Close", "Not far"),
348+ QString::fromUtf8("Près"));
349+ }
350+
351+ void testTranslateWithEmptyNonNullDisambiguation()
352+ {
353+ // qsTr in QML calls translate with an empty but non-null disambiguation string
354+ QCOMPARE(QCoreApplication::translate("", "Hello", ""),
355+ QString("Bonjour"));
356+ }
357+};
358+
359+QTEST_MAIN(GettextTest)
360+
361+#include "gettexttest.moc"
362
363=== modified file 'panel/app/main.cpp'
364--- panel/app/main.cpp 2011-02-01 15:15:56 +0000
365+++ panel/app/main.cpp 2011-02-21 16:05:48 +0000
366@@ -30,6 +30,7 @@
367 #include <legacytray/legacytrayapplet.h>
368
369 // Unity
370+#include <gettexttranslator.h>
371 #include <gnomesessionclient.h>
372 #include <unity2dpanel.h>
373 #include <unity2dapplication.h>
374@@ -105,6 +106,11 @@
375 GnomeSessionClient client(INSTALL_PREFIX "/share/applications/unity-2d-panel.desktop");
376 client.connectToSessionManager();
377
378+ /* Configure translations */
379+ GettextTranslator translator;
380+ translator.init("unity-2d", INSTALL_PREFIX "/share/locale");
381+ QApplication::installTranslator(&translator);
382+
383 Unity2dPanel panel;
384 panel.setEdge(Unity2dPanel::TopEdge);
385 panel.setPalette(getPalette());
386
387=== modified file 'places/app/CMakeLists.txt'
388--- places/app/CMakeLists.txt 2011-01-10 18:25:49 +0000
389+++ places/app/CMakeLists.txt 2011-02-21 16:05:48 +0000
390@@ -26,6 +26,7 @@
391 include_directories(
392 ${CMAKE_CURRENT_BINARY_DIR}
393 ${QTGCONF_INCLUDE_DIRS}
394+ ${libunity-2d-private_SOURCE_DIR}/src
395 )
396
397 target_link_libraries(unity-2d-places
398@@ -36,6 +37,7 @@
399 ${QTGCONF_LDFLAGS}
400 ${X11_Xext_LIB}
401 ${X11_X11_LIB}
402+ unity-2d-private
403 )
404
405 # Install
406
407=== modified file 'places/app/places.cpp'
408--- places/app/places.cpp 2011-02-02 16:57:00 +0000
409+++ places/app/places.cpp 2011-02-21 16:05:48 +0000
410@@ -29,6 +29,9 @@
411
412 #include <X11/Xlib.h>
413
414+// unity-2d
415+#include <gettexttranslator.h>
416+
417 #include "dashdeclarativeview.h"
418 #include "superkeymonitor.h"
419
420@@ -110,6 +113,11 @@
421 return -1;
422 }
423
424+ /* Configure translations */
425+ GettextTranslator translator;
426+ translator.init("unity-2d", INSTALL_PREFIX "/share/locale");
427+ QApplication::installTranslator(&translator);
428+
429 /* The dash window is borderless and not moveable by the user, yet not
430 fullscreen */
431 view.setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);
432
433=== added directory 'po'
434=== added file 'po/CMakeLists.txt'
435--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
436+++ po/CMakeLists.txt 2011-02-21 16:05:48 +0000
437@@ -0,0 +1,7 @@
438+file(GLOB PO_FILES *.po)
439+
440+add_custom_target(update-po
441+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/update-unity-2d-pot
442+ )
443+
444+gettext_create_translations(unity-2d.pot ALL ${PO_FILES})
445
446=== added file 'po/fr.po'
447--- po/fr.po 1970-01-01 00:00:00 +0000
448+++ po/fr.po 2011-02-21 16:05:48 +0000
449@@ -0,0 +1,92 @@
450+# SOME DESCRIPTIVE TITLE.
451+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
452+# This file is distributed under the same license as the PACKAGE package.
453+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
454+#
455+#, fuzzy
456+msgid ""
457+msgstr ""
458+"Project-Id-Version: PACKAGE VERSION\n"
459+"Report-Msgid-Bugs-To: https://bugs.launchpad.net/unity-2d/+filebug\n"
460+"POT-Creation-Date: 2011-02-21 11:06+0100\n"
461+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
462+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
463+"Language-Team: LANGUAGE <LL@li.org>\n"
464+"Language: \n"
465+"MIME-Version: 1.0\n"
466+"Content-Type: text/plain; charset=UTF-8\n"
467+"Content-Transfer-Encoding: 8bit\n"
468+
469+#: launcher/UnityApplications/trash.cpp:198
470+#, c-format, qt-plural-format
471+msgid "%n item(s) in trash"
472+msgstr ""
473+
474+#: launcher/UnityApplications/launcherdevice.cpp:222
475+msgid "Eject"
476+msgstr ""
477+
478+#: places/Home.qml:111
479+msgid "Email & Chat"
480+msgstr ""
481+
482+#: launcher/UnityApplications/trash.cpp:205
483+msgid "Empty Trash"
484+msgstr ""
485+
486+#: places/Home.qml:123
487+msgid "Files & Folders"
488+msgstr ""
489+
490+#: places/Home.qml:105
491+msgid "Games"
492+msgstr ""
493+
494+#: places/Home.qml:129
495+msgid "Get New Apps"
496+msgstr ""
497+
498+#: launcher/UnityApplications/launcherapplication.cpp:719
499+msgid "Keep In Launcher"
500+msgstr ""
501+
502+#: places/Home.qml:93
503+msgid "Music"
504+msgstr ""
505+
506+#: places/Home.qml:117
507+msgid "Office"
508+msgstr ""
509+
510+#: places/Home.qml:99
511+msgid "Photos & Videos"
512+msgstr ""
513+
514+#: launcher/UnityApplications/launcherapplication.cpp:727
515+msgid "Quit"
516+msgstr ""
517+
518+#: launcher/UnityApplications/launcherapplication.cpp:719
519+msgid "Remove From Launcher"
520+msgstr ""
521+
522+#: places/SearchEntry.qml:114
523+msgid "Search"
524+msgstr ""
525+
526+#: places/SearchEntry.qml:112
527+#, qt-format
528+msgid "Search %1"
529+msgstr ""
530+
531+#: launcher/UnityApplications/trash.cpp:71
532+msgid "Trash"
533+msgstr ""
534+
535+#: places/Home.qml:77
536+msgid "Web"
537+msgstr ""
538+
539+#: launcher/UnityApplications/workspaces.cpp:66
540+msgid "Workspaces"
541+msgstr ""
542
543=== added file 'po/unity-2d.pot'
544--- po/unity-2d.pot 1970-01-01 00:00:00 +0000
545+++ po/unity-2d.pot 2011-02-21 16:05:48 +0000
546@@ -0,0 +1,92 @@
547+# SOME DESCRIPTIVE TITLE.
548+# Copyright (C) YEAR Canonical Ltd
549+# This file is distributed under the same license as the PACKAGE package.
550+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
551+#
552+#, fuzzy
553+msgid ""
554+msgstr ""
555+"Project-Id-Version: unity-2d\n"
556+"Report-Msgid-Bugs-To: https://bugs.launchpad.net/unity-2d/+filebug\n"
557+"POT-Creation-Date: 2011-02-21 14:42+0100\n"
558+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
559+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
560+"Language-Team: LANGUAGE <LL@li.org>\n"
561+"Language: \n"
562+"MIME-Version: 1.0\n"
563+"Content-Type: text/plain; charset=CHARSET\n"
564+"Content-Transfer-Encoding: 8bit\n"
565+
566+#: launcher/UnityApplications/workspaces.cpp:66
567+msgid "Workspaces"
568+msgstr ""
569+
570+#: launcher/UnityApplications/launcherdevice.cpp:222
571+msgid "Eject"
572+msgstr ""
573+
574+#: launcher/UnityApplications/trash.cpp:71
575+msgid "Trash"
576+msgstr ""
577+
578+#: launcher/UnityApplications/trash.cpp:198
579+#, c-format, qt-plural-format
580+msgid "%n item(s) in trash"
581+msgstr ""
582+
583+#: launcher/UnityApplications/trash.cpp:205
584+msgid "Empty Trash"
585+msgstr ""
586+
587+#: launcher/UnityApplications/launcherapplication.cpp:719
588+msgid "Keep In Launcher"
589+msgstr ""
590+
591+#: launcher/UnityApplications/launcherapplication.cpp:719
592+msgid "Remove From Launcher"
593+msgstr ""
594+
595+#: launcher/UnityApplications/launcherapplication.cpp:727
596+msgid "Quit"
597+msgstr ""
598+
599+#: places/SearchEntry.qml:112
600+#, qt-format
601+msgid "Search %1"
602+msgstr ""
603+
604+#: places/SearchEntry.qml:114
605+msgid "Search"
606+msgstr ""
607+
608+#: places/Home.qml:77
609+msgid "Web"
610+msgstr ""
611+
612+#: places/Home.qml:93
613+msgid "Music"
614+msgstr ""
615+
616+#: places/Home.qml:99
617+msgid "Photos & Videos"
618+msgstr ""
619+
620+#: places/Home.qml:105
621+msgid "Games"
622+msgstr ""
623+
624+#: places/Home.qml:111
625+msgid "Email & Chat"
626+msgstr ""
627+
628+#: places/Home.qml:117
629+msgid "Office"
630+msgstr ""
631+
632+#: places/Home.qml:123
633+msgid "Files & Folders"
634+msgstr ""
635+
636+#: places/Home.qml:129
637+msgid "Get New Apps"
638+msgstr ""
639
640=== added file 'po/update-unity-2d-pot'
641--- po/update-unity-2d-pot 1970-01-01 00:00:00 +0000
642+++ po/update-unity-2d-pot 2011-02-21 16:05:48 +0000
643@@ -0,0 +1,24 @@
644+#!/bin/sh
645+set -e
646+cd $(dirname $0)
647+PO_DIR=$PWD
648+
649+# Create a list of files to scan
650+UPDATE_POT_DIR=$(mktemp --tmpdir -d unity-2d-update-pot.XXXXX)
651+trap 'rm -rf "$UPDATE_POT_DIR"' EXIT
652+bzr export $UPDATE_POT_DIR
653+cd $UPDATE_POT_DIR
654+find -name '*.cpp' > lst
655+find -name '*.qml' >> lst
656+
657+# Generate pot from our list
658+xgettext \
659+ --output $PO_DIR/unity-2d.pot \
660+ --files-from lst \
661+ --qt --c++ \
662+ --keyword=tr --keyword=qsTr \
663+ --package-name unity-2d \
664+ --copyright-holder "Canonical Ltd" \
665+ --msgid-bugs-address "https://bugs.launchpad.net/unity-2d/+filebug"
666+
667+echo "$PROGNAME: $PO_DIR/unity-2d.pot updated"

Subscribers

People subscribed via source and target branches