PLT-1800 Load server side locale from the config.json (#3092)
* PLT-1800 Load server side locale from the config.json * Add support for locales with country specifics * Fix localization on served locale file as plain/text
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
15e427e806
Коммит
a2c183f401
@@ -4,6 +4,9 @@
|
||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||
import EventEmitter from 'events';
|
||||
|
||||
import * as GlobalActions from 'actions/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() {
|
||||
|
||||
Ссылка в новой задаче
Block a user