diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index cd795ad..9538016 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -1,25 +1,23 @@ -<%- if controller_name != 'sessions' %> - <%= link_to "Log in", new_session_path(resource_name) %>
-<% end -%> +<% if controller_name != "sessions" %> + <%= link_to t("link.log_in"), new_session_path(resource_name) %>
+<% end %> -<%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%= link_to "Sign up", new_registration_path(resource_name) %>
-<% end -%> +<% if devise_mapping.registerable? && controller_name != "registrations" %> + <%= link_to t("link.sign_up"), new_registration_path(resource_name) %>
+<% end %> -<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> - <%= link_to "Forgot your password?", new_password_path(resource_name) %>
-<% end -%> +<% if devise_mapping.recoverable? && + controller_name != "passwords" && + controller_name != "registrations" %> + <%= link_to t("link.for_got_pass"), new_password_path(resource_name) %>
+<% end %> -<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> - <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
-<% end -%> +<% if devise_mapping.confirmable? && controller_name != "confirmations" %> + <%= link_to t("link.for_got_pass"), new_confirmation_path(resource_name) %>
+<% end %> -<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> - <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
-<% end -%> - -<%- if devise_mapping.omniauthable? %> - <%- resource_class.omniauth_providers.each do |provider| %> - <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
- <% end -%> -<% end -%> +<% if devise_mapping.lockable? && + resource_class.unlock_strategy_enabled?(:email) && + controller_name != "unlocks" %> + <%= link_to t("link.confirm_unlock"), new_unlock_path(resource_name) %>
+<% end %> diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 26a10f2..ab66cf8 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -58,3 +58,9 @@ en: not_saved: one: "1 error prohibited this %{resource} from being saved:" other: "%{count} errors prohibited this %{resource} from being saved:" + link: + log_in: "Log in" + sign_up: "Sign up" + for_got_pass: "Forgot your password?" + confirm_instructions: "Didn't receive confirmation instructions?" + confirm_unlock: "Didn't receive unlock instructions?"