summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-06-02 16:47:26 -0300
committerCorey Hulen <corey@hulen.com>2016-06-02 12:47:26 -0700
commit159953050a9c4fb700bbde79042ead4843b0bea5 (patch)
tree747a022c5cf579599402447b5e5d0f51dfee9f76 /webapp/stores
parente44b8ec6d57fc55230a5c97ea105b7fd9ef59aca (diff)
downloadchat-159953050a9c4fb700bbde79042ead4843b0bea5.tar.gz
chat-159953050a9c4fb700bbde79042ead4843b0bea5.tar.bz2
chat-159953050a9c4fb700bbde79042ead4843b0bea5.zip
PLT-1800 Load server side locale from the config.json (#3202)
* 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 * Remove github.com/cloudfoundry/jibber_jabber as vendor dependency * Fix get locale on login_controller
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() {