From ad59019748f96d85aca00a42ec2d99a619101765 Mon Sep 17 00:00:00 2001 From: Bilel KIHAL Date: Mon, 25 Nov 2024 20:13:13 +0100 Subject: [PATCH] fix can't change portal language --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c27651a48..e6182c033 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -27,7 +27,7 @@ def set_locale cookies.permanent[:locale] = I18n.locale if cookies[:locale].nil? logger.debug "* Locale set to '#{I18n.locale}'" - I18n.locale = portal_lang if portal_language_enabled?(I18n.locale) + I18n.locale = portal_lang unless portal_language_enabled?(I18n.locale) session[:locale] = I18n.locale end @@ -430,7 +430,7 @@ def json_link(url, optional_params) optional_params_str = filtered_params.map { |param, value| "#{param}=#{value}" }.join("&") return base_url + optional_params_str + "&apikey=#{$API_KEY}" end - + def set_federated_portals RequestStore.store[:federated_portals] = params[:portals]&.split(',') end