mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #2906 from p-originate/master
Grammar/content fixes for email confirmation language
This commit is contained in:
commit
59cd0cc240
7 changed files with 42 additions and 42 deletions
|
@ -3,26 +3,26 @@
|
|||
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 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."
|
||||
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"
|
||||
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."
|
||||
|
@ -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:
|
||||
|
|
|
@ -215,7 +215,7 @@ class FailureTest < ActiveSupport::TestCase
|
|||
}
|
||||
call_failure(env)
|
||||
assert @response.third.body.include?('<h2>Sign in</h2>')
|
||||
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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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 "<error>Invalid email or password.</error>", response.body
|
||||
assert_match "<error>Invalid email address or password.</error>", response.body
|
||||
end
|
||||
|
||||
test 'returns a custom response with www-authenticate and chosen realm' do
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue