Merge lp:~nataliabidart/ubuntuone-control-panel/all-ui-from-code into lp:ubuntuone-control-panel

Proposed by Natalia Bidart on 2012-02-22
Status: Merged
Approved by: Natalia Bidart on 2012-02-22
Approved revision: 268
Merged at revision: 264
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/all-ui-from-code
Merge into: lp:ubuntuone-control-panel
Prerequisite: lp:~nataliabidart/ubuntuone-control-panel/unicode-gettext
Diff against target: 989 lines (+243/-88)
22 files modified
data/qt/account.ui (+5/-5)
data/qt/controlpanel.ui (+7/-7)
data/qt/device.ui (+2/-2)
data/qt/device_remote.ui (+1/-1)
data/qt/devices.ui (+4/-4)
data/qt/folders.ui (+13/-13)
data/qt/loadingoverlay.ui (+1/-4)
data/qt/mainwindow.ui (+1/-1)
data/qt/preferences.ui (+13/-13)
data/qt/signin.ui (+7/-10)
ubuntuone/controlpanel/gui/__init__.py (+53/-7)
ubuntuone/controlpanel/gui/qt/account.py (+9/-1)
ubuntuone/controlpanel/gui/qt/controlpanel.py (+25/-2)
ubuntuone/controlpanel/gui/qt/device.py (+11/-1)
ubuntuone/controlpanel/gui/qt/devices.py (+9/-1)
ubuntuone/controlpanel/gui/qt/folders.py (+13/-5)
ubuntuone/controlpanel/gui/qt/loadingoverlay.py (+7/-0)
ubuntuone/controlpanel/gui/qt/preferences.py (+33/-1)
ubuntuone/controlpanel/gui/qt/signin.py (+17/-3)
ubuntuone/controlpanel/gui/qt/systray.py (+7/-2)
ubuntuone/controlpanel/gui/qt/tests/test_folders.py (+4/-2)
ubuntuone/controlpanel/gui/qt/ui/__init__.py (+1/-3)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/all-ui-from-code
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve on 2012-02-22
Manuel de la Peña (community) 2012-02-22 Approve on 2012-02-22
Review via email: mp+94220@code.launchpad.net

Commit message

