Fix not working I18n on 2FA and Sign in token page (#14087)
This commit is contained in:
parent
ac8a788370
commit
a279acc730
3 changed files with 12 additions and 8 deletions
|
@ -7,8 +7,6 @@ module Localized
|
|||
around_action :set_locale
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_locale
|
||||
locale = current_user.locale if respond_to?(:user_signed_in?) && user_signed_in?
|
||||
locale ||= session[:locale] ||= default_locale
|
||||
|
@ -19,6 +17,8 @@ module Localized
|
|||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def default_locale
|
||||
if ENV['DEFAULT_LOCALE'].present?
|
||||
I18n.default_locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue