Permalink
Browse files

Rename i18n keys for password email

* Take off _paragraph prefix because text does not contian <p> tags
* Change password text copy to be more clear.
* Sort i18n keys alphabetically.
* Resolves #248
  • Loading branch information...
1 parent 5cde76b commit 68d77d1b6bee52d17c4df005ea7722255b1e7bb0 @gylaz gylaz committed with croaky Feb 24, 2013
@@ -1,5 +1,5 @@
-<%= t('.introduction_paragraph') %>
+<%= t('.opening') %>
<%= edit_user_password_url(@user, :token => @user.confirmation_token.html_safe) %>
-<%= t('.ending_paragraph') %>
+<%= t('.closing') %>
@@ -1,4 +1,12 @@
en:
+ clearance_mailer:
+ change_password:
+ opening:
+ 'Someone, hopefully you, requested we send you a link to change your
+ password:'
+ closing:
+ "If you didn't request this, ignore this email. Your password has not
+ been changed."
flashes:
failure_when_forbidden:
'Please double check the URL or try submitting the form again.'
@@ -40,33 +48,25 @@ en:
'You will receive an email within the next few minutes.
It contains instructions for changing your password.'
edit:
- title:
- 'Change your password'
description:
'Your password has been reset. Choose a new password below.'
- new:
title:
- 'Reset your password'
+ 'Change your password'
+ new:
description:
'To be emailed a link to reset your password, please enter your email
address.'
+ title:
+ 'Reset your password'
sessions:
new:
- title:
- 'Sign in'
- sign_up:
- 'Sign up'
forgot_password:
'Forgot password?'
+ sign_up:
+ 'Sign up'
+ title:
+ 'Sign in'
users:
new:
sign_in:
'Sign in'
- clearance_mailer:
- change_password:
- beginning_paragraph:
- 'Someone, hopefully you, requested we send you a link to change your
- password:'
- ending_paragraph:
- "If you didn't request this, ignore this email. Your password hasn't
- been changed."
@@ -21,7 +21,15 @@
@email.body.to_s.should =~ regexp
end
- it 'should set its subject' do
+ it 'sets its subject' do
@email.subject.should =~ /Change your password/
end
+
+ it 'contains opening text in the body' do
+ @email.body.should =~ /a link to change your password/
+ end
+
+ it 'contains closing text in the body' do
+ @email.body.should =~ /Your password has not been changed/
+ end
end

0 comments on commit 68d77d1

Please sign in to comment.