diff options
author | enahum <nahumhbl@gmail.com> | 2016-06-01 09:56:13 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-06-01 08:56:13 -0400 |
commit | b00a60ab71b2bd4640c8608d71805ba9caae97d9 (patch) | |
tree | 02137b19bc56e5041530e710955f039682da43c7 /webapp/stores/user_store.jsx | |
parent | 7be2a05cf58c22d1edfab12a2b55569c5e48ab2f (diff) | |
download | chat-b00a60ab71b2bd4640c8608d71805ba9caae97d9.tar.gz chat-b00a60ab71b2bd4640c8608d71805ba9caae97d9.tar.bz2 chat-b00a60ab71b2bd4640c8608d71805ba9caae97d9.zip |
PLT-1800 Load server side locale from the config.json (#3135)
* 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
Diffstat (limited to 'webapp/stores/user_store.jsx')
-rw-r--r-- | webapp/stores/user_store.jsx | 6 |
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() { |