Merge lp:~mikemc/ubuntuone-control-panel/use-translations-1074116 into lp:ubuntuone-control-panel

Proposed by Mike McCracken
Status: Merged
Approved by: Mike McCracken
Approved revision: 386
Merged at revision: 390
Proposed branch: lp:~mikemc/ubuntuone-control-panel/use-translations-1074116
Merge into: lp:ubuntuone-control-panel
Prerequisite: lp:~mikemc/ubuntuone-control-panel/updater-common
Diff against target: 44 lines (+8/-11)
2 files modified
ubuntuone/controlpanel/__init__.py (+0/-1)
ubuntuone/controlpanel/gui/__init__.py (+8/-10)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-control-panel/use-translations-1074116
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
Michał Karnicki (community) Approve
Review via email: mp+139546@code.launchpad.net

Commit message

- Use new SSO API to get platform-appropriate translation function. (LP: 1074116)

Description of the change

- Use new SSO API to get platform-appropriate translation function. (LP: 1074116)

See notes on https://code.launchpad.net/~mikemc/ubuntu-sso-client/cross-platform-translations-1074116/+merge/139536 for howto test.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) :
review: Approve
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (7.3 KiB)

The attempt to merge lp:~mikemc/ubuntuone-control-panel/use-translations-1074116 into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

*** Running DBus test suite ***
ubuntuone.controlpanel.dbustests.test_dbus_service
  BaseTestCase
    runTest ... [OK]
  DBusServiceMainTestCase
    test_dbus_service_cant_register ... Control panel backend already running.
                                   [OK]
    test_dbus_service_main ... [OK]
  DBusServiceTestCase
    test_cant_register_twice ... [SKIPPED]
    test_dbus_busname_created ... [OK]
    test_error_handler_default ... [OK]
    test_error_handler_with_exception ... [OK]
    test_error_handler_with_failure ... [OK]
    test_error_handler_with_non_string_dict ... [OK]
    test_error_handler_with_string_dict ... [OK]
    test_register_service ... [OK]
  FileSyncTestCase
    test_file_sync_status_changed ... [OK]
    test_file_sync_status_disabled ... [OK]
    test_file_sync_status_disconnected ... [OK]
    test_file_sync_status_error ... [OK]
    test_file_sync_status_idle ... [OK]
    test_file_sync_status_starting ... [OK]
    test_file_sync_status_stopped ... [OK]
    test_file_sync_status_syncing ... [OK]
    test_file_sync_status_unknown ... [OK]
    test_status_changed_handler ... [OK]
    test_status_changed_handler_after_status_requested ... [OK]
    test_status_changed_handler_after_status_requested_twice ... [OK]
  OperationsAuthErrorTestCase
    test_account_info_returned ... [OK]
    test_change_device_settings ... [OK]
    test_change_replication_settings ... [OK]
    test_change_volume_settings ... [OK]
    test_connect_files ... [OK]
    test_devices_info_returned ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_remove_device ... [OK]
    test_replications_info ... [OK]
    test_restart_files ... [OK]
 ...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/__init__.py'
2--- ubuntuone/controlpanel/__init__.py 2011-09-06 17:21:56 +0000
3+++ ubuntuone/controlpanel/__init__.py 2012-12-12 19:05:28 +0000
4@@ -30,4 +30,3 @@
5 DBUS_PREFERENCES_IFACE = "com.ubuntuone.controlpanel.Preferences"
6
7 WEBSERVICE_BASE_URL = u"https://one.ubuntu.com/api/"
8-TRANSLATION_DOMAIN = 'ubuntuone-control-panel'
9
10=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
11--- ubuntuone/controlpanel/gui/__init__.py 2012-11-02 13:10:20 +0000
12+++ ubuntuone/controlpanel/gui/__init__.py 2012-12-12 19:05:28 +0000
13@@ -16,23 +16,21 @@
14
15 """The control panel UI for Ubuntu One."""
16
17-import gettext
18-import sys
19+import os
20
21 # pylint: disable=W0611
22 from ubuntuone.clientdefs import APP_NAME
23 # pylint: enable=W0611
24
25-from ubuntuone.controlpanel import TRANSLATION_DOMAIN
26+from ubuntu_sso.utils.translation import get_gettext
27+
28 from ubuntuone.controlpanel.backend import UBUNTUONE_LINK
29
30-
31-TRANSLATION = gettext.translation(TRANSLATION_DOMAIN, fallback=True)
32-if sys.version_info < (3,):
33- _ = TRANSLATION.ugettext
34-else:
35- _ = TRANSLATION.gettext
36-
37+source_path = os.path.join(os.path.dirname(__file__),
38+ os.path.pardir, os.path.pardir,
39+ os.path.pardir, 'build', 'mo')
40+_ = get_gettext('ubuntuone-control-panel',
41+ fallback_path=os.path.abspath(source_path))
42
43 ERROR_COLOR = u'red'
44 KILOBYTES = 1024

Subscribers

People subscribed via source and target branches