summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-05-24 09:36:27 -0300
committerJoram Wilander <jwawilander@gmail.com>2016-05-24 08:36:27 -0400
commit34beaa569bfb32f1607375f1d5a22859322060d2 (patch)
treec5d264e383890c88263db071a555201e4bc8e159 /webapp/stores
parent79c0b206895ce6c5ffa498cdc80edbd821ff5469 (diff)
downloadchat-34beaa569bfb32f1607375f1d5a22859322060d2.tar.gz
chat-34beaa569bfb32f1607375f1d5a22859322060d2.tar.bz2
chat-34beaa569bfb32f1607375f1d5a22859322060d2.zip
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
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/user_store.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx
index 855222d47..906a4cf9b 100644
--- a/webapp/stores/user_store.jsx
+++ b/webapp/stores/user_store.jsx
@@ -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() {