From 54dd4116310f0c31d616d1091834df02e768aba0 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 8 Apr 2022 16:30:23 +0100 Subject: [PATCH] Update devise translation strings --- config/locales/devise.en.yml | 78 +++++++++---------- .../auth/passwords_controller_spec.rb | 2 +- spec/requests/users_controller_spec.rb | 2 +- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 187bccb87..a41f253fa 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -3,19 +3,19 @@ en: devise: confirmations: - 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." + 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 in a few minutes with instructions for how to confirm your email address" failure: - already_authenticated: "You are already signed in." - inactive: "Your account has not been activated yet." - invalid: "Incorrect %{authentication_keys} email or password." + already_authenticated: "You are already signed in" + inactive: "Your account has not been activated yet" + invalid: "Incorrect %{authentication_keys} email or password" locked: "Your account has been locked." - last_attempt: "You have one more attempt before your account is locked." - not_found_in_database: "Incorrect %{authentication_keys} email 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 must confirm your email address before continuing." + last_attempt: "You have one more attempt before your account is locked" + not_found_in_database: "Incorrect %{authentication_keys} email or password" + timeout: "Your session expired. Sign in again to continue." + unauthenticated: "You need to sign in or sign up before continuing" + unconfirmed: "You must confirm your email address before continuing" mailer: confirmation_instructions: subject: "Confirmation instructions" @@ -24,43 +24,43 @@ en: unlock_instructions: subject: "Unlock instructions" email_changed: - subject: "Email Changed" + subject: "Email successfully changed" password_change: - subject: "Password Changed" + subject: "Password successfully changed" omniauth_callbacks: - failure: "Could not authenticate you from %{kind} because \"%{reason}\"." - success: "Successfully authenticated from %{kind} account." + failure: "We could not authenticate you from %{kind} because \"%{reason}\"" + success: "Successfully authenticated from %{kind} account" passwords: - 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 has been changed successfully. You are now signed in." - updated_2FA: "Your password has been changed successfully. Your security code has been sent." - updated_not_active: "Your password has been changed successfully." + no_token: "You can’t access this page unless you’re trying to reset your password. Check you’re using the correct URL in the email we sent you." + send_instructions: "You will receive an email in a few minutes with instructions on how to reset your password" + send_paranoid_instructions: "If your email address exists in our database, you will receive an email in the next few minutes with a link to recover your password" + updated: "Your password has been successfully changed. You are now signed in." + updated_2FA: "Your password has been successfully changed. We’ve sent you a security code." + updated_not_active: "Your password has been successfully changed" registrations: - 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 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 confirmation link to confirm your new email address." - updated: "Your account has been updated successfully." - updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again." + destroyed: "Your account has been successfully cancelled" + signed_up: "You have successfully signed up for an account" + signed_up_but_inactive: "You have successfully signed up for an account. You won’t be able to sign in until your account is activated." + signed_up_but_locked: "You have successfully signed up for an account. We could not sign you in because your account is locked." + signed_up_but_unconfirmed: "We’ve sent a confirmation link to your email address. Follow the link to activate your account." + update_needs_confirmation: "You successfully updated your account. We need to verify your new email address. Check your email and follow the confirmation link to confirm your new email address." + updated: "Your account has been successfully updated" + updated_but_not_signed_in: "Your account has been successfully updated. You’ll need to sign in again." sessions: signed_in: "" signed_out: "" already_signed_out: "" unlocks: - 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." + send_instructions: "You will receive an email in a few minutes with instructions for how to unlock your account" + send_paranoid_instructions: "If your account exists, you will receive an email in a few minutes with instructions for how to unlock it" + unlocked: "Your account has been successfully unlocked. Sign in to continue." errors: messages: - already_confirmed: "was already confirmed, please try signing in" - confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" - expired: "has expired, please request a new one" - not_found: "not found" - not_locked: "was not locked" + already_confirmed: "has already been confirmed. Sign in." + confirmation_period_expired: "needs to be confirmed within %{period}. Request a new account." + expired: "has expired. Request a new token." + not_found: "was not found" + not_locked: "has not been locked" not_saved: - one: "1 error prohibited this %{resource} from being saved:" - other: "%{count} errors prohibited this %{resource} from being saved:" + one: "One error stopped this %{resource} from being saved:" + other: "%{count} errors stopped this %{resource} from being saved:" diff --git a/spec/requests/auth/passwords_controller_spec.rb b/spec/requests/auth/passwords_controller_spec.rb index 1ba617598..0ec7a73c5 100644 --- a/spec/requests/auth/passwords_controller_spec.rb +++ b/spec/requests/auth/passwords_controller_spec.rb @@ -56,7 +56,7 @@ RSpec.describe Auth::PasswordsController, type: :request do }, } end - let(:message) { "Your password has been changed successfully. You are now signed in" } + let(:message) { I18n.t("devise.passwords.updated") } it "changes the password" do expect { put "/account/password", params: update_password_params } diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 34a2c9668..bef6baa13 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -95,7 +95,7 @@ RSpec.describe UsersController, type: :request do it "shows an error" do expect(response).to have_http_status(:unprocessable_entity) expect(page).to have_selector("#error-summary-title") - expect(page).to have_content("Reset password token has expired, please request a new one") + expect(page).to have_content(I18n.t("errors.messages.expired")) end end end