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
=== modified file 'autopilot/unityclickscope/credentials.py'
--- autopilot/unityclickscope/credentials.py 2014-01-28 05:21:19 +0000
+++ autopilot/unityclickscope/credentials.py 2014-05-14 13:33:50 +0000
@@ -90,7 +90,7 @@
90 auth_data = account_service.get_auth_data()90 auth_data = account_service.get_auth_data()
91 identity = auth_data.get_credentials_id()91 identity = auth_data.get_credentials_id()
92 method = auth_data.get_method()92 method = auth_data.get_method()
93 mechanism = auth_data.get_method()93 mechanism = auth_data.get_mechanism()
94 session_data = auth_data.get_parameters()94 session_data = auth_data.get_parameters()
95 session = Signon.AuthSession.new(identity, method)95 session = Signon.AuthSession.new(identity, method)
96 session.process(96 session.process(
9797
=== modified file 'autopilot/unityclickscope/test_click_scope.py'
--- autopilot/unityclickscope/test_click_scope.py 2014-04-09 16:36:08 +0000
+++ autopilot/unityclickscope/test_click_scope.py 2014-05-14 13:33:50 +0000
@@ -107,7 +107,7 @@
107 logging.info('Restarting click scope.')107 logging.info('Restarting click scope.')
108 os.system('pkill -f -9 clickscope.ini')108 os.system('pkill -f -9 clickscope.ini')
109 lib_path = '/usr/lib/$DEB_HOST_MULTIARCH/'109 lib_path = '/usr/lib/$DEB_HOST_MULTIARCH/'
110 scoperunner_path = os.path.join(lib_path, 'scoperunner/scoperunner')110 scoperunner_path = os.path.join(lib_path, 'unity-scopes/scoperunner')
111 clickscope_config_ini_path = os.path.join(111 clickscope_config_ini_path = os.path.join(
112 lib_path, 'unity-scopes/clickscope/clickscope.ini')112 lib_path, 'unity-scopes/clickscope/clickscope.ini')
113 os.system(113 os.system(
@@ -161,11 +161,11 @@
161 def test_search_available_app(self):161 def test_search_available_app(self):
162 self.search('Shorts')162 self.search('Shorts')
163 applications = self.scope.get_applications('appstore')163 applications = self.scope.get_applications('appstore')
164 self.assertThat(applications[0].title, Equals('Shorts'))164 self.assertThat(applications[0], Equals('Shorts'))
165165
166 def test_open_app_preview(self):166 def test_open_app_preview(self):
167 expected_details = dict(167 expected_details = dict(
168 title='Shorts', subtitle='Shorts is an rssreader application')168 title='Shorts', subtitle='Ubuntu Click Loader')
169 preview = self.open_app_preview('appstore', 'Shorts')169 preview = self.open_app_preview('appstore', 'Shorts')
170 details = preview.get_details()170 details = preview.get_details()
171 self.assertEqual(details, expected_details)171 self.assertEqual(details, expected_details)
@@ -182,14 +182,13 @@
182class ClickScopeTestCaseWithCredentials(BaseClickScopeTestCase):182class ClickScopeTestCaseWithCredentials(BaseClickScopeTestCase):
183183
184 def setUp(self):184 def setUp(self):
185 self.skipTest('segfaults. TODO in following branches.')185# self.skipTest('segfaults. TODO in following branches.')
186 self.add_u1_credentials()186 self.add_u1_credentials()
187 super(ClickScopeTestCaseWithCredentials, self).setUp()187 super(ClickScopeTestCaseWithCredentials, self).setUp()
188 self.scope = self.open_scope()188 self.scope = self.open_scope()
189 self.preview = self.open_app_preview('appstore', 'Shorts')189 self.preview = self.open_app_preview('appstore', 'Shorts')
190190
191 def add_u1_credentials(self):191 def add_u1_credentials(self):
192 import pdb; pdb.set_trace()
193 account_manager = credentials.AccountManager()192 account_manager = credentials.AccountManager()
194 account = account_manager.add_u1_credentials(193 account = account_manager.add_u1_credentials(
195 'dummy@example.com', 'dummy')194 'dummy@example.com', 'dummy')
196195
=== modified file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2014-05-06 21:28:13 +0000
+++ po/CMakeLists.txt 2014-05-14 13:33:50 +0000
@@ -4,7 +4,7 @@
44
5set(GETTEXT_PACKAGE ${PROJECT_NAME})5set(GETTEXT_PACKAGE ${PROJECT_NAME})
6set(POT_FILE ${GETTEXT_PACKAGE}.pot)6set(POT_FILE ${GETTEXT_PACKAGE}.pot)
7file(STRINGS LINGUAS LINGUAS)7file(GLOB POFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po)
88
9# Creates POTFILES9# Creates POTFILES
10add_custom_target(POTFILES ALL10add_custom_target(POTFILES ALL
@@ -22,12 +22,13 @@
2222
23# Builds the binary translations catalog for each language23# Builds the binary translations catalog for each language
24# it finds source translations (*.po) for24# it finds source translations (*.po) for
25foreach(LANG ${LINGUAS})25foreach(POFILE ${POFILES})
26 list(APPEND PO_FILES "${LANG}.po")26 string(REPLACE ".po" "" LANG ${POFILE})
27 gettext_process_po_files(${LANG} ALL PO_FILES "${LANG}.po")27 list(APPEND PO_FILES "${POFILE}")
28 gettext_process_po_files(${LANG} ALL PO_FILES "${POFILE}")
28 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)29 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)
29 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo30 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
30 DESTINATION ${INSTALL_DIR}31 DESTINATION ${INSTALL_DIR}
31 RENAME ${GETTEXT_PACKAGE}.mo32 RENAME ${GETTEXT_PACKAGE}.mo
32 )33 )
33endforeach(LANG)34endforeach(POFILE)
3435
=== removed file 'po/LINGUAS'
--- po/LINGUAS 2014-05-06 21:28:13 +0000
+++ po/LINGUAS 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
1ar
2ca
3de
4es
5eu
6fi
7fr
8gd
9gl
10he
11id
12it
13lv
14nb
15ru
16sl
17uk
18zh_CN
190
=== added file 'po/my.po'
--- po/my.po 1970-01-01 00:00:00 +0000
+++ po/my.po 2014-05-14 13:33:50 +0000
@@ -0,0 +1,90 @@
1# Burmese translation for unity-scope-click
2# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3# This file is distributed under the same license as the unity-scope-click package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: unity-scope-click\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-05-06 17:50-0400\n"
11"PO-Revision-Date: 2014-05-11 08:48+0000\n"
12"Last-Translator: Pyae Sone <Unknown>\n"
13"Language-Team: Burmese <my@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2014-05-12 07:13+0000\n"
18"X-Generator: Launchpad (build 16996)\n"
19
20#: ../data/clickscope.ini.in.in.h:1
21msgid "Apps"
22msgstr "Apps"
23
24#: ../data/clickscope.ini.in.in.h:2
25msgid "Scope for searching the click app store"
26msgstr ""
27
28#: ../scope/click/preview.cpp:270
29msgid "Download Error"
30msgstr ""
31
32#: ../scope/click/preview.cpp:271
33msgid "Download or install failed. Please try again."
34msgstr ""
35
36#. TODO see bug LP: #1289434
37#: ../scope/click/preview.cpp:273
38msgid "Close"
39msgstr "ပိတ်"
40
41#: ../scope/click/preview.cpp:278
42msgid "Login Error"
43msgstr "ဝင်ရောက်မှုမအောင်မြင်ပါ"
44
45#: ../scope/click/preview.cpp:279
46msgid "Please log in to your Ubuntu One account."
47msgstr "သင်၏ Ubuntu One အကောင့်ထဲသို့ဝင်ရောက်ပါ"
48
49#: ../scope/click/preview.cpp:281
50msgid "Go to Accounts"
51msgstr "အကောင့်သို့သွားမည်"
52
53#: ../scope/click/preview.cpp:505
54msgid "Open"
55msgstr "ဖွင့်"
56
57#: ../scope/click/preview.cpp:513
58msgid "Uninstall"
59msgstr "စက်ထဲမှထုတ်ရန်"
60
61#: ../scope/click/preview.cpp:598
62msgid "Confirmation"
63msgstr "အတည်ပြုခြင်း"
64
65#: ../scope/click/preview.cpp:600
66msgid ""
67"Uninstalling this app will delete all the related information. Are you sure "
68"you want to uninstall?"
69msgstr ""
70
71#. TODO: see bug LP: #1289434
72#: ../scope/click/preview.cpp:607
73msgid "Not anymore"
74msgstr ""
75
76#: ../scope/click/preview.cpp:611
77msgid "Yes Uninstall"
78msgstr "ဟုတ်၊စက်ထဲမှထုတ်မည်"
79
80#: ../scope/click/preview.cpp:659
81msgid "Install"
82msgstr "စက်ထဲသို့ထည့်သွင်းမည်"
83
84#: ../scope/click/query.cpp:95
85msgid "My apps"
86msgstr "ကျွန်ုပ်၏ app များ"
87
88#: ../scope/click/query.cpp:189
89msgid "Available"
90msgstr "ရရှိနိုင်သော"
091
=== modified file 'po/unity-scope-click.pot'
--- po/unity-scope-click.pot 2014-05-06 21:52:48 +0000
+++ po/unity-scope-click.pot 2014-05-14 13:33:50 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2014-05-06 17:50-0400\n"11"POT-Creation-Date: 2014-05-09 15:06-0400\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -25,59 +25,54 @@
25msgid "Scope for searching the click app store"25msgid "Scope for searching the click app store"
26msgstr ""26msgstr ""
2727
28#: ../scope/click/preview.cpp:27028#: ../scope/click/preview.cpp:272
29msgid "Download Error"29msgid "Download Error"
30msgstr ""30msgstr ""
3131
32#: ../scope/click/preview.cpp:27132#: ../scope/click/preview.cpp:273
33msgid "Download or install failed. Please try again."33msgid "Download or install failed. Please try again."
34msgstr ""34msgstr ""
3535
36#. TODO see bug LP: #128943436#. TODO see bug LP: #1289434
37#: ../scope/click/preview.cpp:27337#: ../scope/click/preview.cpp:275
38msgid "Close"38msgid "Close"
39msgstr ""39msgstr ""
4040
41#: ../scope/click/preview.cpp:27841#: ../scope/click/preview.cpp:280
42msgid "Login Error"42msgid "Login Error"
43msgstr ""43msgstr ""
4444
45#: ../scope/click/preview.cpp:27945#: ../scope/click/preview.cpp:281
46msgid "Please log in to your Ubuntu One account."46msgid "Please log in to your Ubuntu One account."
47msgstr ""47msgstr ""
4848
49#: ../scope/click/preview.cpp:28149#: ../scope/click/preview.cpp:283
50msgid "Go to Accounts"50msgid "Go to Accounts"
51msgstr ""51msgstr ""
5252
53#: ../scope/click/preview.cpp:50553#: ../scope/click/preview.cpp:506
54msgid "Open"54msgid "Open"
55msgstr ""55msgstr ""
5656
57#: ../scope/click/preview.cpp:51357#: ../scope/click/preview.cpp:514 ../scope/click/preview.cpp:615
58msgid "Uninstall"58msgid "Uninstall"
59msgstr ""59msgstr ""
6060
61#: ../scope/click/preview.cpp:59861#: ../scope/click/preview.cpp:599
62msgid "Confirmation"62msgid "Confirmation"
63msgstr ""63msgstr ""
6464
65#: ../scope/click/preview.cpp:60065#. TRANSLATORS: Do NOT translate ${title} here.
66msgid ""66#: ../scope/click/preview.cpp:602
67"Uninstalling this app will delete all the related information. Are you sure "67msgid "Uninstall ${title}?"
68"you want to uninstall?"
69msgstr ""68msgstr ""
7069
71#. TODO: see bug LP: #128943470#. TODO: see bug LP: #1289434
72#: ../scope/click/preview.cpp:607
73msgid "Not anymore"
74msgstr ""
75
76#: ../scope/click/preview.cpp:61171#: ../scope/click/preview.cpp:611
77msgid "Yes Uninstall"72msgid "Cancel"
78msgstr ""73msgstr ""
7974
80#: ../scope/click/preview.cpp:65975#: ../scope/click/preview.cpp:663
81msgid "Install"76msgid "Install"
82msgstr ""77msgstr ""
8378
8479
=== modified file 'scope/click/preview.cpp'
--- scope/click/preview.cpp 2014-05-07 21:22:59 +0000
+++ scope/click/preview.cpp 2014-05-14 13:33:50 +0000
@@ -33,6 +33,8 @@
33#include "qtbridge.h"33#include "qtbridge.h"
34#include "download-manager.h"34#include "download-manager.h"
3535
36#include <boost/algorithm/string/replace.hpp>
37
36#include <unity/UnityExceptions.h>38#include <unity/UnityExceptions.h>
37#include <unity/scopes/PreviewReply.h>39#include <unity/scopes/PreviewReply.h>
38#include <unity/scopes/Variant.h>40#include <unity/scopes/Variant.h>
@@ -196,6 +198,16 @@
196198
197 bool has_screenshots = !details.main_screenshot_url.empty() || !details.more_screenshots_urls.empty();199 bool has_screenshots = !details.main_screenshot_url.empty() || !details.more_screenshots_urls.empty();
198200
201 scopes::PreviewWidget header("hdr", "header");
202 header.add_attribute_value("title", scopes::Variant(details.package.title));
203 if (!details.publisher.empty())
204 {
205 header.add_attribute_value("subtitle", scopes::Variant(details.publisher));
206 }
207 if (!details.package.icon_url.empty())
208 header.add_attribute_value("mascot", scopes::Variant(details.package.icon_url));
209 widgets.push_back(header);
210
199 if (has_screenshots)211 if (has_screenshots)
200 {212 {
201 scopes::PreviewWidget gallery("screenshots", "gallery");213 scopes::PreviewWidget gallery("screenshots", "gallery");
@@ -215,16 +227,6 @@
215 widgets.push_back(gallery);227 widgets.push_back(gallery);
216 }228 }
217229
218 scopes::PreviewWidget header("hdr", "header");
219 header.add_attribute_value("title", scopes::Variant(details.package.title));
220 if (!details.publisher.empty())
221 {
222 header.add_attribute_value("subtitle", scopes::Variant(details.publisher));
223 }
224 if (!details.package.icon_url.empty())
225 header.add_attribute_value("mascot", scopes::Variant(details.package.icon_url));
226 widgets.push_back(header);
227
228 return widgets;230 return widgets;
229}231}
230232
@@ -595,19 +597,22 @@
595597
596 scopes::PreviewWidget header("hdr", "header");598 scopes::PreviewWidget header("hdr", "header");
597 header.add_attribute_value("title", scopes::Variant(_("Confirmation")));599 header.add_attribute_value("title", scopes::Variant(_("Confirmation")));
598 header.add_attribute_value("subtitle",600 std::string title = result["title"].get_string();
599 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: #1234211601 // TRANSLATORS: Do NOT translate ${title} here.
602 std::string message = _("Uninstall ${title}?");
603 boost::replace_first(message, "${title}", title);
604 header.add_attribute_value("subtitle", scopes::Variant(message));
600 widgets.push_back(header);605 widgets.push_back(header);
601606
602 scopes::PreviewWidget buttons("buttons", "actions");607 scopes::PreviewWidget buttons("buttons", "actions");
603 scopes::VariantBuilder builder;608 scopes::VariantBuilder builder;
604 builder.add_tuple({609 builder.add_tuple({
605 {"id", scopes::Variant(click::Preview::Actions::CLOSE_PREVIEW)}, // TODO: see bug LP: #1289434610 {"id", scopes::Variant(click::Preview::Actions::CLOSE_PREVIEW)}, // TODO: see bug LP: #1289434
606 {"label", scopes::Variant(_("Not anymore"))}611 {"label", scopes::Variant(_("Cancel"))}
607 });612 });
608 builder.add_tuple({613 builder.add_tuple({
609 {"id", scopes::Variant(click::Preview::Actions::CONFIRM_UNINSTALL)},614 {"id", scopes::Variant(click::Preview::Actions::CONFIRM_UNINSTALL)},
610 {"label", scopes::Variant(_("Yes Uninstall"))}615 {"label", scopes::Variant(_("Uninstall"))}
611 });616 });
612 buttons.add_attribute_value("actions", builder.end());617 buttons.add_attribute_value("actions", builder.end());
613 widgets.push_back(buttons);618 widgets.push_back(buttons);

Subscribers

People subscribed via source and target branches

to all changes: