From ec30b845abce7bd09d4db0d27c910fab4c310e44 Mon Sep 17 00:00:00 2001 From: Peter Stadler Date: Tue, 14 Jan 2025 16:32:55 +0100 Subject: [PATCH] fix getPreference function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the getPreference would only check the URL parameter and not the actual preferences for the key "application_language". This resulted in an always-English frontend independent of the preferences set in the prefs file Co-Authored-By: Daniel Röwenstrunk <929533+roewenstrunk@users.noreply.github.com> --- app/controller/PreferenceController.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controller/PreferenceController.js b/app/controller/PreferenceController.js index 7a7288b91..fedb833ba 100644 --- a/app/controller/PreferenceController.js +++ b/app/controller/PreferenceController.js @@ -72,7 +72,11 @@ Ext.define('EdiromOnline.controller.PreferenceController', { var lang = me.getURLParameter("lang"); if(lang) { return lang; - } else { + } + else if(me.preferences[key]) { + return me.preferences[key]; + } + else { return "en"; } }