use env for localization to avoid db round trip
This commit is contained in:
parent
cd4ad6878c
commit
b87a691176
3 changed files with 4 additions and 2 deletions
|
@ -309,7 +309,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def set_locale
|
||||
if feature_enabled?(:localization)
|
||||
if ENV.fetch('LOCALIZATION_ENABLED', 'false') == 'true'
|
||||
I18n.locale = http_accept_language.compatible_language_from(I18n.available_locales)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -69,3 +69,6 @@ DS_ENV="staging"
|
|||
|
||||
# Active le mode maintenance
|
||||
# MAINTENANCE_MODE="true"
|
||||
|
||||
# Active la localisation
|
||||
# LOCALIZATION_ENABLED="true"
|
||||
|
|
|
@ -32,7 +32,6 @@ features = [
|
|||
:expert_not_allowed_to_invite,
|
||||
:hide_instructeur_email,
|
||||
:instructeur_bypass_email_login_token,
|
||||
:localization,
|
||||
:make_experts_notifiable,
|
||||
:procedure_routage_api
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue