Merge lp:~renatofilho/sync-monitor/fix-i18n-rtm into lp:sync-monitor/rtm-14.09

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 33
Merged at revision: 33
Proposed branch: lp:~renatofilho/sync-monitor/fix-i18n-rtm
Merge into: lp:sync-monitor/rtm-14.09
Diff against target: 244 lines (+144/-6)
7 files modified
CMakeLists.txt (+1/-0)
accounts/applications/contacts-sync.application.in (+1/-1)
accounts/services/google-caldav.service.in (+1/-0)
accounts/services/google-carddav.service.in (+1/-0)
po/CMakeLists.txt (+12/-3)
po/sync-monitor.pot (+125/-0)
src/notify-message.cpp (+3/-2)
To merge this branch: bzr merge lp:~renatofilho/sync-monitor/fix-i18n-rtm
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+245596@code.launchpad.net

Commit message

Add support for i18n

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? NO

Is your branch in sync with latest trunk? YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? YES

Did you successfully run all tests found in your component's Test Plan on device or emulator? YES

If you changed the UI, was the change specified/approved by design? NO UI CHANGE

If you changed UI labels, did you update the pot file? YES

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP? NO PACKAGE CHANGED

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 2014-10-31 14:46:50 +0000
3+++ CMakeLists.txt 2015-01-05 17:22:44 +0000
4@@ -14,6 +14,7 @@
5 pkg_check_modules(LIBNOTIFY libnotify)
6
7 find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
8+find_program(INTLTOOL_EXTRACT_EXECUTABLE intltool-extract)
9
10 set(CMAKE_INCLUDE_CURRENT_DIR ON)
11 set(CMAKE_AUTOMOC ON)
12
13=== modified file 'accounts/applications/contacts-sync.application.in'
14--- accounts/applications/contacts-sync.application.in 2014-09-25 21:15:22 +0000
15+++ accounts/applications/contacts-sync.application.in 2015-01-05 17:22:44 +0000
16@@ -2,7 +2,7 @@
17 <application id="contacts-sync">
18 <_description>Contacts</_description>
19 <desktop-entry>sync-monitor-contacts.desktop</desktop-entry>
20- <translations>contacts-sync</translations>
21+ <translations>sync-monitor</translations>
22
23 <service-types>
24 <service-type id="contacts">
25
26=== modified file 'accounts/services/google-caldav.service.in'
27--- accounts/services/google-caldav.service.in 2014-09-25 20:14:06 +0000
28+++ accounts/services/google-caldav.service.in 2015-01-05 17:22:44 +0000
29@@ -4,4 +4,5 @@
30 <name>Google Calendar</name>
31 <provider>google</provider>
32 <icon>calendar</icon>
33+ <translations>sync-monitor</translations>
34 </service>
35
36=== modified file 'accounts/services/google-carddav.service.in'
37--- accounts/services/google-carddav.service.in 2014-04-07 22:00:28 +0000
38+++ accounts/services/google-carddav.service.in 2015-01-05 17:22:44 +0000
39@@ -4,6 +4,7 @@
40 <name>Google Contacts</name>
41 <provider>google</provider>
42 <icon>contacts-app</icon>
43+ <translations>sync-monitor</translations>
44
45 <!-- default settings (account settings have precedence over these) -->
46 <template>
47
48=== modified file 'po/CMakeLists.txt'
49--- po/CMakeLists.txt 2014-04-15 19:02:30 +0000
50+++ po/CMakeLists.txt 2015-01-05 17:22:44 +0000
51@@ -12,6 +12,14 @@
52 file(GLOB_RECURSE I18N_SRCS RELATIVE ${CMAKE_SOURCE_DIR}
53 ${CMAKE_SOURCE_DIR}/src/*.cpp
54 )
55+file(GLOB_RECURSE I18N_XMLS RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
56+ ${CMAKE_SOURCE_DIR}/accounts/applications/*.in
57+)
58+string(REPLACE "${CMAKE_SOURCE_DIR}/" "" RELATIVE_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
59+foreach(XML_FILE ${I18N_XMLS})
60+ get_filename_component(XML_BASE_NAME ${XML_FILE} NAME)
61+ list(APPEND I18N_SRCS "${RELATIVE_BUILD_DIR}/tmp/${XML_BASE_NAME}.h")
62+endforeach(XML_FILE)
63
64 foreach(PO_FILE ${PO_FILES})
65 get_filename_component(LANG ${PO_FILE} NAME_WE)
66@@ -22,17 +30,18 @@
67 RENAME ${DOMAIN}.mo)
68 endforeach(PO_FILE)
69
70-
71 find_program(XGETTEXT_EXECUTABLE xgettext)
72 if(XGETTEXT_EXECUTABLE)
73 add_custom_target(${POT_FILE})
74 add_custom_command(TARGET ${POT_FILE}
75+ COMMAND ${INTLTOOL_EXTRACT_EXECUTABLE}
76+ -l --type=gettext/xml ${I18N_XMLS}
77 COMMAND ${XGETTEXT_EXECUTABLE} -o ${POT_FILE}
78 --c++ --qt --add-comments=TRANSLATORS
79- --keyword=_
80+ --keyword=_ --keyword=N_
81 --package-name=${DOMAIN}
82 --copyright-holder='Canonical Ltd.'
83 -D ${CMAKE_SOURCE_DIR} -s
84- -p ${CMAKE_CURRENT_SOURCE_DIR} ${I18N_SRCS}
85+ -p ${CMAKE_CURRENT_SOURCE_DIR} ${I18N_SRCS}
86 )
87 endif()
88
89=== added file 'po/sync-monitor.pot'
90--- po/sync-monitor.pot 1970-01-01 00:00:00 +0000
91+++ po/sync-monitor.pot 2015-01-05 17:22:44 +0000
92@@ -0,0 +1,125 @@
93+# SOME DESCRIPTIVE TITLE.
94+# Copyright (C) YEAR Canonical Ltd.
95+# This file is distributed under the same license as the PACKAGE package.
96+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
97+#
98+#, fuzzy
99+msgid ""
100+msgstr ""
101+"Project-Id-Version: sync-monitor\n"
102+"Report-Msgid-Bugs-To: \n"
103+"POT-Creation-Date: 2014-11-13 10:43-0300\n"
104+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
105+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
106+"Language-Team: LANGUAGE <LL@li.org>\n"
107+"Language: \n"
108+"MIME-Version: 1.0\n"
109+"Content-Type: text/plain; charset=CHARSET\n"
110+"Content-Transfer-Encoding: 8bit\n"
111+
112+#: src/sync-daemon.cpp:378
113+#, qt-format
114+msgid "Account %1 removed. Do you want to keep the account data?"
115+msgstr ""
116+
117+#: src/sync-account.cpp:532
118+msgid "Command not allowed"
119+msgstr ""
120+
121+#: src/sync-account.cpp:552
122+msgid "Connection certificate has expired"
123+msgstr ""
124+
125+#: src/sync-account.cpp:554
126+msgid "Connection certificate is invalid"
127+msgstr ""
128+
129+#: src/sync-account.cpp:550
130+msgid "Connection timeout"
131+msgstr ""
132+
133+#: qbuild/po/tmp/contacts-sync.application.in.h:1
134+msgid "Contacts"
135+msgstr ""
136+
137+#: src/sync-account.cpp:537
138+msgid "Disk full"
139+msgstr ""
140+
141+#: src/sync-account.cpp:558
142+msgid "Fail to connect with the server"
143+msgstr ""
144+
145+#: src/sync-account.cpp:541
146+msgid "Fail to run \"two-way\" sync"
147+msgstr ""
148+
149+#: src/sync-daemon.cpp:469
150+#, qt-format
151+msgid ""
152+"Fail to sync %1 (%2).\n"
153+"%3"
154+msgstr ""
155+
156+#: src/sync-account.cpp:539
157+msgid "Fail to sync due some remote problem"
158+msgstr ""
159+
160+#: src/sync-account.cpp:543
161+msgid "Fail to sync some items"
162+msgstr ""
163+
164+#: src/sync-account.cpp:528
165+msgid "Forbidden / access denied"
166+msgstr ""
167+
168+#: src/notify-message.cpp:88
169+msgid "No"
170+msgstr ""
171+
172+#: src/sync-account.cpp:530
173+msgid "Object not found / unassigned field"
174+msgstr ""
175+
176+#: src/sync-account.cpp:545
177+msgid "Process unexpected die."
178+msgstr ""
179+
180+#: src/sync-account.cpp:535
181+msgid "Proxy authentication required"
182+msgstr ""
183+
184+#: src/sync-account.cpp:561
185+msgid "Server not found"
186+msgstr ""
187+
188+#: src/sync-account.cpp:548
189+msgid "Server sent bad content"
190+msgstr ""
191+
192+#: src/sync-daemon.cpp:409
193+#, qt-format
194+msgid "Start sync: %1 (%2)"
195+msgstr ""
196+
197+#: src/sync-daemon.cpp:433
198+#, qt-format
199+msgid "Sync done: %1 (%2)"
200+msgstr ""
201+
202+#: src/sync-daemon.cpp:377 src/sync-daemon.cpp:408 src/sync-daemon.cpp:432
203+#: src/sync-daemon.cpp:468
204+msgid "Synchronization"
205+msgstr ""
206+
207+#: qbuild/po/tmp/contacts-sync.application.in.h:2
208+msgid "Synchronize your contacts"
209+msgstr ""
210+
211+#: src/sync-account.cpp:563
212+msgid "Unknown status"
213+msgstr ""
214+
215+#: src/notify-message.cpp:83
216+msgid "Yes"
217+msgstr ""
218
219=== modified file 'src/notify-message.cpp'
220--- src/notify-message.cpp 2014-07-30 12:47:14 +0000
221+++ src/notify-message.cpp 2015-01-05 17:22:44 +0000
222@@ -17,6 +17,7 @@
223 */
224
225 #include "notify-message.h"
226+#include "sync-i18n.h"
227
228 #include <QtCore/QCoreApplication>
229 #include <QtCore/QDebug>
230@@ -79,12 +80,12 @@
231 "x-canonical-non-shaped-icon",
232 "true");
233 notify_notification_add_action(m_notification,
234- "action_accept", "Yes",
235+ "action_accept", _("Yes"),
236 (NotifyActionCallback) NotifyMessage::onQuestionAccepted,
237 this,
238 NULL);
239 notify_notification_add_action(m_notification,
240- "action_reject", "No",
241+ "action_reject", _("No"),
242 (NotifyActionCallback) NotifyMessage::onQuestionRejected,
243 this,
244 NULL);

Subscribers

People subscribed via source and target branches