summaryrefslogtreecommitdiffstats
path: root/webapp/components/root.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-06-01 11:56:27 -0400
committerChristopher Speller <crspeller@gmail.com>2016-06-01 11:56:27 -0400
commit786e4dce7d520f79b8cf76939d84678d72941420 (patch)
tree5bb520880d200cba90c5ada250c63144e18c3333 /webapp/components/root.jsx
parentb00a60ab71b2bd4640c8608d71805ba9caae97d9 (diff)
downloadchat-786e4dce7d520f79b8cf76939d84678d72941420.tar.gz
chat-786e4dce7d520f79b8cf76939d84678d72941420.tar.bz2
chat-786e4dce7d520f79b8cf76939d84678d72941420.zip
Revert "PLT-1800 Load server side locale from the config.json" (#3201)
Diffstat (limited to 'webapp/components/root.jsx')
-rw-r--r--webapp/components/root.jsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/webapp/components/root.jsx b/webapp/components/root.jsx
index abaa05bb5..c96499392 100644
--- a/webapp/components/root.jsx
+++ b/webapp/components/root.jsx
@@ -6,7 +6,6 @@
import * as GlobalActions from 'actions/global_actions.jsx';
import LocalizationStore from 'stores/localization_store.jsx';
-import Client from 'utils/web_client.jsx';
import {IntlProvider} from 'react-intl';
@@ -42,10 +41,7 @@ export default class Root extends React.Component {
FastClick.attach(document.body);
}
localizationChanged() {
- const locale = LocalizationStore.getLocale();
-
- Client.setAcceptLanguage(locale);
- this.setState({locale, translations: LocalizationStore.getTranslations()});
+ this.setState({locale: LocalizationStore.getLocale(), translations: LocalizationStore.getTranslations()});
}
redirectIfNecessary(props) {
@@ -71,7 +67,7 @@ export default class Root extends React.Component {
LocalizationStore.addChangeListener(this.localizationChanged);
// Get our localizaiton
- GlobalActions.loadDefaultLocale();
+ GlobalActions.loadBrowserLocale();
}
componentWillUnmount() {
LocalizationStore.removeChangeListener(this.localizationChanged);