Merge lp:~chipaca/ubuntu-sso-client/label-fixes into lp:ubuntu-sso-client

Proposed by John Lenton
Status: Merged
Approved by: Natalia Bidart
Approved revision: 591
Merged at revision: 595
Proposed branch: lp:~chipaca/ubuntu-sso-client/label-fixes
Merge into: lp:ubuntu-sso-client
Diff against target: 151 lines (+21/-35)
4 files modified
data/ui.glade (+1/-10)
setup.py (+1/-1)
ubuntu_sso/gui.py (+14/-14)
ubuntu_sso/tests/test_gui.py (+5/-10)
To merge this branch: bzr merge lp:~chipaca/ubuntu-sso-client/label-fixes
Reviewer Review Type Date Requested Status
Vincenzo Di Somma (community) Approve
Rodrigo Moya (community) Approve
Review via email: mp+33722@code.launchpad.net

Commit message

* changed the "reset password" header and help text (LP: #622991).
* changed the "verify" header and help text, and removed the email image (LP: #622988, LP: #622830).

Description of the change

* changed the "reset password" header and help text (LP: #622991).
* changed the "verify" header and help text, and removed the email image (LP: #622988, LP: #622830)

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) :
review: Approve
Revision history for this message
Vincenzo Di Somma (vds) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'data/email.png'
2Binary files data/email.png 2010-08-11 18:54:19 +0000 and data/email.png 1970-01-01 00:00:00 +0000 differ
3=== modified file 'data/ui.glade'
4--- data/ui.glade 2010-08-26 00:17:44 +0000
5+++ data/ui.glade 2010-08-26 00:25:57 +0000
6@@ -285,15 +285,6 @@
7 <property name="visible">True</property>
8 <property name="spacing">10</property>
9 <child>
10- <object class="GtkImage" id="verify_email_image">
11- <property name="visible">True</property>
12- <property name="stock">gtk-missing-image</property>
13- </object>
14- <packing>
15- <property name="position">0</property>
16- </packing>
17- </child>
18- <child>
19 <placeholder/>
20 </child>
21 <child>
22@@ -319,7 +310,7 @@
23 </object>
24 <packing>
25 <property name="expand">False</property>
26- <property name="position">2</property>
27+ <property name="position">1</property>
28 </packing>
29 </child>
30 </object>
31
32=== modified file 'setup.py'
33--- setup.py 2010-08-24 15:32:54 +0000
34+++ setup.py 2010-08-26 00:25:57 +0000
35@@ -93,7 +93,7 @@
36 data_files=[
37 ('share/dbus-1/services', ['data/com.ubuntu.sso.service',]),
38 ('lib/ubuntu-sso-client', ['bin/ubuntu-sso-login',]),
39- ('share/ubuntu-sso-client/data', ['data/ui.glade', 'data/email.png',]),
40+ ('share/ubuntu-sso-client/data', ['data/ui.glade',]),
41 ('/etc/xdg/ubuntu-sso/', ['data/oauth_urls',]),
42 ('/etc/xdg/ubuntu-sso/oauth_registration.d',
43 ['data/oauth_registration.d/ubuntuone',]),
44
45=== modified file 'ubuntu_sso/gui.py'
46--- ubuntu_sso/gui.py 2010-08-25 23:43:03 +0000
47+++ ubuntu_sso/gui.py 2010-08-26 00:25:57 +0000
48@@ -209,9 +209,9 @@
49 PASSWORD_MISMATCH = _('The passwords don\'t match, please double check ' \
50 'and try entering them again.')
51 PASSWORD_TOO_WEAK = _('The password is too weak.')
52- REQUEST_PASSWORD_TOKEN_LABEL = _('To reset your password enter your ' \
53- 'email address below:')
54- RESET_PASSWORD = _('Reset Password')
55+ REQUEST_PASSWORD_TOKEN_LABEL = _('To reset your %(app_name)s password,'
56+ ' enter your email address below:')
57+ RESET_PASSWORD = _('Reset password')
58 RESET_CODE_ENTRY = _('Reset code')
59 RESET_EMAIL_ENTRY = _('Email address')
60 SET_NEW_PASSWORD_LABEL = _('A password reset code has been sent to ' \
61@@ -223,10 +223,12 @@
62 'required to subscribe.')
63 UNKNOWN_ERROR = _('There was an error when trying to complete the ' \
64 'process. Please check the information and try again.')
65- VERIFY_EMAIL_LABEL = _('Enter verification code.\n\nA verification code ' \
66- 'has just been sent to your email address.\n' \
67- 'Please enter your code from the email. ' \
68- 'An example is shown below.')
69+ VERIFY_EMAIL_LABEL = ('<b>%s</b>\n\n' % _('Enter verification code') +
70+ _('Check %(email)s for an email from'
71+ ' Ubuntu Single Sign On.'
72+ ' This message contains a verification code.'
73+ ' Enter the code in the field below and click OK'
74+ ' to complete creating your %(app_name)s account'))
75 YES_TO_TC = _('I agree with the %(app_name)s ') # Terms&Conditions button
76 YES_TO_UPDATES = _('Yes! Email me %(app_name)s tips and updates.')
77
78@@ -524,13 +526,8 @@
79
80 def _build_verify_email_page(self):
81 """Build the verify email page."""
82- self.verify_email_vbox.help_text = self.VERIFY_EMAIL_LABEL
83 self.verify_email_vbox.pack_start(self.email_token_entry, expand=False)
84- self.verify_email_vbox.reorder_child(self.email_token_entry, 1)
85-
86- fname = get_data_file('email.png')
87- self._email_example_pixbuf = gtk.gdk.pixbuf_new_from_file(fname)
88- self.verify_email_image.set_from_pixbuf(self._email_example_pixbuf)
89+ self.verify_email_vbox.reorder_child(self.email_token_entry, 0)
90
91 return self.verify_email_vbox
92
93@@ -561,7 +558,7 @@
94 def _build_request_password_token_page(self):
95 """Build the login page."""
96 self.request_password_token_vbox.header = self.RESET_PASSWORD
97- text = self.REQUEST_PASSWORD_TOKEN_LABEL
98+ text = self.REQUEST_PASSWORD_TOKEN_LABEL % {'app_name': self.app_label}
99 self.request_password_token_vbox.help_text = text
100
101 entry = self.reset_email_entry
102@@ -845,6 +842,9 @@
103 @log_call
104 def on_user_registered(self, app_name, email, *args, **kwargs):
105 """Registration can go on, user needs to verify email."""
106+ help_text = self.VERIFY_EMAIL_LABEL % {'app_name': self.app_name,
107+ 'email': email}
108+ self.verify_email_vbox.help_text = help_text
109 self._set_current_page(self.verify_email_vbox)
110
111 @log_call
112
113=== modified file 'ubuntu_sso/tests/test_gui.py'
114--- ubuntu_sso/tests/test_gui.py 2010-08-26 00:17:44 +0000
115+++ ubuntu_sso/tests/test_gui.py 2010-08-26 00:25:57 +0000
116@@ -854,12 +854,6 @@
117 self.ui.on_user_registered(app_name=APP_NAME, email=EMAIL)
118 self.click_verify_email_with_valid_data()
119
120- def test_verify_email_image_is_correct(self):
121- """The email-example image is shown."""
122- pixbuf = self.ui.verify_email_image.get_pixbuf()
123- self.assertTrue(pixbuf is not None)
124- self.assertEqual(self.ui._email_example_pixbuf, pixbuf)
125-
126 def test_registration_successful_shows_verify_email_vbox(self):
127 """Receiving 'registration_successful' shows the verify email vbox."""
128 self.ui.on_user_registered(app_name=APP_NAME, email=EMAIL)
129@@ -868,8 +862,9 @@
130 def test_help_label_display_correct_wording(self):
131 """The help_label display VERIFY_EMAIL_LABEL."""
132 msg = 'help_label must read "%s" (got "%s" instead).'
133- actual = self.ui.help_label.get_text()
134- expected = self.ui.VERIFY_EMAIL_LABEL
135+ actual = self.ui.help_label.get_label()
136+ expected = self.ui.VERIFY_EMAIL_LABEL % {'app_name': APP_NAME,
137+ 'email': EMAIL}
138 self.assertEqual(expected, actual, msg % (expected, actual))
139
140 def test_on_verify_token_button_clicked_calls_validate_email(self):
141@@ -1214,8 +1209,8 @@
142
143 def test_on_forgotten_password_button_clicked_help_text(self):
144 """Clicking forgotten_password_button the help is properly changed."""
145- self.assertEqual(self.ui.help_label.get_text(),
146- self.ui.REQUEST_PASSWORD_TOKEN_LABEL)
147+ wanted = self.ui.REQUEST_PASSWORD_TOKEN_LABEL % {'app_name': APP_NAME}
148+ self.assertEqual(self.ui.help_label.get_text(), wanted)
149
150 def test_on_forgotten_password_button_clicked_header_label(self):
151 """Clicking forgotten_password_button the title is properly changed."""

Subscribers

People subscribed via source and target branches