Merge lp:~elopio/unity-scope-click/update_new_scopes2 into lp:unity-scope-click

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~elopio/unity-scope-click/update_new_scopes2
Merge into: lp:unity-scope-click
Diff against target: 365 lines (+135/-63)
7 files modified
autopilot/unityclickscope/credentials.py (+1/-1)
autopilot/unityclickscope/test_click_scope.py (+4/-5)
po/CMakeLists.txt (+6/-5)
po/LINGUAS (+0/-18)
po/my.po (+90/-0)
po/unity-scope-click.pot (+15/-20)
scope/click/preview.cpp (+19/-14)
To merge this branch: bzr merge lp:~elopio/unity-scope-click/update_new_scopes2
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+219527@code.launchpad.net

This proposal has been superseded by a proposal from 2014-05-14.

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/unityclickscope/credentials.py'
2--- autopilot/unityclickscope/credentials.py 2014-01-28 05:21:19 +0000
3+++ autopilot/unityclickscope/credentials.py 2014-05-14 13:33:50 +0000
4@@ -90,7 +90,7 @@
5 auth_data = account_service.get_auth_data()
6 identity = auth_data.get_credentials_id()
7 method = auth_data.get_method()
8- mechanism = auth_data.get_method()
9+ mechanism = auth_data.get_mechanism()
10 session_data = auth_data.get_parameters()
11 session = Signon.AuthSession.new(identity, method)
12 session.process(
13
14=== modified file 'autopilot/unityclickscope/test_click_scope.py'
15--- autopilot/unityclickscope/test_click_scope.py 2014-04-09 16:36:08 +0000
16+++ autopilot/unityclickscope/test_click_scope.py 2014-05-14 13:33:50 +0000
17@@ -107,7 +107,7 @@
18 logging.info('Restarting click scope.')
19 os.system('pkill -f -9 clickscope.ini')
20 lib_path = '/usr/lib/$DEB_HOST_MULTIARCH/'
21- scoperunner_path = os.path.join(lib_path, 'scoperunner/scoperunner')
22+ scoperunner_path = os.path.join(lib_path, 'unity-scopes/scoperunner')
23 clickscope_config_ini_path = os.path.join(
24 lib_path, 'unity-scopes/clickscope/clickscope.ini')
25 os.system(
26@@ -161,11 +161,11 @@
27 def test_search_available_app(self):
28 self.search('Shorts')
29 applications = self.scope.get_applications('appstore')
30- self.assertThat(applications[0].title, Equals('Shorts'))
31+ self.assertThat(applications[0], Equals('Shorts'))
32
33 def test_open_app_preview(self):
34 expected_details = dict(
35- title='Shorts', subtitle='Shorts is an rssreader application')
36+ title='Shorts', subtitle='Ubuntu Click Loader')
37 preview = self.open_app_preview('appstore', 'Shorts')
38 details = preview.get_details()
39 self.assertEqual(details, expected_details)
40@@ -182,14 +182,13 @@
41 class ClickScopeTestCaseWithCredentials(BaseClickScopeTestCase):
42
43 def setUp(self):
44- self.skipTest('segfaults. TODO in following branches.')
45+# self.skipTest('segfaults. TODO in following branches.')
46 self.add_u1_credentials()
47 super(ClickScopeTestCaseWithCredentials, self).setUp()
48 self.scope = self.open_scope()
49 self.preview = self.open_app_preview('appstore', 'Shorts')
50
51 def add_u1_credentials(self):
52- import pdb; pdb.set_trace()
53 account_manager = credentials.AccountManager()
54 account = account_manager.add_u1_credentials(
55 'dummy@example.com', 'dummy')
56
57=== modified file 'po/CMakeLists.txt'
58--- po/CMakeLists.txt 2014-05-06 21:28:13 +0000
59+++ po/CMakeLists.txt 2014-05-14 13:33:50 +0000
60@@ -4,7 +4,7 @@
61
62 set(GETTEXT_PACKAGE ${PROJECT_NAME})
63 set(POT_FILE ${GETTEXT_PACKAGE}.pot)
64-file(STRINGS LINGUAS LINGUAS)
65+file(GLOB POFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po)
66
67 # Creates POTFILES
68 add_custom_target(POTFILES ALL
69@@ -22,12 +22,13 @@
70
71 # Builds the binary translations catalog for each language
72 # it finds source translations (*.po) for
73-foreach(LANG ${LINGUAS})
74- list(APPEND PO_FILES "${LANG}.po")
75- gettext_process_po_files(${LANG} ALL PO_FILES "${LANG}.po")
76+foreach(POFILE ${POFILES})
77+ string(REPLACE ".po" "" LANG ${POFILE})
78+ list(APPEND PO_FILES "${POFILE}")
79+ gettext_process_po_files(${LANG} ALL PO_FILES "${POFILE}")
80 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)
81 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
82 DESTINATION ${INSTALL_DIR}
83 RENAME ${GETTEXT_PACKAGE}.mo
84 )
85-endforeach(LANG)
86+endforeach(POFILE)
87
88=== removed file 'po/LINGUAS'
89--- po/LINGUAS 2014-05-06 21:28:13 +0000
90+++ po/LINGUAS 1970-01-01 00:00:00 +0000
91@@ -1,18 +0,0 @@
92-ar
93-ca
94-de
95-es
96-eu
97-fi
98-fr
99-gd
100-gl
101-he
102-id
103-it
104-lv
105-nb
106-ru
107-sl
108-uk
109-zh_CN
110
111=== added file 'po/my.po'
112--- po/my.po 1970-01-01 00:00:00 +0000
113+++ po/my.po 2014-05-14 13:33:50 +0000
114@@ -0,0 +1,90 @@
115+# Burmese translation for unity-scope-click
116+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
117+# This file is distributed under the same license as the unity-scope-click package.
118+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
119+#
120+msgid ""
121+msgstr ""
122+"Project-Id-Version: unity-scope-click\n"
123+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
124+"POT-Creation-Date: 2014-05-06 17:50-0400\n"
125+"PO-Revision-Date: 2014-05-11 08:48+0000\n"
126+"Last-Translator: Pyae Sone <Unknown>\n"
127+"Language-Team: Burmese <my@li.org>\n"
128+"MIME-Version: 1.0\n"
129+"Content-Type: text/plain; charset=UTF-8\n"
130+"Content-Transfer-Encoding: 8bit\n"
131+"X-Launchpad-Export-Date: 2014-05-12 07:13+0000\n"
132+"X-Generator: Launchpad (build 16996)\n"
133+
134+#: ../data/clickscope.ini.in.in.h:1
135+msgid "Apps"
136+msgstr "Apps"
137+
138+#: ../data/clickscope.ini.in.in.h:2
139+msgid "Scope for searching the click app store"
140+msgstr ""
141+
142+#: ../scope/click/preview.cpp:270
143+msgid "Download Error"
144+msgstr ""
145+
146+#: ../scope/click/preview.cpp:271
147+msgid "Download or install failed. Please try again."
148+msgstr ""
149+
150+#. TODO see bug LP: #1289434
151+#: ../scope/click/preview.cpp:273
152+msgid "Close"
153+msgstr "ပိတ်"
154+
155+#: ../scope/click/preview.cpp:278
156+msgid "Login Error"
157+msgstr "ဝင်ရောက်မှုမအောင်မြင်ပါ"
158+
159+#: ../scope/click/preview.cpp:279
160+msgid "Please log in to your Ubuntu One account."
161+msgstr "သင်၏ Ubuntu One အကောင့်ထဲသို့ဝင်ရောက်ပါ"
162+
163+#: ../scope/click/preview.cpp:281
164+msgid "Go to Accounts"
165+msgstr "အကောင့်သို့သွားမည်"
166+
167+#: ../scope/click/preview.cpp:505
168+msgid "Open"
169+msgstr "ဖွင့်"
170+
171+#: ../scope/click/preview.cpp:513
172+msgid "Uninstall"
173+msgstr "စက်ထဲမှထုတ်ရန်"
174+
175+#: ../scope/click/preview.cpp:598
176+msgid "Confirmation"
177+msgstr "အတည်ပြုခြင်း"
178+
179+#: ../scope/click/preview.cpp:600
180+msgid ""
181+"Uninstalling this app will delete all the related information. Are you sure "
182+"you want to uninstall?"
183+msgstr ""
184+
185+#. TODO: see bug LP: #1289434
186+#: ../scope/click/preview.cpp:607
187+msgid "Not anymore"
188+msgstr ""
189+
190+#: ../scope/click/preview.cpp:611
191+msgid "Yes Uninstall"
192+msgstr "ဟုတ်၊စက်ထဲမှထုတ်မည်"
193+
194+#: ../scope/click/preview.cpp:659
195+msgid "Install"
196+msgstr "စက်ထဲသို့ထည့်သွင်းမည်"
197+
198+#: ../scope/click/query.cpp:95
199+msgid "My apps"
200+msgstr "ကျွန်ုပ်၏ app များ"
201+
202+#: ../scope/click/query.cpp:189
203+msgid "Available"
204+msgstr "ရရှိနိုင်သော"
205
206=== modified file 'po/unity-scope-click.pot'
207--- po/unity-scope-click.pot 2014-05-06 21:52:48 +0000
208+++ po/unity-scope-click.pot 2014-05-14 13:33:50 +0000
209@@ -8,7 +8,7 @@
210 msgstr ""
211 "Project-Id-Version: PACKAGE VERSION\n"
212 "Report-Msgid-Bugs-To: \n"
213-"POT-Creation-Date: 2014-05-06 17:50-0400\n"
214+"POT-Creation-Date: 2014-05-09 15:06-0400\n"
215 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
216 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
217 "Language-Team: LANGUAGE <LL@li.org>\n"
218@@ -25,59 +25,54 @@
219 msgid "Scope for searching the click app store"
220 msgstr ""
221
222-#: ../scope/click/preview.cpp:270
223+#: ../scope/click/preview.cpp:272
224 msgid "Download Error"
225 msgstr ""
226
227-#: ../scope/click/preview.cpp:271
228+#: ../scope/click/preview.cpp:273
229 msgid "Download or install failed. Please try again."
230 msgstr ""
231
232 #. TODO see bug LP: #1289434
233-#: ../scope/click/preview.cpp:273
234+#: ../scope/click/preview.cpp:275
235 msgid "Close"
236 msgstr ""
237
238-#: ../scope/click/preview.cpp:278
239+#: ../scope/click/preview.cpp:280
240 msgid "Login Error"
241 msgstr ""
242
243-#: ../scope/click/preview.cpp:279
244+#: ../scope/click/preview.cpp:281
245 msgid "Please log in to your Ubuntu One account."
246 msgstr ""
247
248-#: ../scope/click/preview.cpp:281
249+#: ../scope/click/preview.cpp:283
250 msgid "Go to Accounts"
251 msgstr ""
252
253-#: ../scope/click/preview.cpp:505
254+#: ../scope/click/preview.cpp:506
255 msgid "Open"
256 msgstr ""
257
258-#: ../scope/click/preview.cpp:513
259+#: ../scope/click/preview.cpp:514 ../scope/click/preview.cpp:615
260 msgid "Uninstall"
261 msgstr ""
262
263-#: ../scope/click/preview.cpp:598
264+#: ../scope/click/preview.cpp:599
265 msgid "Confirmation"
266 msgstr ""
267
268-#: ../scope/click/preview.cpp:600
269-msgid ""
270-"Uninstalling this app will delete all the related information. Are you sure "
271-"you want to uninstall?"
272+#. TRANSLATORS: Do NOT translate ${title} here.
273+#: ../scope/click/preview.cpp:602
274+msgid "Uninstall ${title}?"
275 msgstr ""
276
277 #. TODO: see bug LP: #1289434
278-#: ../scope/click/preview.cpp:607
279-msgid "Not anymore"
280-msgstr ""
281-
282 #: ../scope/click/preview.cpp:611
283-msgid "Yes Uninstall"
284+msgid "Cancel"
285 msgstr ""
286
287-#: ../scope/click/preview.cpp:659
288+#: ../scope/click/preview.cpp:663
289 msgid "Install"
290 msgstr ""
291
292
293=== modified file 'scope/click/preview.cpp'
294--- scope/click/preview.cpp 2014-05-07 21:22:59 +0000
295+++ scope/click/preview.cpp 2014-05-14 13:33:50 +0000
296@@ -33,6 +33,8 @@
297 #include "qtbridge.h"
298 #include "download-manager.h"
299
300+#include <boost/algorithm/string/replace.hpp>
301+
302 #include <unity/UnityExceptions.h>
303 #include <unity/scopes/PreviewReply.h>
304 #include <unity/scopes/Variant.h>
305@@ -196,6 +198,16 @@
306
307 bool has_screenshots = !details.main_screenshot_url.empty() || !details.more_screenshots_urls.empty();
308
309+ scopes::PreviewWidget header("hdr", "header");
310+ header.add_attribute_value("title", scopes::Variant(details.package.title));
311+ if (!details.publisher.empty())
312+ {
313+ header.add_attribute_value("subtitle", scopes::Variant(details.publisher));
314+ }
315+ if (!details.package.icon_url.empty())
316+ header.add_attribute_value("mascot", scopes::Variant(details.package.icon_url));
317+ widgets.push_back(header);
318+
319 if (has_screenshots)
320 {
321 scopes::PreviewWidget gallery("screenshots", "gallery");
322@@ -215,16 +227,6 @@
323 widgets.push_back(gallery);
324 }
325
326- scopes::PreviewWidget header("hdr", "header");
327- header.add_attribute_value("title", scopes::Variant(details.package.title));
328- if (!details.publisher.empty())
329- {
330- header.add_attribute_value("subtitle", scopes::Variant(details.publisher));
331- }
332- if (!details.package.icon_url.empty())
333- header.add_attribute_value("mascot", scopes::Variant(details.package.icon_url));
334- widgets.push_back(header);
335-
336 return widgets;
337 }
338
339@@ -595,19 +597,22 @@
340
341 scopes::PreviewWidget header("hdr", "header");
342 header.add_attribute_value("title", scopes::Variant(_("Confirmation")));
343- header.add_attribute_value("subtitle",
344- scopes::Variant(_("Uninstalling this app will delete all the related information. Are you sure you want to uninstall?"))); // TODO: wording needs review. see bug LP: #1234211
345+ std::string title = result["title"].get_string();
346+ // TRANSLATORS: Do NOT translate ${title} here.
347+ std::string message = _("Uninstall ${title}?");
348+ boost::replace_first(message, "${title}", title);
349+ header.add_attribute_value("subtitle", scopes::Variant(message));
350 widgets.push_back(header);
351
352 scopes::PreviewWidget buttons("buttons", "actions");
353 scopes::VariantBuilder builder;
354 builder.add_tuple({
355 {"id", scopes::Variant(click::Preview::Actions::CLOSE_PREVIEW)}, // TODO: see bug LP: #1289434
356- {"label", scopes::Variant(_("Not anymore"))}
357+ {"label", scopes::Variant(_("Cancel"))}
358 });
359 builder.add_tuple({
360 {"id", scopes::Variant(click::Preview::Actions::CONFIRM_UNINSTALL)},
361- {"label", scopes::Variant(_("Yes Uninstall"))}
362+ {"label", scopes::Variant(_("Uninstall"))}
363 });
364 buttons.add_attribute_value("actions", builder.end());
365 widgets.push_back(buttons);

Subscribers

People subscribed via source and target branches

to all changes: