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
=== modified file '.bzrignore'
--- .bzrignore 2014-02-20 04:04:52 +0000
+++ .bzrignore 2017-02-09 17:29:10 +0000
@@ -1,20 +1,16 @@
1compile
2m4
3src/libdatetime.la
4src/libdatetime_la-indicator-datetime.lo
5src/indicator-datetime-service1src/indicator-datetime-service
6po/indicator-datetime.pot
7indicator-datetime-[0-9].[0-9].[0-9].tar.gz
8indicator-datetime-[0-9].[0-9].[0-9].tar.xz
9indicator-datetime-[0-9].[0-9].[0-9].tar.gz.asc
10indicator-datetime-[0-9].[0-9].[0-9].tar.xz.asc
11data/indicator-datetime.service2data/indicator-datetime.service
12data/org.ayatana.indicator.datetime.gschema.valid3data/org.ayatana.indicator.datetime.gschema.valid
13src/gen-datetime-service.xml.c4src/gen-datetime-service.xml.c
14src/gen-datetime-service.xml.h5src/gen-datetime-service.xml.h
15build-aux
16data/com.canonical.indicator.datetime.gschema.valid6data/com.canonical.indicator.datetime.gschema.valid
17src/libdatetime_la-utils.lo
18data/indicator-datetime.conf7data/indicator-datetime.conf
19data/indicator-datetime.desktop8data/indicator-datetime.desktop
20data/indicator-datetime.upstart.desktop9data/indicator-datetime.upstart.desktop
10
11build/
12po/Makevars
13po/Makefile.in.in
14po/POTFILES.in
15po/LINGUAS
16
2117
=== removed file 'cmake/FindIntltool.cmake'
--- cmake/FindIntltool.cmake 2013-10-18 19:22:54 +0000
+++ cmake/FindIntltool.cmake 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1# FindIntltool.cmake
2#
3# Jim Nelson <jim@yorba.org>
4# Copyright 2012 Yorba Foundation
5
6find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
7
8if (INTLTOOL_MERGE_EXECUTABLE)
9 set (INTLTOOL_MERGE_FOUND TRUE)
10else (INTLTOOL_MERGE_EXECUTABLE)
11 set (INTLTOOL_MERGE_FOUND FALSE)
12endif (INTLTOOL_MERGE_EXECUTABLE)
13
14if (INTLTOOL_MERGE_FOUND)
15 macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
16 add_custom_target (geary.desktop ALL
17 ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
18 ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop
19 )
20 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications)
21 endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
22endif (INTLTOOL_MERGE_FOUND)
23
240
=== removed file 'cmake/Translations.cmake'
--- cmake/Translations.cmake 2014-08-07 17:42:15 +0000
+++ cmake/Translations.cmake 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
2
3macro(add_translations_directory NLS_PACKAGE)
4 add_custom_target (i18n ALL)
5 find_program (MSGFMT_EXECUTABLE msgfmt)
6 file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
7 foreach (PO_INPUT ${PO_FILES})
8 get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
9 set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
10 add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
11
12 install (FILES ${MO_OUTPUT} DESTINATION
13 ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
14 RENAME ${NLS_PACKAGE}.mo)
15 endforeach (PO_INPUT ${PO_FILES})
16endmacro(add_translations_directory)
17
18
19macro(add_translations_catalog NLS_PACKAGE)
20 add_custom_target (pot COMMENT “Building translation catalog.”)
21 find_program (XGETTEXT_EXECUTABLE xgettext)
22
23 # init this list, which will hold all the sources across all dirs
24 set(SOURCES "")
25
26 # add each directory's sources to the overall sources list
27 foreach(FILES_INPUT ${ARGN})
28 set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
29 file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
30 set (SOURCES ${SOURCES} ${DIR_SOURCES})
31 endforeach()
32
33 add_custom_command (TARGET pot COMMAND
34 ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
35 ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
36 )
37endmacro()
380
=== modified file 'debian/control'
--- debian/control 2017-02-09 17:29:09 +0000
+++ debian/control 2017-02-09 17:29:10 +0000
@@ -3,11 +3,12 @@
3Priority: optional3Priority: optional
4Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>4Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>
5Build-Depends: cmake,5Build-Depends: cmake,
6 cmake-extras (>= 0.10),6 cmake-extras (>= 1.1),
7 dbus,7 dbus,
8 debhelper (>= 9), 8 debhelper (>= 9),
9 dh-translations,9 dh-translations,
10 gcovr,10 gcovr,
11 intltool,
11 lcov,12 lcov,
12 libglib2.0-dev (>= 2.35.4),13 libglib2.0-dev (>= 2.35.4),
13 libnotify-dev (>= 0.7.6),14 libnotify-dev (>= 0.7.6),
1415
=== modified file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2014-02-10 22:59:02 +0000
+++ po/CMakeLists.txt 2017-02-09 17:29:10 +0000
@@ -1,3 +1,13 @@
1include (Translations)1find_package(Intltool REQUIRED)
2add_translations_directory ("${GETTEXT_PACKAGE}")2
3add_translations_catalog ("${GETTEXT_PACKAGE}" ../src/)3intltool_update_potfile(
4 KEYWORDS "_" "_:1,2" "N_" "N_:1,2"
5 GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
6 COPYRIGHT_HOLDER "Canonical Ltd."
7 FILTER "test/*"
8)
9
10intltool_install_translations(
11 ALL
12 GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
13)
414
=== removed file 'po/LINGUAS'
--- po/LINGUAS 2010-03-10 20:21:03 +0000
+++ po/LINGUAS 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
1ar
2bg
3cs
4da
5de
6el
7es
8fi
9fr
10he
11hi
12hr
13hu
14it
15ja
16ko
17nb
18nl
19pl
20pt
21pt_BR
22ro
23ru
24sk
25sl
26sr
27sv
28th
29tr
30zh_CN
31zh_TW
320
=== removed file 'po/Makevars'
--- po/Makevars 2010-12-15 16:55:27 +0000
+++ po/Makevars 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
1DOMAIN = $(PACKAGE)
2subdir = po
3top_builddir = ..
4XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=T_ --from-code=UTF-8
5COPYRIGHT_HOLDER = Canonical Ltd.
6MSGID_BUGS_ADDRESS = ted@canonical.com
7EXTRA_LOCALE_CATEGORIES =
80
=== removed file 'po/POTFILES.in'
--- po/POTFILES.in 2014-02-19 15:35:51 +0000
+++ po/POTFILES.in 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
1src/formatter.cpp
2src/formatter-desktop.cpp
3src/menu.cpp
4src/snap.cpp
5src/utils.c
60
=== added file 'po/indicator-datetime.pot'
--- po/indicator-datetime.pot 1970-01-01 00:00:00 +0000
+++ po/indicator-datetime.pot 2017-02-09 17:29:10 +0000
@@ -0,0 +1,83 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR Canonical Ltd.
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2017-02-09 12:28-0500\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=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#. Translators, please edit/rearrange these strftime(3) tokens to suit your locale!
21#. Format string for the day on the first menuitem in the datetime indicator.
22#. This format string gives the full weekday, date, month, and year.
23#. en_US example: "%A, %B %e %Y" --> Saturday, October 31 2020"
24#. en_GB example: "%A, %e %B %Y" --> Saturday, 31 October 2020"
25#: ../src/menu.cpp:329
26msgid "%A, %e %B %Y"
27msgstr ""
28
29#. add the 'Add Event…' menuitem
30#: ../src/menu.cpp:429
31msgid "Add Event…"
32msgstr ""
33
34#: ../src/menu.cpp:439
35msgid "Clock"
36msgstr ""
37
38#: ../src/menu.cpp:491
39msgid "Time & Date settings…"
40msgstr ""
41
42#: ../src/menu.cpp:546
43msgid "Date and Time"
44msgstr ""
45
46#: ../src/menu.cpp:596
47msgid "Time & Date"
48msgstr ""
49
50#: ../src/menu.cpp:601
51#, c-format
52msgid "%s (has alarms)"
53msgstr ""
54
55#. * strftime(3) format for abbreviated weekday,
56#. hours, minutes in a 12h locale; e.g. Wed, 2:00 PM
57#: ../src/snap.cpp:144
58msgid "%a, %l:%M %p"
59msgstr ""
60
61#. * A strftime(3) format for abbreviated weekday,
62#. hours, minutes in a 24h locale; e.g. Wed, 14:00
63#: ../src/snap.cpp:148
64msgid "%a, %H:%M"
65msgstr ""
66
67#: ../src/snap.cpp:153
68#, c-format
69msgid "Alarm %s"
70msgstr ""
71
72#: ../src/snap.cpp:154
73#, c-format
74msgid "Event %s"
75msgstr ""
76
77#: ../src/snap.cpp:162 ../src/snap.cpp:166
78msgid "OK"
79msgstr ""
80
81#: ../src/snap.cpp:163
82msgid "Snooze"
83msgstr ""

Subscribers

People subscribed via source and target branches