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

Proposed by dobey
Status: Merged
Approved by: Charles Kerr
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
Pete Woods (community) Approve
Ted Gould (community) Needs Information
unity-api-1-bot continuous-integration Approve
Review via email: mp+316599@code.launchpad.net

Commit message

Use intltool support from cmake-extras.

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: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)
Revision history for this message
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
Revision history for this message
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.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2017-02-07 18:14:52 +0000
@@ -0,0 +1,3 @@
1build/
2po/Makefile.in.in
3po/POTFILES.in
04
=== removed directory 'cmake'
=== removed file 'cmake/Translations.cmake'
--- cmake/Translations.cmake 2014-08-21 04:03:20 +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 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2014-08-21 04:03:20 +0000
+++ po/CMakeLists.txt 2017-02-07 18:14:52 +0000
@@ -1,3 +1,12 @@
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)
8
9intltool_install_translations(
10 ALL
11 GETTEXT_PACKAGE ${GETTEXT_PACKAGE}
12)
413
=== removed file 'po/POTFILES.in'
--- po/POTFILES.in 2016-03-16 13:40:57 +0000
+++ po/POTFILES.in 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1src/rotation-lock.cpp
2src/usb-snap.cpp
30
=== added file 'po/indicator-display.pot'
--- po/indicator-display.pot 1970-01-01 00:00:00 +0000
+++ po/indicator-display.pot 2017-02-07 18:14:52 +0000
@@ -0,0 +1,43 @@
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-07 13:08-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=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#: ../src/rotation-lock.cpp:125
21msgid "Rotation Lock"
22msgstr ""
23
24#: ../src/rotation-lock.cpp:136
25msgid "Rotation"
26msgstr ""
27
28#: ../src/usb-snap.cpp:107
29#, c-format
30msgid "The computer's RSA key fingerprint is: %s"
31msgstr ""
32
33#: ../src/usb-snap.cpp:112
34msgid "Allow"
35msgstr ""
36
37#: ../src/usb-snap.cpp:114
38msgid "Don't Allow"
39msgstr ""
40
41#: ../src/usb-snap.cpp:126
42msgid "Allow USB Debugging?"
43msgstr ""

Subscribers

People subscribed via source and target branches