Merge lp:~mikemc/ubuntu-sso-client/re-re-format-register-link into lp:ubuntu-sso-client

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 1004
Merged at revision: 1002
Proposed branch: lp:~mikemc/ubuntu-sso-client/re-re-format-register-link
Merge into: lp:ubuntu-sso-client
Diff against target: 50 lines (+8/-5)
3 files modified
ubuntu_sso/qt/current_user_sign_in_page.py (+2/-2)
ubuntu_sso/qt/tests/test_current_user_sign_in_page.py (+5/-2)
ubuntu_sso/utils/ui.py (+1/-1)
To merge this branch: bzr merge lp:~mikemc/ubuntu-sso-client/re-re-format-register-link
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
dobey (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+125045@code.launchpad.net

Commit message

- Change register link format string to match translations and change code instead. (LP: #1052555)

Description of the change

- Change register link format string to match translations and change code instead. (LP: #1052555)

To post a comment you must log in.
1003. By Mike McCracken

mark as fixing bug 1052555

1004. By Mike McCracken

mark as fixing bug 1052607

Revision history for this message
Eric Casteleijn (thisfred) wrote :

looks good

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Brian Curtin (brian.curtin) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/current_user_sign_in_page.py'
2--- ubuntu_sso/qt/current_user_sign_in_page.py 2012-09-05 17:33:41 +0000
3+++ ubuntu_sso/qt/current_user_sign_in_page.py 2012-09-18 20:51:30 +0000
4@@ -120,8 +120,8 @@
5 forgotten_text = LINK_STYLE.format(link_url='#',
6 link_text=FORGOTTEN_PASSWORD_BUTTON)
7 self.ui.forgot_password_label.setText(forgotten_text)
8- account_text = LINK_STYLE.format(link_url='#',
9- link_text=CREATE_ACCOUNT_LABEL % {'app_name': self.app_name})
10+ link_text = CREATE_ACCOUNT_LABEL.format(app_name=self.app_name)
11+ account_text = LINK_STYLE.format(link_url='#', link_text=link_text)
12 self.ui.create_account_label.setText(account_text)
13 self.ui.sign_in_button.setText(SIGN_IN_BUTTON)
14
15
16=== modified file 'ubuntu_sso/qt/tests/test_current_user_sign_in_page.py'
17--- ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-09-06 14:27:32 +0000
18+++ ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-09-18 20:51:30 +0000
19@@ -82,13 +82,16 @@
20 def test_set_translated_strings(self):
21 """Test the translated string method."""
22 expected = gui.LOGIN_TITLE.format(app_name=self.app_name)
23+ self.assertTrue(self.app_name in expected)
24 self.assert_title_correct(expected)
25 expected = gui.LOGIN_SUBTITLE % dict(app_name=self.app_name)
26+ self.assertTrue(self.app_name in expected)
27 self.assert_subtitle_correct(expected)
28 self.assertEqual(compat.text_type(self.ui.ui.email_label.text()),
29 gui.EMAIL_LABEL)
30- expected = gui.LINK_STYLE.format(link_url='#',
31- link_text=gui.CREATE_ACCOUNT_LABEL % {'app_name': self.app_name})
32+ link_text = gui.CREATE_ACCOUNT_LABEL.format(app_name=self.app_name)
33+ expected = gui.LINK_STYLE.format(link_url='#', link_text=link_text)
34+ self.assertTrue(self.app_name in expected)
35 self.assertEqual(compat.text_type(
36 self.ui.ui.create_account_label.text()), expected)
37 self.assertEqual(compat.text_type(self.ui.ui.password_label.text()),
38
39=== modified file 'ubuntu_sso/utils/ui.py'
40--- ubuntu_sso/utils/ui.py 2012-09-18 18:59:06 +0000
41+++ ubuntu_sso/utils/ui.py 2012-09-18 20:51:30 +0000
42@@ -65,7 +65,7 @@
43 CONGRATULATIONS = _("Congratulations, {app_name} is installed!")
44 CONNECT_HELP_LABEL = _('To connect this computer to %(app_name)s enter your '
45 'details below.')
46-CREATE_ACCOUNT_LABEL = _('Register with %(app_name)s.')
47+CREATE_ACCOUNT_LABEL = _('Register with {app_name}.')
48 EMAIL_LABEL = EMAIL1_ENTRY = _('Email address')
49 EMAIL2_ENTRY = _('Re-type Email address')
50 EMAIL_INVALID = _('The email must be a valid email address.')

Subscribers

People subscribed via source and target branches