- No more strings coming up from the Designer ui files (LP: #938626).

To post a comment you must log in.
Manuel de la Peña (mandel) wrote :

Tedious work that had to be done +10000000

review: Approve
Roberto Alsina (ralsina) wrote :

+1

review: Approve
268. By Natalia Bidart on 2012-02-22

Added disclaimer for hacks when accessing self.ui attrs.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/qt/account.ui'
2--- data/qt/account.ui 2011-09-06 13:43:25 +0000
3+++ data/qt/account.ui 2012-02-22 17:08:18 +0000
4@@ -11,7 +11,7 @@
5 </rect>
6 </property>
7 <property name="windowTitle">
8- <string>Form</string>
9+ <string notr="true">Form</string>
10 </property>
11 <layout class="QVBoxLayout" name="verticalLayout">
12 <property name="margin">
13@@ -25,14 +25,14 @@
14 <item row="0" column="2">
15 <widget class="GoToWebButton" name="edit_profile_button">
16 <property name="text">
17- <string>Edit personal details online</string>
18+ <string notr="true">Edit personal details online</string>
19 </property>
20 </widget>
21 </item>
22 <item row="2" column="0">
23 <widget class="QGroupBox" name="services">
24 <property name="title">
25- <string>Your services</string>
26+ <string notr="true">Your services</string>
27 </property>
28 <layout class="QVBoxLayout" name="verticalLayout_3">
29 <property name="leftMargin">
30@@ -67,7 +67,7 @@
31 <item row="0" column="0">
32 <widget class="QGroupBox" name="profile_info">
33 <property name="title">
34- <string>Personal details</string>
35+ <string notr="true">Personal details</string>
36 </property>
37 <layout class="QVBoxLayout" name="verticalLayout_4">
38 <property name="leftMargin">
39@@ -109,7 +109,7 @@
40 <item row="2" column="2">
41 <widget class="GoToWebButton" name="edit_services_button">
42 <property name="text">
43- <string>Edit your services online</string>
44+ <string notr="true">Edit your services online</string>
45 </property>
46 </widget>
47 </item>
48
49=== modified file 'data/qt/controlpanel.ui'
50--- data/qt/controlpanel.ui 2011-09-09 17:16:20 +0000
51+++ data/qt/controlpanel.ui 2012-02-22 17:08:18 +0000
52@@ -160,7 +160,7 @@
53 <item>
54 <widget class="GoToWebButton" name="get_more_space_button">
55 <property name="text">
56- <string>Get more storage</string>
57+ <string notr="true">Get more storage</string>
58 </property>
59 </widget>
60 </item>
61@@ -235,22 +235,22 @@
62 </property>
63 <widget class="FoldersPanel" name="folders_tab">
64 <attribute name="title">
65- <string>Folders</string>
66+ <string notr="true">Folders</string>
67 </attribute>
68 </widget>
69 <widget class="DevicesPanel" name="devices_tab">
70 <attribute name="title">
71- <string>Devices</string>
72+ <string notr="true">Devices</string>
73 </attribute>
74 </widget>
75 <widget class="PreferencesPanel" name="preferences_tab">
76 <attribute name="title">
77- <string>Settings</string>
78+ <string notr="true">Settings</string>
79 </attribute>
80 </widget>
81 <widget class="AccountPanel" name="account_tab">
82 <attribute name="title">
83- <string>Account information</string>
84+ <string notr="true">Account information</string>
85 </attribute>
86 </widget>
87 </widget>
88@@ -287,7 +287,7 @@
89 <item>
90 <widget class="GoToWebButton" name="help_button">
91 <property name="text">
92- <string>Get help online</string>
93+ <string notr="true">Get help online</string>
94 </property>
95 </widget>
96 </item>
97@@ -312,7 +312,7 @@
98 </font>
99 </property>
100 <property name="text">
101- <string>Talk to us</string>
102+ <string notr="true">Talk to us</string>
103 </property>
104 </widget>
105 </item>
106
107=== modified file 'data/qt/device.ui'
108--- data/qt/device.ui 2011-08-23 16:03:31 +0000
109+++ data/qt/device.ui 2012-02-22 17:08:18 +0000
110@@ -24,7 +24,7 @@
111 <item>
112 <widget class="QLabel" name="device_name_label">
113 <property name="text">
114- <string>Local device</string>
115+ <string notr="true">Local device</string>
116 </property>
117 </widget>
118 </item>
119@@ -44,7 +44,7 @@
120 <item>
121 <widget class="QPushButton" name="remove_device_button">
122 <property name="text">
123- <string>Remove</string>
124+ <string notr="true">Remove</string>
125 </property>
126 <property name="secondary" stdset="0">
127 <bool>true</bool>
128
129=== modified file 'data/qt/device_remote.ui'
130--- data/qt/device_remote.ui 2011-11-28 15:06:18 +0000
131+++ data/qt/device_remote.ui 2012-02-22 17:08:18 +0000
132@@ -24,7 +24,7 @@
133 <item>
134 <widget class="QLabel" name="device_name_label">
135 <property name="text">
136- <string>Local device</string>
137+ <string notr="true">Non local device</string>
138 </property>
139 </widget>
140 </item>
141
142=== modified file 'data/qt/devices.ui'
143--- data/qt/devices.ui 2011-08-05 18:07:09 +0000
144+++ data/qt/devices.ui 2012-02-22 17:08:18 +0000
145@@ -23,7 +23,7 @@
146 <item>
147 <widget class="QGroupBox" name="local_device">
148 <property name="title">
149- <string>This device</string>
150+ <string notr="true">This device</string>
151 </property>
152 <layout class="QVBoxLayout" name="verticalLayout">
153 <property name="margin">
154@@ -36,9 +36,9 @@
155 </widget>
156 </item>
157 <item>
158- <widget class="QGroupBox" name="oher_devices">
159+ <widget class="QGroupBox" name="other_devices">
160 <property name="title">
161- <string>Other devices</string>
162+ <string notr="true">Other devices</string>
163 </property>
164 <layout class="QVBoxLayout" name="verticalLayout_2">
165 <property name="margin">
166@@ -90,7 +90,7 @@
167 <item>
168 <widget class="GoToWebButton" name="manage_devices_button">
169 <property name="text">
170- <string>Go to the web page to manage your other devices</string>
171+ <string notr="true">Go to the web page to manage your other devices</string>
172 </property>
173 </widget>
174 </item>
175
176=== modified file 'data/qt/folders.ui'
177--- data/qt/folders.ui 2011-08-23 16:03:31 +0000
178+++ data/qt/folders.ui 2012-02-22 17:08:18 +0000
179@@ -41,7 +41,7 @@
180 </sizepolicy>
181 </property>
182 <property name="text">
183- <string>Go to the web for public and private sharing options</string>
184+ <string notr="true">Go to the web for public and private sharing options</string>
185 </property>
186 </widget>
187 </item>
188@@ -101,17 +101,17 @@
189 </attribute>
190 <column>
191 <property name="text">
192- <string>Name</string>
193- </property>
194- </column>
195- <column>
196- <property name="text">
197- <string>Sync Locally?</string>
198- </property>
199- </column>
200- <column>
201- <property name="text">
202- <string>Explore</string>
203+ <string notr="true">Name</string>
204+ </property>
205+ </column>
206+ <column>
207+ <property name="text">
208+ <string notr="true">Sync Locally?</string>
209+ </property>
210+ </column>
211+ <column>
212+ <property name="text">
213+ <string notr="true">Explore</string>
214 </property>
215 </column>
216 </widget>
217@@ -153,7 +153,7 @@
218 </sizepolicy>
219 </property>
220 <property name="text">
221- <string>Add a folder from this computer</string>
222+ <string notr="true">Add a folder from this computer</string>
223 </property>
224 </widget>
225 </item>
226
227=== modified file 'data/qt/loadingoverlay.ui'
228--- data/qt/loadingoverlay.ui 2011-08-05 15:19:12 +0000
229+++ data/qt/loadingoverlay.ui 2012-02-22 17:08:18 +0000
230@@ -10,9 +10,6 @@
231 <height>230</height>
232 </rect>
233 </property>
234- <property name="windowTitle">
235- <string>Frame</string>
236- </property>
237 <layout class="QVBoxLayout" name="verticalLayout">
238 <property name="topMargin">
239 <number>30</number>
240@@ -61,7 +58,7 @@
241 </font>
242 </property>
243 <property name="text">
244- <string>Getting information, please wait...</string>
245+ <string notr="true">Getting information, please wait...</string>
246 </property>
247 </widget>
248 </item>
249
250=== modified file 'data/qt/mainwindow.ui'
251--- data/qt/mainwindow.ui 2011-08-18 22:01:02 +0000
252+++ data/qt/mainwindow.ui 2012-02-22 17:08:18 +0000
253@@ -23,7 +23,7 @@
254 </size>
255 </property>
256 <property name="windowTitle">
257- <string>Ubuntu One</string>
258+ <string notr="true">Ubuntu One</string>
259 </property>
260 <property name="windowIcon">
261 <iconset resource="images.qrc">
262
263=== modified file 'data/qt/preferences.ui'
264--- data/qt/preferences.ui 2011-09-08 22:22:46 +0000
265+++ data/qt/preferences.ui 2012-02-22 17:08:18 +0000
266@@ -23,7 +23,7 @@
267 <item>
268 <widget class="QGroupBox" name="bandwidth_settings">
269 <property name="title">
270- <string>Bandwidth Settings</string>
271+ <string notr="true">Bandwidth Settings</string>
272 </property>
273 <layout class="QGridLayout" name="gridLayout">
274 <property name="margin">
275@@ -32,7 +32,7 @@
276 <item row="0" column="0">
277 <widget class="QCheckBox" name="limit_uploads_checkbox">
278 <property name="text">
279- <string>Limit upload speed to</string>
280+ <string notr="true">Limit upload speed to</string>
281 </property>
282 </widget>
283 </item>
284@@ -49,14 +49,14 @@
285 <item row="0" column="2">
286 <widget class="QLabel" name="kbps_label_1">
287 <property name="text">
288- <string>Kilobits per second</string>
289+ <string notr="true">Kilobits per second</string>
290 </property>
291 </widget>
292 </item>
293 <item row="2" column="0">
294 <widget class="QCheckBox" name="limit_downloads_checkbox">
295 <property name="text">
296- <string>Limit download speed to</string>
297+ <string notr="true">Limit download speed to</string>
298 </property>
299 </widget>
300 </item>
301@@ -73,7 +73,7 @@
302 <item row="2" column="2">
303 <widget class="QLabel" name="kbps_label_2">
304 <property name="text">
305- <string>Kilobits per second</string>
306+ <string notr="true">Kilobits per second</string>
307 </property>
308 </widget>
309 </item>
310@@ -93,7 +93,7 @@
311 <item row="4" column="0" colspan="3">
312 <widget class="QLabel" name="label_2">
313 <property name="text">
314- <string>Please note that your files will not sync if you set bandwidth to 0</string>
315+ <string notr="true">Please note that your files will not sync if you set bandwidth to 0</string>
316 </property>
317 <property name="scaledContents">
318 <bool>false</bool>
319@@ -122,7 +122,7 @@
320 <item>
321 <widget class="QGroupBox" name="file_sync_settings">
322 <property name="title">
323- <string>File Sync Settings</string>
324+ <string notr="true">File Sync Settings</string>
325 </property>
326 <layout class="QVBoxLayout" name="verticalLayout_1">
327 <property name="margin">
328@@ -131,28 +131,28 @@
329 <item>
330 <widget class="QCheckBox" name="autoconnect_checkbox">
331 <property name="text">
332- <string>Connect automatically when computer starts</string>
333+ <string notr="true">Connect automatically when computer starts</string>
334 </property>
335 </widget>
336 </item>
337 <item>
338 <widget class="QCheckBox" name="udf_autosubscribe_checkbox">
339 <property name="text">
340- <string>Automatically sync all new cloud folders to this computer</string>
341+ <string notr="true">Automatically sync all new cloud folders to this computer</string>
342 </property>
343 </widget>
344 </item>
345 <item>
346 <widget class="QCheckBox" name="share_autosubscribe_checkbox">
347 <property name="text">
348- <string>Automatically sync all folders shared with me to this computer</string>
349+ <string notr="true">Automatically sync all folders shared with me to this computer</string>
350 </property>
351 </widget>
352 </item>
353 <item>
354 <widget class="QCheckBox" name="show_all_notifications_checkbox">
355 <property name="text">
356- <string>Allow all notifications to this device</string>
357+ <string notr="true">Allow all notifications to this device</string>
358 </property>
359 </widget>
360 </item>
361@@ -193,14 +193,14 @@
362 <item>
363 <widget class="QPushButton" name="apply_changes_button">
364 <property name="text">
365- <string>Apply these settings</string>
366+ <string notr="true">Apply these settings</string>
367 </property>
368 </widget>
369 </item>
370 <item>
371 <widget class="QPushButton" name="restore_defaults_button">
372 <property name="text">
373- <string>Default settings</string>
374+ <string notr="true">Default settings</string>
375 </property>
376 <property name="secondary" stdset="0">
377 <bool>true</bool>
378
379=== modified file 'data/qt/signin.ui'
380--- data/qt/signin.ui 2011-11-14 20:42:04 +0000
381+++ data/qt/signin.ui 2012-02-22 17:08:18 +0000
382@@ -10,9 +10,6 @@
383 <height>312</height>
384 </rect>
385 </property>
386- <property name="windowTitle">
387- <string>Form</string>
388- </property>
389 <layout class="QHBoxLayout" name="horizontalLayout_3">
390 <property name="margin">
391 <number>0</number>
392@@ -29,14 +26,14 @@
393 <item>
394 <widget class="QLabel" name="sign_in_label">
395 <property name="text">
396- <string>Sign in to Ubuntu One</string>
397+ <string notr="true">Sign in to Ubuntu One</string>
398 </property>
399 </widget>
400 </item>
401 <item>
402 <widget class="QLabel" name="description_label">
403 <property name="text">
404- <string>Sign in with your existing Ubuntu One username and password.</string>
405+ <string notr="true">Sign in with your existing Ubuntu One username and password.</string>
406 </property>
407 </widget>
408 </item>
409@@ -55,7 +52,7 @@
410 <item>
411 <widget class="QLabel" name="email_label">
412 <property name="text">
413- <string>Email address</string>
414+ <string notr="true">Email address</string>
415 </property>
416 </widget>
417 </item>
418@@ -76,7 +73,7 @@
419 <item>
420 <widget class="QLabel" name="password_label">
421 <property name="text">
422- <string>Password</string>
423+ <string notr="true">Password</string>
424 </property>
425 </widget>
426 </item>
427@@ -94,7 +91,7 @@
428 <item>
429 <widget class="QPushButton" name="signin_button">
430 <property name="text">
431- <string>Sign in</string>
432+ <string notr="true">Sign in</string>
433 </property>
434 <property name="default">
435 <bool>true</bool>
436@@ -104,7 +101,7 @@
437 <item>
438 <widget class="QPushButton" name="cancel_button">
439 <property name="text">
440- <string>Cancel</string>
441+ <string notr="true">Cancel</string>
442 </property>
443 <property name="secondary" stdset="0">
444 <bool>true</bool>
445@@ -137,7 +134,7 @@
446 </sizepolicy>
447 </property>
448 <property name="text">
449- <string>Forgot your password?</string>
450+ <string notr="true">Forgot your password?</string>
451 </property>
452 </widget>
453 </item>
454
455=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
456--- ubuntuone/controlpanel/gui/__init__.py 2012-02-22 12:09:28 +0000
457+++ ubuntuone/controlpanel/gui/__init__.py 2012-02-22 17:08:18 +0000
458@@ -74,7 +74,9 @@
459 TWITTER_LINK = u'http://twitter.com/ubuntuone/'
460
461 # Undefined variable '_', pylint: disable=E0602
462+# Translatable strings
463
464+ACCOUNT_LABEL = _('Your services')
465 ALWAYS_SUBSCRIBED = _('Always in sync')
466 CONNECT_BUTTON_LABEL = _('Connect to Ubuntu One')
467 CONTACTS = _('Thunderbird plug-in')
468@@ -93,9 +95,13 @@
469 DEVICE_REMOVAL_ERROR = _('The device could not be removed.')
470 DEVICES_BUTTON_TOOLTIP = _('Manage devices registered with your personal '
471 'cloud')
472+DEVICES_LOCAL_LABEL = _('This device')
473+DEVICES_MANAGE_LABEL = _('Go to the web page to manage your other devices')
474+DEVICES_REMOTE_LABEL = _('Other devices')
475 DEVICES_TITLE = _('The devices connected with your personal cloud are listed '
476 'below.')
477-EXPLORE = _('Explore')
478+EDIT_ACCOUNT_LABEL = _('Edit your services online')
479+EDIT_PROFILE_LABEL = _('Edit personal details online')
480 FAILED_INSTALL = _('<i>%(package_name)s</i> could not be installed')
481 FOLDER_ADD_BUTTON_TEXT = _('Sync another folder with your cloud')
482 FOLDER_INVALID_PATH = _('The chosen directory "%(folder_path)s" is not valid. '
483@@ -105,12 +111,18 @@
484 'cloud folder.')
485 FOLDER_OWNED_BY = _('My personal folders')
486 FOLDER_SHARED_BY = _('Shared by %(other_user_display_name)s')
487+FOLDERS_BUTTON_ADD_FOLDER = _('Add a folder from this computer')
488+FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud '
489+ 'folders')
490+FOLDERS_COLUMN_EXPLORE = _('Explore')
491+FOLDERS_COLUMN_NAME = _('Name')
492+FOLDERS_COLUMN_SYNC_LOCALLY = _('Sync Locally?')
493 FOLDERS_CONFIRM_MERGE = _('The contents of your cloud folder will be merged '
494 'with your local folder "%(folder_path)s" when '
495 'subscribing.\nDo you want to subscribe to this '
496 'cloud folder?')
497-FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud '
498- 'folders')
499+FOLDERS_MANAGE_LABEL = _('Go to the web for public and private sharing '
500+ 'options')
501 FOLDERS_TITLE = _('Select which folders from your cloud you want to sync with '
502 'this computer')
503 FILE_SYNC_CONNECT = _('Connect')
504@@ -139,6 +151,8 @@
505 GENERAL_ERROR_TITLE = _('Ubuntu One experienced an error')
506 GENERAL_ERROR_MSG = _('Sorry, an error has occurred and Ubuntu One '
507 'needs to close.')
508+GET_HELP_ONLINE = _('Get help online')
509+GET_MORE_STORAGE = _('Get more storage')
510 GREETING = _('Hi %(user_display_name)s')
511 INSTALL_PACKAGE = _('You need to install the package <i>%(package_name)s'
512 '</i> in order to enable more sync services.')
513@@ -146,11 +160,16 @@
514 '%(service_name)s')
515 INSTALLING = _('Installation of <i>%(package_name)s</i> in progress')
516 LOADING = _('Loading...')
517+LOADING_OVERLAY = _('Getting information, please wait...')
518+MAIN_ACCOUNT_TAB = _('Account information')
519+MAIN_DEVICES_TAB = _('Devices')
520+MAIN_FOLDERS_TAB = _('Folders')
521+MAIN_PREFERENCES_TAB = _('Settings')
522 MAIN_WINDOW_TITLE = _('%(app_name)s Control Panel')
523+MUSIC_DISPLAY_NAME = _('Purchased Music')
524+MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One'
525 MY_FOLDERS = _('My folders')
526 NAME_NOT_SET = _('[unknown user name]')
527-MUSIC_DISPLAY_NAME = _('Purchased Music')
528-MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One'
529 NETWORK_OFFLINE = _('An internet connection is required to join or sign '
530 'in to %(app_name)s.')
531 NO_DEVICES = _('No devices to show.')
532@@ -158,18 +177,45 @@
533 NO_PAIRING_RECORD = _('There is no Ubuntu One pairing record.')
534 PERCENTAGE_LABEL = _('%(percentage)s used')
535 PLEASE_WAIT = _('Please wait')
536+PROFILE_LABEL = _('Personal details')
537 QUOTA_LABEL = _('Using %(used)s of %(total)s (%(percentage).0f%%)')
538-USAGE_LABEL = _('%(used)s of %(total)s')
539+REMOVE_BUTTON = _('Remove')
540+RESTORE_LABEL = _('Restore')
541 SERVICES_BUTTON_TOOLTIP = _('Manage the sync services')
542 SERVICES_TITLE = _('Enable the sync services for this computer.')
543+SETTINGS_ALLOW_NOTIFICATIONS = _('Allow all notifications to this device')
544+SETTINGS_AUTO_CONNECT = _('Connect automatically when computer starts')
545+SETTINGS_BANDWIDTH = _('Bandwidth Settings')
546+SETTINGS_BANDWIDTH_ZERO_WARNING = _('Please note that your files will not '
547+ 'sync if you set bandwidth to 0')
548+SETTINGS_BUTTON_APPLY = _('Apply these settings')
549+SETTINGS_BUTTON_DEFAULT = _('Default settings')
550 SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'
551 'previous values were restored.')
552+SETTINGS_FILE_SYNC = _('File Sync Settings')
553+SETTINGS_KILOBITS_PER_SECOND = _('Kilobits per second')
554+SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to')
555+SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to')
556+SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders '
557+ 'to this computer')
558+SETTINGS_SYNC_ALL_SHARES = _('Automatically sync all folders shared with me '
559+ 'to this computer')
560 SHARES_BUTTON_TOOLTIP = _('Manage the shares offered to others')
561 SHARES_TITLE = _('Manage permissions for shares made to other users.')
562+SIGNIN_BUTTON = _('Sign in')
563+SIGNIN_CANCEL = _('Cancel')
564+SIGNIN_DESCRIPTION = _('Sign in with your existing Ubuntu One '
565+ 'username and password.')
566+SIGNIN_EMAIL = _('Email address')
567+SIGNIN_FORGOT_PASSWORD = _('Forgot your password?')
568+SIGNIN_PASSWORD = _('Password')
569+SIGNIN_TITLE = _('Sign in to Ubuntu One')
570 SUCCESS_INSTALL = _('<i>%(package_name)s</i> was successfully installed')
571-SYNC_LOCALLY = _('Sync locally?')
572+TALK_TO_US = _('Talk to us')
573 VALUE_ERROR = _('Value could not be retrieved.')
574 UNKNOWN_ERROR = _('Unknown error')
575+USAGE_LABEL = _('%(used)s of %(total)s')
576+QUIT_LABEL = _('Quit Ubuntu One')
577
578 # pylint: enable=E0602
579
580
581=== modified file 'ubuntuone/controlpanel/gui/qt/account.py'
582--- ubuntuone/controlpanel/gui/qt/account.py 2011-09-07 16:56:39 +0000
583+++ ubuntuone/controlpanel/gui/qt/account.py 2012-02-22 17:08:18 +0000
584@@ -23,8 +23,12 @@
585
586 from ubuntuone.controlpanel.logger import setup_logging, log_call
587 from ubuntuone.controlpanel.gui import (
588+ ACCOUNT_LABEL,
589+ EDIT_ACCOUNT_LABEL,
590 EDIT_ACCOUNT_LINK,
591+ EDIT_PROFILE_LABEL,
592 EDIT_PROFILE_LINK,
593+ PROFILE_LABEL,
594 )
595 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
596 from ubuntuone.controlpanel.gui.qt.ui import account_ui
597@@ -42,8 +46,12 @@
598 def _setup(self):
599 """Do some extra setupping for the UI."""
600 super(AccountPanel, self)._setup()
601+ self.ui.services.setTitle(ACCOUNT_LABEL)
602+ self.ui.edit_services_button.setText(EDIT_ACCOUNT_LABEL)
603+ self.ui.edit_services_button.uri = EDIT_ACCOUNT_LINK
604+ self.ui.edit_profile_button.setText(EDIT_PROFILE_LABEL)
605 self.ui.edit_profile_button.uri = EDIT_PROFILE_LINK
606- self.ui.edit_services_button.uri = EDIT_ACCOUNT_LINK
607+ self.ui.profile_info.setTitle(PROFILE_LABEL)
608
609 # pylint: disable=E0202
610 @defer.inlineCallbacks
611
612=== modified file 'ubuntuone/controlpanel/gui/qt/controlpanel.py'
613--- ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-01-31 20:33:22 +0000
614+++ ubuntuone/controlpanel/gui/qt/controlpanel.py 2012-02-22 17:08:18 +0000
615@@ -24,13 +24,20 @@
616 from ubuntuone.controlpanel.backend import AUTOCONNECT_KEY
617 from ubuntuone.controlpanel.logger import setup_logging, log_call
618 from ubuntuone.controlpanel.gui import (
619- humanize,
620- show_quota_warning,
621 EDIT_SERVICES_LINK,
622 FACEBOOK_LINK,
623+ GET_HELP_ONLINE,
624+ GET_MORE_STORAGE,
625 GET_SUPPORT_LINK,
626 GREETING,
627+ humanize,
628+ MAIN_ACCOUNT_TAB,
629+ MAIN_DEVICES_TAB,
630+ MAIN_FOLDERS_TAB,
631+ MAIN_PREFERENCES_TAB,
632 PERCENTAGE_LABEL,
633+ show_quota_warning,
634+ TALK_TO_US,
635 TWITTER_LINK,
636 USAGE_LABEL,
637 )
638@@ -53,12 +60,28 @@
639
640 def _setup(self):
641 """Do some extra setupping for the UI."""
642+ self.ui.get_more_space_button.setText(GET_MORE_STORAGE)
643 self.ui.get_more_space_button.uri = EDIT_SERVICES_LINK
644+
645+ self.ui.help_button.setText(GET_HELP_ONLINE)
646 self.ui.help_button.uri = GET_SUPPORT_LINK
647+
648+ self.ui.follow_us_label.setText(TALK_TO_US)
649+
650 self.ui.devices_tab.localDeviceRemoved.connect(
651 self.on_credentials_not_found)
652 self.ui.signin.credentialsFound.connect(lambda creds: self.load())
653
654+ self.ui.tab_widget.setTabText(
655+ self.ui.tab_widget.indexOf(self.ui.folders_tab), MAIN_FOLDERS_TAB)
656+ self.ui.tab_widget.setTabText(
657+ self.ui.tab_widget.indexOf(self.ui.devices_tab), MAIN_DEVICES_TAB)
658+ self.ui.tab_widget.setTabText(
659+ self.ui.tab_widget.indexOf(self.ui.preferences_tab),
660+ MAIN_PREFERENCES_TAB)
661+ self.ui.tab_widget.setTabText(
662+ self.ui.tab_widget.indexOf(self.ui.account_tab), MAIN_ACCOUNT_TAB)
663+
664 @defer.inlineCallbacks
665 def connect_file_sync(self):
666 """Connect file sync service if the setting autoconnect is enabled."""
667
668=== modified file 'ubuntuone/controlpanel/gui/qt/device.py'
669--- ubuntuone/controlpanel/gui/qt/device.py 2011-11-28 15:06:18 +0000
670+++ ubuntuone/controlpanel/gui/qt/device.py 2012-02-22 17:08:18 +0000
671@@ -26,7 +26,10 @@
672 DEVICE_TYPE_PHONE,
673 )
674 from ubuntuone.controlpanel import cache
675-from ubuntuone.controlpanel.gui import DEVICE_CONFIRM_REMOVE
676+from ubuntuone.controlpanel.gui import (
677+ DEVICE_CONFIRM_REMOVE,
678+ REMOVE_BUTTON,
679+)
680 from ubuntuone.controlpanel.gui.qt import (
681 handle_errors,
682 pixmap_from_name,
683@@ -68,6 +71,13 @@
684 super(DeviceWidget, self).__init__(*args, **kwargs)
685 self.ui = device_ui.Ui_Form()
686 self.ui.setupUi(self)
687+
688+ # The following is a hack to avoid having the faked self.ui failing
689+ # with AttributeError in the tests. We need to improve the fake so we
690+ # don't leak this to the production code.
691+ if getattr(self.ui, 'remove_device_button', None) is not None:
692+ self.ui.remove_device_button.setText(REMOVE_BUTTON)
693+
694 self.id = device_id
695
696 def update_device_info(self, device_info):
697
698=== modified file 'ubuntuone/controlpanel/gui/qt/devices.py'
699--- ubuntuone/controlpanel/gui/qt/devices.py 2012-01-04 18:51:08 +0000
700+++ ubuntuone/controlpanel/gui/qt/devices.py 2012-02-22 17:08:18 +0000
701@@ -25,7 +25,12 @@
702 from twisted.internet import defer
703
704 from ubuntuone.controlpanel.logger import setup_logging, log_call
705-from ubuntuone.controlpanel.gui import EDIT_DEVICES_LINK
706+from ubuntuone.controlpanel.gui import (
707+ DEVICES_LOCAL_LABEL,
708+ DEVICES_MANAGE_LABEL,
709+ DEVICES_REMOTE_LABEL,
710+ EDIT_DEVICES_LINK,
711+)
712 from ubuntuone.controlpanel.gui.qt.ui import devices_ui
713 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
714 from ubuntuone.controlpanel.gui.qt import device
715@@ -45,6 +50,9 @@
716 def _setup(self):
717 """Do some extra setupping for the UI."""
718 super(DevicesPanel, self)._setup()
719+ self.ui.local_device.setTitle(DEVICES_LOCAL_LABEL)
720+ self.ui.other_devices.setTitle(DEVICES_REMOTE_LABEL)
721+ self.ui.manage_devices_button.setText(DEVICES_MANAGE_LABEL)
722 self.ui.manage_devices_button.uri = EDIT_DEVICES_LINK
723
724 # pylint: disable=E0202
725
726=== modified file 'ubuntuone/controlpanel/gui/qt/folders.py'
727--- ubuntuone/controlpanel/gui/qt/folders.py 2012-02-06 21:10:10 +0000
728+++ ubuntuone/controlpanel/gui/qt/folders.py 2012-02-22 17:08:18 +0000
729@@ -26,18 +26,21 @@
730 from ubuntuone.controlpanel.logger import setup_logging, log_call
731 from ubuntuone.controlpanel.gui import (
732 ALWAYS_SUBSCRIBED,
733- EXPLORE,
734 FOLDER_ICON_NAME,
735 FOLDER_OWNED_BY,
736 FOLDER_SHARED_BY,
737+ FOLDERS_BUTTON_ADD_FOLDER,
738+ FOLDERS_COLUMN_EXPLORE,
739+ FOLDERS_COLUMN_NAME,
740+ FOLDERS_COLUMN_SYNC_LOCALLY,
741 FOLDERS_CONFIRM_MERGE,
742+ FOLDERS_MANAGE_LABEL,
743 MANAGE_FILES_LINK,
744 MUSIC_ICON_NAME,
745 MUSIC_DISPLAY_NAME,
746 MUSIC_REAL_PATH,
747 NAME_NOT_SET,
748 SHARE_ICON_NAME,
749- SYNC_LOCALLY,
750 )
751 from ubuntuone.controlpanel.gui.qt import uri_hook, icon_from_name
752 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
753@@ -68,13 +71,18 @@
754 """Do some extra setupping for the UI."""
755 super(FoldersPanel, self)._setup()
756 self.ui.add_folder_button.folderCreated.connect(self.on_folder_created)
757+ self.ui.add_folder_button.setText(FOLDERS_BUTTON_ADD_FOLDER)
758
759+ self.ui.folders.headerItem().setText(0, FOLDERS_COLUMN_NAME)
760+ self.ui.folders.headerItem().setText(1, FOLDERS_COLUMN_SYNC_LOCALLY)
761+ self.ui.folders.headerItem().setText(2, FOLDERS_COLUMN_EXPLORE)
762 headers = self.ui.folders.header()
763 headers.setResizeMode(FOLDER_NAME_COL, headers.Stretch)
764 headers.setResizeMode(SUBSCRIPTION_COL, headers.ResizeToContents)
765 headers.setResizeMode(EXPLORE_COL, headers.ResizeToContents)
766 headers.setStretchLastSection(False)
767
768+ self.ui.share_publish_button.setText(FOLDERS_MANAGE_LABEL)
769 self.ui.share_publish_button.uri = MANAGE_FILES_LINK
770 icon = icon_from_name('external_icon_orange')
771 self.ui.share_publish_button.setIcon(icon)
772@@ -118,7 +126,7 @@
773
774 item = QtGui.QTreeWidgetItem()
775 item.setText(FOLDER_NAME_COL, name)
776- item.setText(SUBSCRIPTION_COL, SYNC_LOCALLY)
777+ item.setText(SUBSCRIPTION_COL, FOLDERS_COLUMN_SYNC_LOCALLY)
778 item.setSizeHint(FOLDER_NAME_COL, QtCore.QSize(-1, 20))
779 brush = QtGui.QBrush(QtGui.QColor('#d6d3cf'))
780 for col in (FOLDER_NAME_COL, SUBSCRIPTION_COL, EXPLORE_COL):
781@@ -141,7 +149,7 @@
782 name = self._process_name(volume[u'display_name'])
783 child.setText(FOLDER_NAME_COL, name)
784 child.setToolTip(FOLDER_NAME_COL, name)
785- child.setToolTip(EXPLORE_COL, EXPLORE)
786+ child.setToolTip(EXPLORE_COL, FOLDERS_COLUMN_EXPLORE)
787
788 icon_name = FOLDER_ICON_NAME
789 if is_share:
790@@ -170,7 +178,7 @@
791 model_index = self.ui.folders.indexFromItem(child, EXPLORE_COL)
792 button = QtGui.QPushButton(parent=self.ui.folders)
793 button.setFlat(True)
794- button.setText(EXPLORE)
795+ button.setText(FOLDERS_COLUMN_EXPLORE)
796 button.setObjectName('explore_folder_button')
797 policy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
798 QtGui.QSizePolicy.Fixed)
799
800=== modified file 'ubuntuone/controlpanel/gui/qt/loadingoverlay.py'
801--- ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2011-09-02 17:59:39 +0000
802+++ ubuntuone/controlpanel/gui/qt/loadingoverlay.py 2012-02-22 17:08:18 +0000
803@@ -20,6 +20,7 @@
804
805 from PyQt4 import QtGui, QtCore
806
807+from ubuntuone.controlpanel.gui import LOADING_OVERLAY
808 from ubuntuone.controlpanel.gui.qt.ui import loadingoverlay_ui
809
810
811@@ -44,6 +45,12 @@
812 self.counter = 0
813 self.orientation = False
814
815+ # The following is a hack to avoid having the faked self.ui failing
816+ # with AttributeError in the tests. We need to improve the fake so we
817+ # don't leak this to the production code.
818+ if getattr(self.ui, 'label', None) is not None:
819+ self.ui.label.setText(LOADING_OVERLAY)
820+
821 # Invalid name "paintEvent"
822 # pylint: disable=C0103
823
824
825=== modified file 'ubuntuone/controlpanel/gui/qt/preferences.py'
826--- ubuntuone/controlpanel/gui/qt/preferences.py 2011-09-07 16:56:39 +0000
827+++ ubuntuone/controlpanel/gui/qt/preferences.py 2012-02-22 17:08:18 +0000
828@@ -26,7 +26,21 @@
829
830 from ubuntuone.controlpanel import backend
831 from ubuntuone.controlpanel.logger import setup_logging, log_call
832-from ubuntuone.controlpanel.gui import KILOBYTES
833+from ubuntuone.controlpanel.gui import (
834+ KILOBYTES,
835+ SETTINGS_ALLOW_NOTIFICATIONS,
836+ SETTINGS_AUTO_CONNECT,
837+ SETTINGS_BANDWIDTH,
838+ SETTINGS_BANDWIDTH_ZERO_WARNING,
839+ SETTINGS_BUTTON_APPLY,
840+ SETTINGS_BUTTON_DEFAULT,
841+ SETTINGS_FILE_SYNC,
842+ SETTINGS_KILOBITS_PER_SECOND,
843+ SETTINGS_LIMIT_DOWNLOAD,
844+ SETTINGS_LIMIT_UPLOAD,
845+ SETTINGS_SYNC_ALL_FOLDERS,
846+ SETTINGS_SYNC_ALL_SHARES,
847+)
848 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
849 from ubuntuone.controlpanel.gui.qt.ui import preferences_ui
850
851@@ -64,6 +78,24 @@
852 ui_class = preferences_ui
853 logger = logger
854
855+ def _setup(self):
856+ """Do some extra setupping for the UI."""
857+ super(PreferencesPanel, self)._setup()
858+ self.ui.apply_changes_button.setText(SETTINGS_BUTTON_APPLY)
859+ self.ui.autoconnect_checkbox.setText(SETTINGS_AUTO_CONNECT)
860+ self.ui.bandwidth_settings.setTitle(SETTINGS_BANDWIDTH)
861+ self.ui.file_sync_settings.setTitle(SETTINGS_FILE_SYNC)
862+ self.ui.kbps_label_1.setText(SETTINGS_KILOBITS_PER_SECOND)
863+ self.ui.kbps_label_2.setText(SETTINGS_KILOBITS_PER_SECOND)
864+ self.ui.label_2.setText(SETTINGS_BANDWIDTH_ZERO_WARNING)
865+ self.ui.limit_uploads_checkbox.setText(SETTINGS_LIMIT_UPLOAD)
866+ self.ui.limit_downloads_checkbox.setText(SETTINGS_LIMIT_DOWNLOAD)
867+ self.ui.restore_defaults_button.setText(SETTINGS_BUTTON_DEFAULT)
868+ self.ui.share_autosubscribe_checkbox.setText(SETTINGS_SYNC_ALL_FOLDERS)
869+ self.ui.show_all_notifications_checkbox.setText(
870+ SETTINGS_ALLOW_NOTIFICATIONS)
871+ self.ui.udf_autosubscribe_checkbox.setText(SETTINGS_SYNC_ALL_SHARES)
872+
873 # pylint: disable=E0202
874 @defer.inlineCallbacks
875 def load(self):
876
877=== modified file 'ubuntuone/controlpanel/gui/qt/signin.py'
878--- ubuntuone/controlpanel/gui/qt/signin.py 2011-09-08 01:15:15 +0000
879+++ ubuntuone/controlpanel/gui/qt/signin.py 2012-02-22 17:08:18 +0000
880@@ -1,6 +1,4 @@
881 # -*- coding: utf-8 -*-
882-
883-# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
884 #
885 # Copyright 2011 Canonical Ltd.
886 #
887@@ -21,7 +19,16 @@
888 from PyQt4 import QtCore
889 from twisted.internet import defer
890
891-from ubuntuone.controlpanel.gui import RESET_PASSWORD_LINK
892+from ubuntuone.controlpanel.gui import (
893+ RESET_PASSWORD_LINK,
894+ SIGNIN_BUTTON,
895+ SIGNIN_CANCEL,
896+ SIGNIN_DESCRIPTION,
897+ SIGNIN_EMAIL,
898+ SIGNIN_FORGOT_PASSWORD,
899+ SIGNIN_PASSWORD,
900+ SIGNIN_TITLE,
901+)
902 from ubuntuone.controlpanel.gui.qt import icon_from_name, handle_errors
903 from ubuntuone.controlpanel.gui.qt.ubuntuonebin import UbuntuOneBin
904 from ubuntuone.controlpanel.gui.qt.ui import signin_ui
905@@ -43,11 +50,18 @@
906 def _setup(self):
907 """Do some extra setupping for the UI."""
908 super(SignInPanel, self)._setup()
909+ self.ui.cancel_button.setText(SIGNIN_CANCEL)
910+ self.ui.description_label.setText(SIGNIN_DESCRIPTION)
911+ self.ui.email_label.setText(SIGNIN_EMAIL)
912+ self.ui.sign_in_label.setText(SIGNIN_TITLE)
913+ self.ui.password_label.setText(SIGNIN_PASSWORD)
914
915+ self.ui.forgot_password_button.setText(SIGNIN_FORGOT_PASSWORD)
916 self.ui.forgot_password_button.uri = RESET_PASSWORD_LINK
917 icon = icon_from_name('external_icon_orange')
918 self.ui.forgot_password_button.setIcon(icon)
919
920+ self.ui.signin_button.setText(SIGNIN_BUTTON)
921 self.ui.signin_button.setEnabled(False)
922 for entry in (self.ui.email_entry, self.ui.password_entry):
923 entry.textChanged.connect(self.validate)
924
925=== modified file 'ubuntuone/controlpanel/gui/qt/systray.py'
926--- ubuntuone/controlpanel/gui/qt/systray.py 2012-02-06 21:10:10 +0000
927+++ ubuntuone/controlpanel/gui/qt/systray.py 2012-02-22 17:08:18 +0000
928@@ -20,6 +20,11 @@
929
930 from ubuntuone.platform.tools import SyncDaemonTool
931
932+from ubuntuone.controlpanel.gui import (
933+ RESTORE_LABEL,
934+ QUIT_LABEL,
935+)
936+
937
938 class TrayIcon(QtGui.QSystemTrayIcon):
939
940@@ -32,9 +37,9 @@
941 self.window = window
942 self.activated.connect(self.on_activated)
943 self.context_menu = QtGui.QMenu()
944- self.restore = QtGui.QAction("Restore", self,
945+ self.restore = QtGui.QAction(RESTORE_LABEL, self,
946 triggered=self.restore_window)
947- self.quit = QtGui.QAction("Quit Ubuntu One", self,
948+ self.quit = QtGui.QAction(QUIT_LABEL, self,
949 triggered=self.stop)
950 self.context_menu.addAction(self.restore)
951 self.context_menu.addSeparator()
952
953=== modified file 'ubuntuone/controlpanel/gui/qt/tests/test_folders.py'
954--- ubuntuone/controlpanel/gui/qt/tests/test_folders.py 2011-11-23 17:27:13 +0000
955+++ ubuntuone/controlpanel/gui/qt/tests/test_folders.py 2012-02-22 17:08:18 +0000
956@@ -86,7 +86,8 @@
957 def assert_folder_group_header_correct(self, item, name):
958 """Check that the folder group header is correct."""
959 self.assertEqual(item.text(gui.FOLDER_NAME_COL), name)
960- self.assertEqual(item.text(gui.SUBSCRIPTION_COL), gui.SYNC_LOCALLY)
961+ self.assertEqual(item.text(gui.SUBSCRIPTION_COL),
962+ gui.FOLDERS_COLUMN_SYNC_LOCALLY)
963 self.assertEqual(item.text(gui.EXPLORE_COL), '')
964
965 @defer.inlineCallbacks
966@@ -165,7 +166,8 @@
967
968 # tooltips are correct
969 self.assertEqual(item.toolTip(gui.FOLDER_NAME_COL), name)
970- self.assertEqual(item.toolTip(gui.EXPLORE_COL), gui.EXPLORE)
971+ self.assertEqual(item.toolTip(gui.EXPLORE_COL),
972+ gui.FOLDERS_COLUMN_EXPLORE)
973
974 # explore button is in place
975 model_index = folders.indexFromItem(item, gui.EXPLORE_COL)
976
977=== modified file 'ubuntuone/controlpanel/gui/qt/ui/__init__.py'
978--- ubuntuone/controlpanel/gui/qt/ui/__init__.py 2011-07-11 11:19:09 +0000
979+++ ubuntuone/controlpanel/gui/qt/ui/__init__.py 2012-02-22 17:08:18 +0000
980@@ -1,8 +1,6 @@
981 # -*- coding: utf-8 -*-
982-
983-# Authors: Alejandro J. Cura <alecu@canonical.com>
984 #
985-# Copyright 2011 Canonical Ltd.
986+# Copyright 2011-2012 Canonical Ltd.
987 #
988 # This program is free software: you can redistribute it and/or modify it
989 # under the terms of the GNU General Public License version 3, as published

Subscribers

People subscribed via source and target branches