From 48b02567a077ee9c4beee6aea319c89460a3a6a7 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 23 Aug 2017 00:50:59 +0100 Subject: [PATCH] fixed locale change bug --- ui/js/page/settings/view.jsx | 3 ++- ui/js/reducers/settings.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/js/page/settings/view.jsx b/ui/js/page/settings/view.jsx index 2cc699cab..deeff92ae 100644 --- a/ui/js/page/settings/view.jsx +++ b/ui/js/page/settings/view.jsx @@ -98,6 +98,7 @@ class SettingsPage extends React.PureComponent { onLanguageChange(e) { this.props.changeLanguage(e.target.value); + this.forceUpdate(); } onShowUnavailableChange(event) {} @@ -131,7 +132,7 @@ class SettingsPage extends React.PureComponent { diff --git a/ui/js/reducers/settings.js b/ui/js/reducers/settings.js index 962ac068a..e6d32f0f0 100644 --- a/ui/js/reducers/settings.js +++ b/ui/js/reducers/settings.js @@ -35,7 +35,7 @@ reducers[types.DOWNLOAD_LANGUAGE_SUCCEEDED] = function(state, action) { const langCode = language.substring(0, 2); if (LANGUAGES[langCode]) { - languages[langCode] = + languages[language] = LANGUAGES[langCode][0] + " (" + LANGUAGES[langCode][1] + ")"; } else { languages[langCode] = langCode;