Browse Source

Update devise translation strings (#461)

pull/465/head
baarkerlounger 3 years ago committed by GitHub
parent
commit
8ecb3844f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 78
      config/locales/devise.en.yml
  2. 2
      spec/requests/auth/passwords_controller_spec.rb
  3. 2
      spec/requests/users_controller_spec.rb

78
config/locales/devise.en.yml

@ -3,19 +3,19 @@
en: en:
devise: devise:
confirmations: confirmations:
confirmed: "Your email address has been successfully confirmed." 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_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." 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: failure:
already_authenticated: "You are already signed in." already_authenticated: "You are already signed in"
inactive: "Your account has not been activated yet." inactive: "Your account has not been activated yet"
invalid: "Incorrect %{authentication_keys} email or password." invalid: "Incorrect %{authentication_keys} email or password"
locked: "Your account has been locked." locked: "Your account has been locked."
last_attempt: "You have one more attempt before your account is locked." last_attempt: "You have one more attempt before your account is locked"
not_found_in_database: "Incorrect %{authentication_keys} email or password." not_found_in_database: "Incorrect %{authentication_keys} email or password"
timeout: "Your session expired. Please sign in again to continue." timeout: "Your session expired. Sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing." unauthenticated: "You need to sign in or sign up before continuing"
unconfirmed: "You must confirm your email address before continuing." unconfirmed: "You must confirm your email address before continuing"
mailer: mailer:
confirmation_instructions: confirmation_instructions:
subject: "Confirmation instructions" subject: "Confirmation instructions"
@ -24,43 +24,43 @@ en:
unlock_instructions: unlock_instructions:
subject: "Unlock instructions" subject: "Unlock instructions"
email_changed: email_changed:
subject: "Email Changed" subject: "Email successfully changed"
password_change: password_change:
subject: "Password Changed" subject: "Password successfully changed"
omniauth_callbacks: omniauth_callbacks:
failure: "Could not authenticate you from %{kind} because \"%{reason}\"." failure: "We could not authenticate you from %{kind} because \"%{reason}\""
success: "Successfully authenticated from %{kind} account." success: "Successfully authenticated from %{kind} account"
passwords: 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." 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 with instructions on how to reset your password in a few minutes." 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 a password recovery link at your email address in a few minutes." 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 changed successfully. You are now signed in." updated: "Your password has been successfully changed. You are now signed in."
updated_2FA: "Your password has been changed successfully. Your security code has been sent." updated_2FA: "Your password has been successfully changed. We’ve sent you a security code."
updated_not_active: "Your password has been changed successfully." updated_not_active: "Your password has been successfully changed"
registrations: registrations:
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon." destroyed: "Your account has been successfully cancelled"
signed_up: "Welcome! You have signed up successfully." signed_up: "You have successfully signed up for an account"
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_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 signed up successfully. However, we could not sign you in because your account is locked." 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: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." 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 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." 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 updated successfully." updated: "Your account has been successfully updated"
updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again." updated_but_not_signed_in: "Your account has been successfully updated. You’ll need to sign in again."
sessions: sessions:
signed_in: "" signed_in: ""
signed_out: "" signed_out: ""
already_signed_out: "" already_signed_out: ""
unlocks: unlocks:
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes." 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 with instructions for how to unlock it in a few minutes." 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 unlocked successfully. Please sign in to continue." unlocked: "Your account has been successfully unlocked. Sign in to continue."
errors: errors:
messages: messages:
already_confirmed: "was already confirmed, please try signing in" already_confirmed: "has already been confirmed. Sign in."
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" confirmation_period_expired: "needs to be confirmed within %{period}. Request a new account."
expired: "has expired, please request a new one" expired: "has expired. Request a new token."
not_found: "not found" not_found: "was not found"
not_locked: "was not locked" not_locked: "has not been locked"
not_saved: not_saved:
one: "1 error prohibited this %{resource} from being saved:" one: "One error stopped this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:" other: "%{count} errors stopped this %{resource} from being saved:"

2
spec/requests/auth/passwords_controller_spec.rb

@ -56,7 +56,7 @@ RSpec.describe Auth::PasswordsController, type: :request do
}, },
} }
end 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 it "changes the password" do
expect { put "/account/password", params: update_password_params } expect { put "/account/password", params: update_password_params }

2
spec/requests/users_controller_spec.rb

@ -95,7 +95,7 @@ RSpec.describe UsersController, type: :request do
it "shows an error" do it "shows an error" do
expect(response).to have_http_status(:unprocessable_entity) expect(response).to have_http_status(:unprocessable_entity)
expect(page).to have_selector("#error-summary-title") 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 end
end end

Loading…
Cancel
Save