From 00af1481f8716b08e5f1c053a4105b2427ba9dcb Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 28 Feb 2014 02:03:37 -0500 Subject: [PATCH 1/4] Grammar/content fixes for email confirmation language - account -> email address - was -> has been --- config/locales/en.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index abccdb08..2433048b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,19 +3,19 @@ en: devise: confirmations: - confirmed: "Your account was successfully confirmed." - send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." - send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." + confirmed: "Your email address has been successfully confirmed." + send_instructions: "You will receive an email with instructions about how to confirm your email address in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your email address in a few minutes." failure: already_authenticated: "You are already signed in." inactive: "Your account is not activated yet." invalid: "Invalid email or password." locked: "Your account is locked." - last_attempt: "You have one more attempt before your account will be locked." - not_found_in_database: "Invalid email or password." + last_attempt: "You have one more attempt before your account is locked." + not_found_in_database: "Invalid email address or password." timeout: "Your session expired. Please sign in again to continue." unauthenticated: "You need to sign in or sign up before continuing." - unconfirmed: "You have to confirm your account before continuing." + unconfirmed: "You have to confirm your email address before continuing." mailer: confirmation_instructions: subject: "Confirmation instructions" @@ -30,22 +30,22 @@ en: no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes." send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." - updated: "Your password was changed successfully. You are now signed in." - updated_not_active: "Your password was changed successfully." + updated: "Your password has been changed successfully. You are now signed in." + updated_not_active: "Your password has been changed successfully." registrations: - destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon." + destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon." signed_up: "Welcome! You have signed up successfully." signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." - signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account." - update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." - updated: "You updated your account successfully." + signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address." + updated: "Your account has been updated successfully." sessions: signed_in: "Signed in successfully." signed_out: "Signed out successfully." unlocks: - send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes." - send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes." + send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." unlocked: "Your account has been unlocked successfully. Please sign in to continue." errors: messages: From 1a87fd6477b7070c46a58648dba426715ad48e9f Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 28 Feb 2014 02:04:35 -0500 Subject: [PATCH 2/4] All other text does not use camel case --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 2433048b..023033b6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -22,7 +22,7 @@ en: reset_password_instructions: subject: "Reset password instructions" unlock_instructions: - subject: "Unlock Instructions" + subject: "Unlock instructions" omniauth_callbacks: failure: "Could not authenticate you from %{kind} because \"%{reason}\"." success: "Successfully authenticated from %{kind} account." From dbddce6acd8e1324dc44262c39b8e1396bd636a6 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 28 Feb 2014 15:12:07 -0500 Subject: [PATCH 3/4] Missed some "instructions about" -> for --- config/locales/en.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 023033b6..54e936ba 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -4,8 +4,8 @@ en: devise: confirmations: confirmed: "Your email address has been successfully confirmed." - send_instructions: "You will receive an email with instructions about how to confirm your email address in a few minutes." - send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your email address in a few minutes." + send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes." + send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes." failure: already_authenticated: "You are already signed in." inactive: "Your account is not activated yet." From 47845e44a2f085cfb360c9270e85647a5cb59d40 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 28 Feb 2014 15:18:22 -0500 Subject: [PATCH 4/4] Chase language changes in tests --- test/failure_app_test.rb | 2 +- test/integration/confirmable_test.rb | 18 +++++++++--------- test/integration/http_authenticatable_test.rb | 2 +- test/integration/lockable_test.rb | 8 ++++---- test/integration/recoverable_test.rb | 10 +++++----- test/integration/registerable_test.rb | 14 +++++++------- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/test/failure_app_test.rb b/test/failure_app_test.rb index a057b1da..bbf08d0e 100644 --- a/test/failure_app_test.rb +++ b/test/failure_app_test.rb @@ -215,7 +215,7 @@ class FailureTest < ActiveSupport::TestCase } call_failure(env) assert @response.third.body.include?('

Sign in

