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