summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-05-27 09:25:37 -0300
committerJoram Wilander <jwawilander@gmail.com>2016-05-27 08:25:37 -0400
commita2c183f401bdf8e9abddd35d4561d42034325046 (patch)
tree66565a9e21ad6b47b4dca18113ad9be48bd98492 /webapp/stores
parent15e427e806716b372f7fbef12d922f847ccc71b5 (diff)
downloadchat-a2c183f401bdf8e9abddd35d4561d42034325046.tar.gz
chat-a2c183f401bdf8e9abddd35d4561d42034325046.tar.bz2
chat-a2c183f401bdf8e9abddd35d4561d42034325046.zip
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
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..f57ecf1cd 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 '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() {