From 8b517ea5ac6301bd513c18632aa34ce91545dd95 Mon Sep 17 00:00:00 2001 From: David Gay Date: Sun, 25 Apr 2021 13:07:25 -0400 Subject: Adjust devise routes, views, and language --- config/locales/devise.en.yml | 26 +++++++++++++------------- config/routes.rb | 5 +++++ 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'config') diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index ab1f070..8fc2e77 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -7,14 +7,14 @@ en: 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." + already_authenticated: "You are already logged in." inactive: "Your account is not activated yet." invalid: "Invalid %{authentication_keys} or password." locked: "Your account is locked." last_attempt: "You have one more attempt before your account is locked." not_found_in_database: "Invalid %{authentication_keys} or password." - timeout: "Your session expired. Please sign in again to continue." - unauthenticated: "You need to sign in or sign up before continuing." + timeout: "Your session expired. Please log in again to continue." + unauthenticated: "You need to log in or register before continuing." unconfirmed: "You have to confirm your email address before continuing." mailer: confirmation_instructions: @@ -34,28 +34,28 @@ 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 has been changed successfully. You are now signed in." + updated: "Your password has been changed successfully. You are now logged in." updated_not_active: "Your password has been changed successfully." 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: "Welcome! You have registered successfully." + signed_up_but_inactive: "You have registered successfully. However, we could not log you in because your account is not yet activated." + signed_up_but_locked: "You have registered successfully. However, we could not log 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" + updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to log in again" sessions: - signed_in: "Signed in successfully." - signed_out: "Signed out successfully." - already_signed_out: "Signed out successfully." + signed_in: "Logged in successfully." + signed_out: "Logged out successfully." + already_signed_out: "Logged out successfully." 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." + unlocked: "Your account has been unlocked successfully. Please log in to continue." errors: messages: - already_confirmed: "was already confirmed, please try signing in" + already_confirmed: "was already confirmed, please try logging 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" diff --git a/config/routes.rb b/config/routes.rb index 5f90ff3..6754031 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,5 +4,10 @@ Rails.application.routes.draw do get "logout", to: "devise/sessions#destroy" end devise_for :users, skip: [:registrations] + as :user do + get "users/edit", to: "devise/registrations#edit", as: "edit_user_registration" + put "users", to: "devise/registrations#update", as: "user_registration" + end + root to: "home#index", as: :home_index end -- cgit v1.2.3