diff --git a/webapp/src/main/resources/public/js/actions/users/UserModalActions.js b/webapp/src/main/resources/public/js/actions/users/UserModalActions.js index 6f9086c52d..deed25f0d1 100644 --- a/webapp/src/main/resources/public/js/actions/users/UserModalActions.js +++ b/webapp/src/main/resources/public/js/actions/users/UserModalActions.js @@ -18,8 +18,7 @@ class UserModalActions { "pushCurrentLocale", "removeLocaleFromList", "updateCanTranslateAllLocales", - "updateLocaleFilter", - "updateSelectedLocale", + "updateLocaleInput", ); } } diff --git a/webapp/src/main/resources/public/js/components/header/LocaleSelectorModal.js b/webapp/src/main/resources/public/js/components/header/LocaleSelectorModal.js index 4a3b6c622b..977a216a31 100644 --- a/webapp/src/main/resources/public/js/components/header/LocaleSelectorModal.js +++ b/webapp/src/main/resources/public/js/components/header/LocaleSelectorModal.js @@ -10,14 +10,14 @@ class LocaleSelectorModal extends React.Component { }; state = { - "selectedLocale": Locales.getCurrentLocale() + "localeInput": Locales.getCurrentLocale() }; /** * Changes the locale of the app by setting the locale cookie and reloading the page. */ onSaveClicked = () => { - document.cookie = 'locale=' + this.state.selectedLocale; + document.cookie = 'locale=' + this.state.localeInput; document.location.reload(true); }; @@ -34,7 +34,7 @@ class LocaleSelectorModal extends React.Component { * @returns {boolean} */ isNewLocaleSelected = () => { - return Locales.getCurrentLocale() !== this.state.selectedLocale; + return Locales.getCurrentLocale() !== this.state.localeInput; }; /** @@ -44,7 +44,7 @@ class LocaleSelectorModal extends React.Component { */ onLocaleClicked = (locale) => { this.setState({ - "selectedLocale": locale + "localeInput": locale }); }; @@ -56,7 +56,7 @@ class LocaleSelectorModal extends React.Component { getLocaleListGroupItem = (locale) => { let localeDisplayName = Locales.getNativeDispalyName(locale); - let active = locale === this.state.selectedLocale; + let active = locale === this.state.localeInput; return ( x.bcp47Tag).toSorted()) { if (this.props.modal.localeTags.includes(tag) || (this.props.modal.localeFilter && !tag.toLowerCase().includes(this.props.modal.localeFilter.toLowerCase()))) { continue; } - options.push( - - {tag} - - ); + options.push(