Merge lp:~renatofilho/address-book-service/new-pot into lp:address-book-service

Proposed by Renato Araujo Oliveira Filho on 2015-09-21
Status: Merged
Approved by: Bill Filler on 2015-09-22
Approved revision: 162
Merged at revision: 160
Proposed branch: lp:~renatofilho/address-book-service/new-pot
Merge into: lp:address-book-service
Diff against target: 228 lines (+177/-3)
5 files modified
CMakeLists.txt (+7/-2)
cmake/modules/Translations.cmake (+42/-0)
debian/rules (+1/-1)
po/CMakeLists.txt (+3/-0)
po/address-book-service.pot (+124/-0)
To merge this branch: bzr merge lp:~renatofilho/address-book-service/new-pot
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-09-22
Ubuntu Phablet Team 2015-09-21 Pending
Review via email: mp+271818@code.launchpad.net

Commit Message

Added pot files for the new updater module.

To post a comment you must log in.
161. By Renato Araujo Oliveira Filho on 2015-09-21

Use relative path on pot file.

162. By Renato Araujo Oliveira Filho on 2015-09-21

Run tests sequentially.

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 2015-08-10 21:05:44 +0000
3+++ CMakeLists.txt 2015-09-21 18:20:39 +0000
4@@ -1,7 +1,7 @@
5-project(contatos)
6+project(address-book-service C CXX)
7
8 cmake_minimum_required(VERSION 2.8.9)
9-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
10+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
11
12 include(FindPkgConfig)
13 # Standard install paths
14@@ -29,6 +29,10 @@
15 set(EVOLUTION_ADDRESSBOOK_SERVICE_NAME "org.gnome.evolution.dataserver.AddressBook9")
16 endif()
17
18+set(PACKAGE ${CMAKE_PROJECT_NAME})
19+set(GETTEXT_PACKAGE "address-book-service")
20+add_definitions(-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}"
21+ -DGETTEXT_LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
22 set(CMAKE_INCLUDE_CURRENT_DIR ON)
23 set(CMAKE_AUTOMOC ON)
24 add_definitions(-std=c++11)
25@@ -77,6 +81,7 @@
26 add_subdirectory(src)
27 add_subdirectory(contacts)
28 add_subdirectory(upstart)
29+add_subdirectory(po)
30 if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc")
31 # Some tests fail when running on PPPC check bug #1294229
32 message(STATUS "Tests disable for ppc")
33
34=== added file 'cmake/modules/Translations.cmake'
35--- cmake/modules/Translations.cmake 1970-01-01 00:00:00 +0000
36+++ cmake/modules/Translations.cmake 2015-09-21 18:20:39 +0000
37@@ -0,0 +1,42 @@
38+# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
39+
40+macro(add_translations_directory NLS_PACKAGE)
41+ add_custom_target (i18n ALL)
42+ find_program (MSGFMT_EXECUTABLE msgfmt)
43+ file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
44+ foreach (PO_INPUT ${PO_FILES})
45+ get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
46+ set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
47+ add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
48+
49+ install (FILES ${MO_OUTPUT} DESTINATION
50+ ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
51+ RENAME ${NLS_PACKAGE}.mo)
52+ endforeach (PO_INPUT ${PO_FILES})
53+endmacro(add_translations_directory)
54+
55+
56+macro(add_translations_catalog NLS_PACKAGE)
57+ add_custom_target (pot COMMENT “Building translation catalog.”)
58+ find_program (XGETTEXT_EXECUTABLE xgettext)
59+
60+ # init this list, which will hold all the sources across all dirs
61+ set(SOURCES "")
62+
63+ # add each directory's sources to the overall sources list
64+ foreach(FILES_INPUT ${ARGN})
65+ set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
66+ file(GLOB_RECURSE DIR_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
67+ ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
68+ set (SOURCES ${SOURCES} ${DIR_SOURCES})
69+ endforeach()
70+
71+ add_custom_command (TARGET pot COMMAND
72+ ${XGETTEXT_EXECUTABLE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
73+ --c++ --qt --add-comments=TRANSLATORS
74+ --keyword="_" --keyword="N_" --from-code=UTF-8
75+ --copyright-holder='Canonical Ltd.'
76+ -s -p ${CMAKE_CURRENT_SOURCE_DIR}
77+ -D ${CMAKE_CURRENT_SOURCE_DIR} ${SOURCES}
78+ )
79+endmacro()
80
81=== modified file 'debian/rules'
82--- debian/rules 2015-06-18 12:31:14 +0000
83+++ debian/rules 2015-09-21 18:20:39 +0000
84@@ -27,5 +27,5 @@
85 HOME=$(CURDIR)/debian/tmp-home
86
87 override_dh_auto_test:
88- HOME=$(HOME) XDG_RUNTIME_DIR=$(HOME) dh_auto_test
89+ HOME=$(HOME) XDG_RUNTIME_DIR=$(HOME) ctest -j1 --output-on-failure
90 rm -rf $(HOME)
91
92=== added directory 'po'
93=== added file 'po/CMakeLists.txt'
94--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
95+++ po/CMakeLists.txt 2015-09-21 18:20:39 +0000
96@@ -0,0 +1,3 @@
97+include(Translations)
98+add_translations_directory("${GETTEXT_PACKAGE}")
99+add_translations_catalog("${GETTEXT_PACKAGE}" ../updater ../lib)
100
101=== added file 'po/address-book-service.pot'
102--- po/address-book-service.pot 1970-01-01 00:00:00 +0000
103+++ po/address-book-service.pot 2015-09-21 18:20:39 +0000
104@@ -0,0 +1,124 @@
105+# SOME DESCRIPTIVE TITLE.
106+# Copyright (C) YEAR Canonical Ltd.
107+# This file is distributed under the same license as the PACKAGE package.
108+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
109+#
110+#, fuzzy
111+msgid ""
112+msgstr ""
113+"Project-Id-Version: PACKAGE VERSION\n"
114+"Report-Msgid-Bugs-To: \n"
115+"POT-Creation-Date: 2015-09-21 12:10-0300\n"
116+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
117+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
118+"Language-Team: LANGUAGE <LL@li.org>\n"
119+"Language: \n"
120+"MIME-Version: 1.0\n"
121+"Content-Type: text/plain; charset=CHARSET\n"
122+"Content-Transfer-Encoding: 8bit\n"
123+
124+#: ../updater/ab-update.cpp:355
125+#, qt-format
126+msgid ""
127+"%1 contact sync account needs upgrade. Please connect with the internet."
128+msgstr ""
129+
130+#: ../updater/ab-update.cpp:107
131+#, qt-format
132+msgid "%1 contact sync account upgrade already in progress"
133+msgstr ""
134+
135+#: ../updater/ab-update.cpp:344
136+#, qt-format
137+msgid "%1 contact sync account upgrade in progress"
138+msgstr ""
139+
140+#: ../updater/ab-update.cpp:288
141+#, qt-format
142+msgid ""
143+"%1.\n"
144+"Do you want to retry now?"
145+msgstr ""
146+
147+#: ../updater/ab-update.cpp:106 ../updater/ab-update.cpp:267
148+#: ../updater/ab-update.cpp:343 ../updater/ab-update.cpp:354
149+msgid "Account update"
150+msgstr ""
151+
152+#: ../lib/addressbook.cpp:983
153+msgid "Address book service"
154+msgstr ""
155+
156+#: ../updater/ab-update.cpp:268
157+msgid "Contact sync upgrade complete."
158+msgstr ""
159+
160+#: ../updater/ab-update.cpp:216
161+msgid "Contacts app is updated already!"
162+msgstr ""
163+
164+#: ../updater/ab-update.cpp:224
165+msgid "Fail to authenticate!"
166+msgstr ""
167+
168+#: ../updater/ab-update.cpp:220
169+msgid "Fail to connect to contact sync service!"
170+msgstr ""
171+
172+#: ../updater/ab-update.cpp:218
173+msgid "Fail to connect to internet!"
174+msgstr ""
175+
176+#: ../updater/ab-update.cpp:222
177+msgid "Fail to create sync profile!"
178+msgstr ""
179+
180+#: ../updater/ab-update.cpp:233
181+msgid "Fail to sync contacts!"
182+msgstr ""
183+
184+#: ../updater/ab-update.cpp:287 ../updater/ab-update.cpp:312
185+msgid "Fail to update"
186+msgstr ""
187+
188+#: ../updater/ab-update.cpp:226
189+msgid "Internal error during the sync!"
190+msgstr ""
191+
192+#: ../updater/ab-notify-message.cpp:93
193+msgid "No"
194+msgstr ""
195+
196+#: ../updater/ab-update.cpp:228
197+msgid "Online account not found!"
198+msgstr ""
199+
200+#: ../updater/ab-update.cpp:313
201+msgid "To retry later open Contacts app and press the sync button."
202+msgstr ""
203+
204+#: ../updater/ab-update.cpp:230
205+msgid "Update already in progress!"
206+msgstr ""
207+
208+#: ../lib/addressbook.cpp:1002
209+msgid "Update complete"
210+msgstr ""
211+
212+#: ../lib/addressbook.cpp:995
213+msgid "Update required"
214+msgstr ""
215+
216+#: ../updater/ab-notify-message.cpp:88
217+msgid "Yes"
218+msgstr ""
219+
220+#: ../lib/addressbook.cpp:997
221+msgid ""
222+"Your Contacts app needs to be upgraded. Only local contacts will be editable "
223+"until upgrade is complete"
224+msgstr ""
225+
226+#: ../lib/addressbook.cpp:1004
227+msgid "Your Contacts app upldate is complete."
228+msgstr ""

Subscribers

People subscribed via source and target branches