Merge lp:~dobey/indicator-datetime/fix-i18n into lp:indicator-datetime

Proposed by dobey
Status: Merged
Approved by: Pete Woods
Approved revision: 479
Merged at revision: 476
Proposed branch: lp:~dobey/indicator-datetime/fix-i18n
Merge into: lp:indicator-datetime
Prerequisite: lp:~dobey/indicator-datetime/fix-coverage
Diff against target: 286 lines (+105/-118)
9 files modified
.bzrignore (+7/-11)
cmake/FindIntltool.cmake (+0/-23)
cmake/Translations.cmake (+0/-37)
debian/control (+2/-1)
po/CMakeLists.txt (+13/-3)
po/LINGUAS (+0/-31)
po/Makevars (+0/-7)
po/POTFILES.in (+0/-5)
po/indicator-datetime.pot (+83/-0)
To merge this branch: bzr merge lp:~dobey/indicator-datetime/fix-i18n
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Approve
Charles Kerr (community) Approve
Pete Woods (community) Approve
Review via email: mp+316355@code.launchpad.net

Commit message

Use cmake-extras intltool module, and keep pot file in vcs.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:478
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-datetime-ci/15/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1597
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1604
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1382/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1382/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1382/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1382/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1382/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1382
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1382/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-datetime-ci/15/rebuild

review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) :
review: Approve
Revision history for this message
Pete Woods (pete-woods) :
review: Needs Fixing
479. By dobey

Depend on newer cmake-extras for FILTER in intltool command.

Revision history for this message
Pete Woods (pete-woods) :
review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:479
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-datetime-ci/17/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1663
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1670
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1448/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1448/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1448/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1448/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1448/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1448
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1448/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-datetime-ci/17/rebuild

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 2014-02-20 04:04:52 +0000
3+++ .bzrignore 2017-02-09 17:29:10 +0000
4@@ -1,20 +1,16 @@
5-compile
6-m4
7-src/libdatetime.la
8-src/libdatetime_la-indicator-datetime.lo
9 src/indicator-datetime-service
10-po/indicator-datetime.pot
11-indicator-datetime-[0-9].[0-9].[0-9].tar.gz
12-indicator-datetime-[0-9].[0-9].[0-9].tar.xz
13-indicator-datetime-[0-9].[0-9].[0-9].tar.gz.asc
14-indicator-datetime-[0-9].[0-9].[0-9].tar.xz.asc
15 data/indicator-datetime.service
16 data/org.ayatana.indicator.datetime.gschema.valid
17 src/gen-datetime-service.xml.c
18 src/gen-datetime-service.xml.h
19-build-aux
20 data/com.canonical.indicator.datetime.gschema.valid
21-src/libdatetime_la-utils.lo
22 data/indicator-datetime.conf
23 data/indicator-datetime.desktop
24 data/indicator-datetime.upstart.desktop
25+
26+build/
27+po/Makevars
28+po/Makefile.in.in
29+po/POTFILES.in
30+po/LINGUAS
31+
32
33=== removed file 'cmake/FindIntltool.cmake'
34--- cmake/FindIntltool.cmake 2013-10-18 19:22:54 +0000
35+++ cmake/FindIntltool.cmake 1970-01-01 00:00:00 +0000
36@@ -1,23 +0,0 @@
37-# FindIntltool.cmake
38-#
39-# Jim Nelson <jim@yorba.org>
40-# Copyright 2012 Yorba Foundation
41-
42-find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
43-
44-if (INTLTOOL_MERGE_EXECUTABLE)
45- set (INTLTOOL_MERGE_FOUND TRUE)
46-else (INTLTOOL_MERGE_EXECUTABLE)
47- set (INTLTOOL_MERGE_FOUND FALSE)
48-endif (INTLTOOL_MERGE_EXECUTABLE)
49-
50-if (INTLTOOL_MERGE_FOUND)
51- macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
52- add_custom_target (geary.desktop ALL
53- ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
54- ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop
55- )
56- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications)
57- endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
58-endif (INTLTOOL_MERGE_FOUND)
59-
60
61=== removed file 'cmake/Translations.cmake'
62--- cmake/Translations.cmake 2014-08-07 17:42:15 +0000
63+++ cmake/Translations.cmake 1970-01-01 00:00:00 +0000
64@@ -1,37 +0,0 @@
65-# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
66-
67-macro(add_translations_directory NLS_PACKAGE)
68- add_custom_target (i18n ALL)
69- find_program (MSGFMT_EXECUTABLE msgfmt)
70- file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
71- foreach (PO_INPUT ${PO_FILES})
72- get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
73- set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
74- add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
75-
76- install (FILES ${MO_OUTPUT} DESTINATION
77- ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
78- RENAME ${NLS_PACKAGE}.mo)
79- endforeach (PO_INPUT ${PO_FILES})
80-endmacro(add_translations_directory)
81-
82-
83-macro(add_translations_catalog NLS_PACKAGE)
84- add_custom_target (pot COMMENT “Building translation catalog.”)
85- find_program (XGETTEXT_EXECUTABLE xgettext)
86-
87- # init this list, which will hold all the sources across all dirs
88- set(SOURCES "")
89-
90- # add each directory's sources to the overall sources list
91- foreach(FILES_INPUT ${ARGN})
92- set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
93- file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
94- set (SOURCES ${SOURCES} ${DIR_SOURCES})
95- endforeach()
96-
97- add_custom_command (TARGET pot COMMAND
98- ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
99- ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
100- )
101-endmacro()
102
103=== modified file 'debian/control'
104--- debian/control 2017-02-09 17:29:09 +0000
105+++ debian/control 2017-02-09 17:29:10 +0000
106@@ -3,11 +3,12 @@
107 Priority: optional
108 Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>
109 Build-Depends: cmake,
110- cmake-extras (>= 0.10),
111+ cmake-extras (>= 1.1),
112 dbus,
113 debhelper (>= 9),
114 dh-translations,
115 gcovr,
116+ intltool,
117 lcov,
118 libglib2.0-dev (>= 2.35.4),
119 libnotify-dev (>= 0.7.6),
120
121=== modified file 'po/CMakeLists.txt'
122--- po/CMakeLists.txt 2014-02-10 22:59:02 +0000
123+++ po/CMakeLists.txt 2017-02-09 17:29:10 +0000
124@@ -1,3 +1,13 @@
125-include (Translations)
126-add_translations_directory ("${GETTEXT_PACKAGE}")
127-add_translations_catalog ("${GETTEXT_PACKAGE}" ../src/)
128+find_package(Intltool REQUIRED)
129+
130+intltool_update_potfile(
131+ KEYWORDS "_" "_:1,2" "N_" "N_:1,2"
132+ GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
133+ COPYRIGHT_HOLDER "Canonical Ltd."
134+ FILTER "test/*"
135+)
136+
137+intltool_install_translations(
138+ ALL
139+ GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
140+)
141
142=== removed file 'po/LINGUAS'
143--- po/LINGUAS 2010-03-10 20:21:03 +0000
144+++ po/LINGUAS 1970-01-01 00:00:00 +0000
145@@ -1,31 +0,0 @@
146-ar
147-bg
148-cs
149-da
150-de
151-el
152-es
153-fi
154-fr
155-he
156-hi
157-hr
158-hu
159-it
160-ja
161-ko
162-nb
163-nl
164-pl
165-pt
166-pt_BR
167-ro
168-ru
169-sk
170-sl
171-sr
172-sv
173-th
174-tr
175-zh_CN
176-zh_TW
177
178=== removed file 'po/Makevars'
179--- po/Makevars 2010-12-15 16:55:27 +0000
180+++ po/Makevars 1970-01-01 00:00:00 +0000
181@@ -1,7 +0,0 @@
182-DOMAIN = $(PACKAGE)
183-subdir = po
184-top_builddir = ..
185-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=T_ --from-code=UTF-8
186-COPYRIGHT_HOLDER = Canonical Ltd.
187-MSGID_BUGS_ADDRESS = ted@canonical.com
188-EXTRA_LOCALE_CATEGORIES =
189
190=== removed file 'po/POTFILES.in'
191--- po/POTFILES.in 2014-02-19 15:35:51 +0000
192+++ po/POTFILES.in 1970-01-01 00:00:00 +0000
193@@ -1,5 +0,0 @@
194-src/formatter.cpp
195-src/formatter-desktop.cpp
196-src/menu.cpp
197-src/snap.cpp
198-src/utils.c
199
200=== added file 'po/indicator-datetime.pot'
201--- po/indicator-datetime.pot 1970-01-01 00:00:00 +0000
202+++ po/indicator-datetime.pot 2017-02-09 17:29:10 +0000
203@@ -0,0 +1,83 @@
204+# SOME DESCRIPTIVE TITLE.
205+# Copyright (C) YEAR Canonical Ltd.
206+# This file is distributed under the same license as the PACKAGE package.
207+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
208+#
209+#, fuzzy
210+msgid ""
211+msgstr ""
212+"Project-Id-Version: PACKAGE VERSION\n"
213+"Report-Msgid-Bugs-To: \n"
214+"POT-Creation-Date: 2017-02-09 12:28-0500\n"
215+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
216+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
217+"Language-Team: LANGUAGE <LL@li.org>\n"
218+"Language: \n"
219+"MIME-Version: 1.0\n"
220+"Content-Type: text/plain; charset=UTF-8\n"
221+"Content-Transfer-Encoding: 8bit\n"
222+
223+#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
224+#. Format string for the day on the first menuitem in the datetime indicator.
225+#. This format string gives the full weekday, date, month, and year.
226+#. en_US example: "%A, %B %e %Y" --> Saturday, October 31 2020"
227+#. en_GB example: "%A, %e %B %Y" --> Saturday, 31 October 2020"
228+#: ../src/menu.cpp:329
229+msgid "%A, %e %B %Y"
230+msgstr ""
231+
232+#. add the 'Add Event…' menuitem
233+#: ../src/menu.cpp:429
234+msgid "Add Event…"
235+msgstr ""
236+
237+#: ../src/menu.cpp:439
238+msgid "Clock"
239+msgstr ""
240+
241+#: ../src/menu.cpp:491
242+msgid "Time & Date settings…"
243+msgstr ""
244+
245+#: ../src/menu.cpp:546
246+msgid "Date and Time"
247+msgstr ""
248+
249+#: ../src/menu.cpp:596
250+msgid "Time & Date"
251+msgstr ""
252+
253+#: ../src/menu.cpp:601
254+#, c-format
255+msgid "%s (has alarms)"
256+msgstr ""
257+
258+#. * strftime(3) format for abbreviated weekday,
259+#. hours, minutes in a 12h locale; e.g. Wed, 2:00 PM
260+#: ../src/snap.cpp:144
261+msgid "%a, %l:%M %p"
262+msgstr ""
263+
264+#. * A strftime(3) format for abbreviated weekday,
265+#. hours, minutes in a 24h locale; e.g. Wed, 14:00
266+#: ../src/snap.cpp:148
267+msgid "%a, %H:%M"
268+msgstr ""
269+
270+#: ../src/snap.cpp:153
271+#, c-format
272+msgid "Alarm %s"
273+msgstr ""
274+
275+#: ../src/snap.cpp:154
276+#, c-format
277+msgid "Event %s"
278+msgstr ""
279+
280+#: ../src/snap.cpp:162 ../src/snap.cpp:166
281+msgid "OK"
282+msgstr ""
283+
284+#: ../src/snap.cpp:163
285+msgid "Snooze"
286+msgstr ""

Subscribers

People subscribed via source and target branches