Skip to content

Commit 69e0a36

Browse files
authored
fix getPreference function (#527)
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. The issue was reported by @obertsalome and can be reproduced with the current Pintos data by simply starting the Edirom without any URL parameter. This will show the frontend GUI elements in English although the "application_language" is set to "de". ## Types of changes - Bug fix (non-breaking change which fixes an issue) - Improvement ## Overview - I have performed a self-review of my code, according to the [style guide](https://github.com/Edirom/Edirom-Online/blob/develop/STYLE-GUIDE.md) - I have read the [CONTRIBUTING](https://github.com/Edirom/Edirom-Online/blob/develop/CONTRIBUTING.md) document. - All new and existing tests passed.
2 parents e7060f2 + ec30b84 commit 69e0a36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/controller/PreferenceController.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ Ext.define('EdiromOnline.controller.PreferenceController', {
7272
var lang = me.getURLParameter("lang");
7373
if(lang) {
7474
return lang;
75-
} else {
75+
}
76+
else if(me.preferences[key]) {
77+
return me.preferences[key];
78+
}
79+
else {
7680
return "en";
7781
}
7882
}

0 commit comments

Comments
 (0)