Merge lp:~diegosarmentero/ubuntu-sso-client/forgotten-link into lp:ubuntu-sso-client

Proposed by Diego Sarmentero
Status: Merged
Approved by: Natalia Bidart
Approved revision: 903
Merged at revision: 906
Proposed branch: lp:~diegosarmentero/ubuntu-sso-client/forgotten-link
Merge into: lp:ubuntu-sso-client
Diff against target: 33 lines (+11/-1)
2 files modified
ubuntu_sso/qt/__init__.py (+1/-1)
ubuntu_sso/qt/tests/test_current_user_sign_in_page.py (+10/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntu-sso-client/forgotten-link
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+96814@code.launchpad.net

Commit message

- Making LINK_STYLE to be unicode (LP: #950953).

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks great! Thanks for catching this :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntu_sso/qt/__init__.py'
--- ubuntu_sso/qt/__init__.py 2012-03-05 18:56:50 +0000
+++ ubuntu_sso/qt/__init__.py 2012-03-09 19:08:35 +0000
@@ -19,7 +19,7 @@
19import collections19import collections
2020
2121
22LINK_STYLE = ('<a href="{link_url}">'22LINK_STYLE = (u'<a href="{link_url}">'
23 '<span style="color:#df2d1f;">{link_text}</span></a>')23 '<span style="color:#df2d1f;">{link_text}</span></a>')
24ERROR_ALL = '__all__'24ERROR_ALL = '__all__'
25ERROR_STYLE = u'<font color="#df2d1f"><b>%s</b></font>'25ERROR_STYLE = u'<font color="#df2d1f"><b>%s</b></font>'
2626
=== modified file 'ubuntu_sso/qt/tests/test_current_user_sign_in_page.py'
--- ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-05 21:08:40 +0000
+++ ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-09 19:08:35 +0000
@@ -52,6 +52,16 @@
52 self.assertTrue(button.properties['default'])52 self.assertTrue(button.properties['default'])
53 self.assertFalse(button.isEnabled())53 self.assertFalse(button.isEnabled())
5454
55 def test_unicode_in_forgotten_password_link(self):
56 """Ensure that this label supports unicode."""
57 forgot_fr = u"J'ai oublié mon mot de passe"
58 self.patch(gui, "FORGOTTEN_PASSWORD_BUTTON", forgot_fr)
59 forgotten_text = gui.LINK_STYLE.format(link_url='#',
60 link_text=forgot_fr)
61 self.ui._set_translated_strings()
62 self.assertEqual(unicode(self.ui.ui.forgot_password_label.text()),
63 forgotten_text)
64
55 def test_set_translated_strings(self):65 def test_set_translated_strings(self):
56 """Test the translated string method."""66 """Test the translated string method."""
57 expected = gui.LOGIN_TITLE.format(app_name=self.app_name)67 expected = gui.LOGIN_TITLE.format(app_name=self.app_name)

Subscribers

People subscribed via source and target branches