Revert "PLT-1800 Load server side locale from the config.json" (#3201)
Этот коммит содержится в:
@@ -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);
|
||||
|
||||
Ссылка в новой задаче
Block a user