Merge lp:~seb128/ubuntu-system-settings/translate-pusher-helper into lp:ubuntu-system-settings

Proposed by Sebastien Bacher on 2015-05-20
Status: Merged
Approved by: Ken VanDine on 2015-05-26
Approved revision: 1418
Merged at revision: 1424
Proposed branch: lp:~seb128/ubuntu-system-settings/translate-pusher-helper
Merge into: lp:ubuntu-system-settings
Diff against target: 26 lines (+5/-2)
1 file modified
tests/test_push_helper.py.in (+5/-2)
To merge this branch: bzr merge lp:~seb128/ubuntu-system-settings/translate-pusher-helper
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-05-20
Ken VanDine 2015-05-20 Approve on 2015-05-20
Review via email: mp+259612@code.launchpad.net

Commit Message

Translate push_helper expected strings to avoid failure in non C locales

Description of the Change

Translate push_helper expected strings to avoid failure in non C locales

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_push_helper.py.in'
2--- tests/test_push_helper.py.in 2014-09-11 15:23:41 +0000
3+++ tests/test_push_helper.py.in 2015-05-20 13:25:07 +0000
4@@ -15,6 +15,9 @@
5 import unittest
6 from unittest import mock
7
8+import gettext
9+_ = gettext.translation('ubuntu-system-settings', fallback=True).gettext
10+
11 HELPER_DIR = '@CMAKE_CURRENT_SOURCE_DIR@/../push-helper/'
12 sys.path.append(HELPER_DIR)
13 import software_updates_helper
14@@ -53,10 +56,10 @@
15 self.assertIn('emblem-counter', notif['notification'])
16 self.assertIn('vibrate', notif['notification'])
17 card = notif['notification']['card']
18- self.assertEqual(card['summary'], "There's an updated system image.")
19+ self.assertEqual(card['summary'], _("There's an updated system image."))
20 self.assertEqual(card['actions'], ['settings:///system/system-update'])
21 self.assertEqual(card['persist'], True)
22- self.assertEqual(card['body'], 'Tap to open the system updater.')
23+ self.assertEqual(card['body'], _('Tap to open the system updater.'))
24 self.assertEqual(card.get('popup', False), False)
25 emblem_counter = notif['notification']['emblem-counter']
26 self.assertEqual(emblem_counter, {'visible': True, 'count': 1})

Subscribers

People subscribed via source and target branches