Skip to content

Commit

Permalink
Fix #1520: Allowed languages are not working
Browse files Browse the repository at this point in the history
(cherry picked from commit 157a891)
  • Loading branch information
zcgandcomp committed Dec 21, 2023
1 parent 6336923 commit 5ffc091
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions powerauth-webflow/src/main/js/reducers/localeReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ export default function reducer(state = {locale: I18N_EN.locale, messages: I18N_
return {...state, locale: I18N_UK.locale, messages: I18N_UK.messages};
} else if (action.locale === "ro") {
return {...state, locale: I18N_RO.locale, messages: I18N_RO.messages};
} else if (action.locale === "de") {
return {...state, locale: I18N_DE.locale, messages: I18N_DE.messages};
} else if (action.locale === "fr") {
return {...state, locale: I18N_FR.locale, messages: I18N_FR.messages};
} else if (action.locale === "es") {
return {...state, locale: I18N_ES.locale, messages: I18N_ES.messages};
}


return state;
default:
return state;
Expand Down
4 changes: 4 additions & 0 deletions powerauth-webflow/src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
var I18N_CS = {locale: 'cs', messages: JSON.parse(/*[[${i18n_CS}]]*/)};
var I18N_UK = {locale: 'uk', messages: JSON.parse(/*[[${i18n_UK}]]*/)};
var I18N_RO = {locale: 'ro', messages: JSON.parse(/*[[${i18n_RO}]]*/)};
var I18N_DE = {locale: 'de', messages: JSON.parse(/*[[${i18n_DE}]]*/)};
var I18N_FR = {locale: 'fr', messages: JSON.parse(/*[[${i18n_FR}]]*/)};
var I18N_ES = {locale: 'es', messages: JSON.parse(/*[[${i18n_ES}]]*/)};


var csrf = {headerName: [[${_csrf.headerName}]], token: [[${_csrf.token}]]};

Expand Down

0 comments on commit 5ffc091

Please sign in to comment.