PLT-1800 Load server side locale from the config.json (#3076)

* PLT-1800 Load server side locale from the config.json

* Add support for locales with country specifics
Этот коммит содержится в:
enahum
2016-05-24 09:36:27 -03:00
коммит произвёл Joram Wilander
родитель 79c0b20689
Коммит 34beaa569b
24 изменённых файлов: 377 добавлений и 51 удалений

Просмотреть файл

@@ -4,6 +4,9 @@
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import EventEmitter from 'events';
import * as GlobalActions from 'action_creators/global_actions.jsx';
import LocalizationStore from './localization_store.jsx';
import Constants from 'utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
@@ -100,6 +103,9 @@ class UserStoreClass extends EventEmitter {
this.saveProfile(user);
this.currentUserId = user.id;
global.window.mm_current_user_id = this.currentUserId;
if (LocalizationStore.getLocale() !== user.locale) {
GlobalActions.newLocalizationSelected(user.locale);
}
}
getCurrentId() {