fixed locale change bug

This commit is contained in:
Akinwale Ariwodola 2017-08-23 00:50:59 +01:00
parent efd2b99cda
commit 48b02567a0
2 changed files with 3 additions and 2 deletions

View file

@ -98,6 +98,7 @@ class SettingsPage extends React.PureComponent {
onLanguageChange(e) { onLanguageChange(e) {
this.props.changeLanguage(e.target.value); this.props.changeLanguage(e.target.value);
this.forceUpdate();
} }
onShowUnavailableChange(event) {} onShowUnavailableChange(event) {}
@ -131,7 +132,7 @@ class SettingsPage extends React.PureComponent {
<option <option
key={dLang} key={dLang}
selected={dLang == language ? "selected" : null} selected={dLang == language ? "selected" : null}
value={language} value={dLang}
> >
{languages[dLang]} {languages[dLang]}
</option> </option>

View file

@ -35,7 +35,7 @@ reducers[types.DOWNLOAD_LANGUAGE_SUCCEEDED] = function(state, action) {
const langCode = language.substring(0, 2); const langCode = language.substring(0, 2);
if (LANGUAGES[langCode]) { if (LANGUAGES[langCode]) {
languages[langCode] = languages[language] =
LANGUAGES[langCode][0] + " (" + LANGUAGES[langCode][1] + ")"; LANGUAGES[langCode][0] + " (" + LANGUAGES[langCode][1] + ")";
} else { } else {
languages[langCode] = langCode; languages[langCode] = langCode;