') - assert @response.third.body.include?('You have to confirm your account before continuing.') + assert @response.third.body.include?('You have to confirm your email address before continuing.') end test 'calls the original controller if inactive account' do diff --git a/test/integration/confirmable_test.rb b/test/integration/confirmable_test.rb index 510bf12b..2652c89a 100644 --- a/test/integration/confirmable_test.rb +++ b/test/integration/confirmable_test.rb @@ -21,7 +21,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest resend_confirmation assert_current_url '/users/sign_in' - assert_contain 'You will receive an email with instructions about how to confirm your account in a few minutes' + assert_contain 'You will receive an email with instructions for how to confirm your email address in a few minutes' assert_equal 1, ActionMailer::Base.deliveries.size assert_equal ['please-change-me@config-initializers-devise.com'], ActionMailer::Base.deliveries.first.from end @@ -56,7 +56,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest assert_not user.confirmed? visit_user_confirmation_with_token(user.raw_confirmation_token) - assert_contain 'Your account was successfully confirmed.' + assert_contain 'Your email address has been successfully confirmed.' assert_current_url '/users/sign_in' assert user.reload.confirmed? end @@ -98,7 +98,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest swap Devise, allow_unconfirmed_access_for: 0.days do sign_in_as_user(confirm: false) - assert_contain 'You have to confirm your account before continuing' + assert_contain 'You have to confirm your email address before continuing' assert_not warden.authenticated?(:user) end end @@ -128,7 +128,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest user = sign_in_as_user(confirm: false) visit_user_confirmation_with_token(user.raw_confirmation_token) - assert_contain 'Your account was successfully confirmed.' + assert_contain 'Your email address has been successfully confirmed.' assert_current_url '/' end end @@ -187,7 +187,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest fill_in 'email', with: user.email click_button 'Resend confirmation instructions' - assert_contain "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." + assert_contain "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes." assert_current_url "/users/sign_in" end end @@ -203,7 +203,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest assert_not_contain "1 error prohibited this user from being saved:" assert_not_contain "Email not found" - assert_contain "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." + assert_contain "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes." assert_current_url "/users/sign_in" end end @@ -232,7 +232,7 @@ class ConfirmationOnChangeTest < ActionDispatch::IntegrationTest end assert_current_url '/admin_area/sign_in' - assert_contain 'You will receive an email with instructions about how to confirm your account in a few minutes' + assert_contain 'You will receive an email with instructions for how to confirm your email address in a few minutes' end test 'admin with valid confirmation token should be able to confirm email after email changed' do @@ -241,7 +241,7 @@ class ConfirmationOnChangeTest < ActionDispatch::IntegrationTest assert_equal 'new_test@example.com', admin.unconfirmed_email visit_admin_confirmation_with_token(admin.raw_confirmation_token) - assert_contain 'Your account was successfully confirmed.' + assert_contain 'Your email address has been successfully confirmed.' assert_current_url '/admin_area/sign_in' assert admin.reload.confirmed? assert_not admin.reload.pending_reconfirmation? @@ -263,7 +263,7 @@ class ConfirmationOnChangeTest < ActionDispatch::IntegrationTest assert_contain(/Confirmation token(.*)invalid/) visit_admin_confirmation_with_token(admin.raw_confirmation_token) - assert_contain 'Your account was successfully confirmed.' + assert_contain 'Your email address has been successfully confirmed.' assert_current_url '/admin_area/sign_in' assert admin.reload.confirmed? assert_not admin.reload.pending_reconfirmation? diff --git a/test/integration/http_authenticatable_test.rb b/test/integration/http_authenticatable_test.rb index aad51f62..b7e770e1 100644 --- a/test/integration/http_authenticatable_test.rb +++ b/test/integration/http_authenticatable_test.rb @@ -42,7 +42,7 @@ class HttpAuthenticationTest < ActionDispatch::IntegrationTest sign_in_as_new_user_with_http("unknown") assert_equal 401, status assert_equal "application/xml; charset=utf-8", headers["Content-Type"] - assert_match "Invalid email or password.", response.body + assert_match "Invalid email address or password.", response.body end test 'returns a custom response with www-authenticate and chosen realm' do diff --git a/test/integration/lockable_test.rb b/test/integration/lockable_test.rb index 5fad5d3d..813135e6 100644 --- a/test/integration/lockable_test.rb +++ b/test/integration/lockable_test.rb @@ -22,7 +22,7 @@ class LockTest < ActionDispatch::IntegrationTest send_unlock_request assert_template 'sessions/new' - assert_contain 'You will receive an email with instructions about how to unlock your account in a few minutes' + assert_contain 'You will receive an email with instructions for how to unlock your account in a few minutes' mail = ActionMailer::Base.deliveries.last assert_equal 1, ActionMailer::Base.deliveries.size @@ -182,7 +182,7 @@ class LockTest < ActionDispatch::IntegrationTest click_button 'Resend unlock instructions' assert_current_url "/users/sign_in" - assert_contain "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + assert_contain "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." end end @@ -197,7 +197,7 @@ class LockTest < ActionDispatch::IntegrationTest click_button 'Resend unlock instructions' assert_current_url "/users/sign_in" - assert_contain "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + assert_contain "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." end end @@ -213,7 +213,7 @@ class LockTest < ActionDispatch::IntegrationTest assert_not_contain "Email not found" assert_current_url "/users/sign_in" - assert_contain "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes." + assert_contain "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." end end diff --git a/test/integration/recoverable_test.rb b/test/integration/recoverable_test.rb index 0bd5019c..004748ef 100644 --- a/test/integration/recoverable_test.rb +++ b/test/integration/recoverable_test.rb @@ -171,7 +171,7 @@ class PasswordTest < ActionDispatch::IntegrationTest reset_password assert_current_url '/' - assert_contain 'Your password was changed successfully. You are now signed in.' + assert_contain 'Your password has been changed successfully. You are now signed in.' assert user.reload.valid_password?('987654321') end @@ -185,7 +185,7 @@ class PasswordTest < ActionDispatch::IntegrationTest assert_not user.reload.valid_password?('987654321') reset_password visit: false - assert_contain 'Your password was changed successfully.' + assert_contain 'Your password has been changed successfully.' assert user.reload.valid_password?('987654321') end @@ -204,7 +204,7 @@ class PasswordTest < ActionDispatch::IntegrationTest request_forgot_password reset_password - assert_contain 'Your password was changed successfully.' + assert_contain 'Your password has been changed successfully.' assert_not_contain 'You are now signed in.' assert_equal new_user_session_path, @request.path assert !warden.authenticated?(:user) @@ -218,7 +218,7 @@ class PasswordTest < ActionDispatch::IntegrationTest request_forgot_password reset_password - assert_contain 'Your password was changed successfully.' + assert_contain 'Your password has been changed successfully.' assert !user.reload.access_locked? assert warden.authenticated?(:user) end @@ -230,7 +230,7 @@ class PasswordTest < ActionDispatch::IntegrationTest request_forgot_password reset_password - assert_contain 'Your password was changed successfully.' + assert_contain 'Your password has been changed successfully.' assert !user.reload.access_locked? assert warden.authenticated?(:user) end diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index ff3a1728..221a0d8b 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -50,7 +50,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest test 'a guest user should be able to sign up successfully and be blocked by confirmation' do user_sign_up - assert_contain 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' + assert_contain 'A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.' assert_not_contain 'You have to confirm your account before continuing' assert_current_url "/" @@ -149,7 +149,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest click_button 'Update' assert_current_url '/' - assert_contain 'You updated your account successfully.' + assert_contain 'Your account has been updated successfully.' assert_equal "user.new@example.com", User.first.email end @@ -163,7 +163,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest fill_in 'current password', with: '12345678' click_button 'Update' - assert_contain 'You updated your account successfully.' + assert_contain 'Your account has been updated successfully.' get users_path assert warden.authenticated?(:user) end @@ -193,7 +193,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest click_button 'Update' assert_current_url '/' - assert_contain 'You updated your account successfully.' + assert_contain 'Your account has been updated successfully.' assert User.first.valid_password?('pass1234') end @@ -217,7 +217,7 @@ class RegistrationTest < ActionDispatch::IntegrationTest get edit_user_registration_path click_button "Cancel my account" - assert_contain "Bye! Your account was successfully cancelled. We hope to see you again soon." + assert_contain "Bye! Your account has been successfully cancelled. We hope to see you again soon." assert User.all.empty? end @@ -321,7 +321,7 @@ class ReconfirmableRegistrationTest < ActionDispatch::IntegrationTest click_button 'Update' assert_current_url '/admin_area/home' - assert_contain 'You updated your account successfully.' + assert_contain 'Your account has been updated successfully.' assert Admin.first.valid_password?('pas123') end @@ -341,7 +341,7 @@ class ReconfirmableRegistrationTest < ActionDispatch::IntegrationTest click_button 'Update' assert_current_url '/admin_area/home' - assert_contain 'You updated your account successfully.' + assert_contain 'Your account has been updated successfully.' assert_equal "admin.new@example.com", Admin.first.unconfirmed_email assert Admin.first.valid_password?('pas123')