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

Proposed by dobey on 2017-02-07
Status: Merged
Approved by: Charles Kerr on 2017-02-10
Approved revision: 25
Merged at revision: 27
Proposed branch: lp:~dobey/indicator-display/fix-i18n
Merge into: lp:indicator-display
Diff against target: 125 lines (+58/-42)
5 files modified
.bzrignore (+3/-0)
cmake/Translations.cmake (+0/-37)
po/CMakeLists.txt (+12/-3)
po/POTFILES.in (+0/-2)
po/indicator-display.pot (+43/-0)
To merge this branch: bzr merge lp:~dobey/indicator-display/fix-i18n
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve on 2017-02-10
Pete Woods (community) Approve on 2017-02-10
Ted Gould (community) 2017-02-07 Needs Information on 2017-02-07
unity-api-1-bot continuous-integration Approve on 2017-02-07
Review via email: mp+316599@code.launchpad.net

Commit message

Use intltool support from cmake-extras.

To post a comment you must log in.
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:25
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-display-ci/24/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1615
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1622
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1400/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1400/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1400/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1400/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1400/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1400
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1400/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Ted Gould (ted) wrote :

Since we're seeded I don't think we need to commit the pot file and merge translations. They'll get stripped and replaced with lang packs anyway.

review: Needs Information
dobey (dobey) wrote :

> Since we're seeded I don't think we need to commit the pot file and merge
> translations. They'll get stripped and replaced with lang packs anyway.

Having the template committed and launchpad translations set up, is standard practice, and this does not quite happen for PPAs, which one of our primary distribution points is.

Pete Woods (pete-woods) :
review: Approve
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2017-02-07 18:14:52 +0000
4@@ -0,0 +1,3 @@
5+build/
6+po/Makefile.in.in
7+po/POTFILES.in
8
9=== removed directory 'cmake'
10=== removed file 'cmake/Translations.cmake'
11--- cmake/Translations.cmake 2014-08-21 04:03:20 +0000
12+++ cmake/Translations.cmake 1970-01-01 00:00:00 +0000
13@@ -1,37 +0,0 @@
14-# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
15-
16-macro(add_translations_directory NLS_PACKAGE)
17- add_custom_target (i18n ALL)
18- find_program (MSGFMT_EXECUTABLE msgfmt)
19- file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
20- foreach (PO_INPUT ${PO_FILES})
21- get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
22- set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
23- add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
24-
25- install (FILES ${MO_OUTPUT} DESTINATION
26- ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
27- RENAME ${NLS_PACKAGE}.mo)
28- endforeach (PO_INPUT ${PO_FILES})
29-endmacro(add_translations_directory)
30-
31-
32-macro(add_translations_catalog NLS_PACKAGE)
33- add_custom_target (pot COMMENT “Building translation catalog.”)
34- find_program (XGETTEXT_EXECUTABLE xgettext)
35-
36- # init this list, which will hold all the sources across all dirs
37- set(SOURCES "")
38-
39- # add each directory's sources to the overall sources list
40- foreach(FILES_INPUT ${ARGN})
41- set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
42- file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
43- set (SOURCES ${SOURCES} ${DIR_SOURCES})
44- endforeach()
45-
46- add_custom_command (TARGET pot COMMAND
47- ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
48- ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
49- )
50-endmacro()
51
52=== modified file 'po/CMakeLists.txt'
53--- po/CMakeLists.txt 2014-08-21 04:03:20 +0000
54+++ po/CMakeLists.txt 2017-02-07 18:14:52 +0000
55@@ -1,3 +1,12 @@
56-include (Translations)
57-add_translations_directory("${GETTEXT_PACKAGE}")
58-add_translations_catalog("${GETTEXT_PACKAGE}" ../src/)
59+find_package(Intltool REQUIRED)
60+
61+intltool_update_potfile(
62+ KEYWORDS "_" "_:1,2" "N_" "N_:1,2"
63+ GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
64+ COPYRIGHT_HOLDER "Canonical Ltd."
65+)
66+
67+intltool_install_translations(
68+ ALL
69+ GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
70+)
71
72=== removed file 'po/POTFILES.in'
73--- po/POTFILES.in 2016-03-16 13:40:57 +0000
74+++ po/POTFILES.in 1970-01-01 00:00:00 +0000
75@@ -1,2 +0,0 @@
76-src/rotation-lock.cpp
77-src/usb-snap.cpp
78
79=== added file 'po/indicator-display.pot'
80--- po/indicator-display.pot 1970-01-01 00:00:00 +0000
81+++ po/indicator-display.pot 2017-02-07 18:14:52 +0000
82@@ -0,0 +1,43 @@
83+# SOME DESCRIPTIVE TITLE.
84+# Copyright (C) YEAR Canonical Ltd.
85+# This file is distributed under the same license as the PACKAGE package.
86+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
87+#
88+#, fuzzy
89+msgid ""
90+msgstr ""
91+"Project-Id-Version: PACKAGE VERSION\n"
92+"Report-Msgid-Bugs-To: \n"
93+"POT-Creation-Date: 2017-02-07 13:08-0500\n"
94+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
95+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
96+"Language-Team: LANGUAGE <LL@li.org>\n"
97+"Language: \n"
98+"MIME-Version: 1.0\n"
99+"Content-Type: text/plain; charset=CHARSET\n"
100+"Content-Transfer-Encoding: 8bit\n"
101+
102+#: ../src/rotation-lock.cpp:125
103+msgid "Rotation Lock"
104+msgstr ""
105+
106+#: ../src/rotation-lock.cpp:136
107+msgid "Rotation"
108+msgstr ""
109+
110+#: ../src/usb-snap.cpp:107
111+#, c-format
112+msgid "The computer's RSA key fingerprint is: %s"
113+msgstr ""
114+
115+#: ../src/usb-snap.cpp:112
116+msgid "Allow"
117+msgstr ""
118+
119+#: ../src/usb-snap.cpp:114
120+msgid "Don't Allow"
121+msgstr ""
122+
123+#: ../src/usb-snap.cpp:126
124+msgid "Allow USB Debugging?"
125+msgstr ""

Subscribers

People subscribed via source and target branches