diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-22 09:27:27 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-22 09:27:27 -0600 |
commit | 058d6b24672ce22d72451607eef7c9dcc48a255a (patch) | |
tree | 33dc08ababd8d1e8793e3eb6eecdd093bfa04bf8 /web/react/components/user_settings/user_settings_display.jsx | |
parent | da1d52d546121e6c36cca9dea90c4a3bc540b0b7 (diff) | |
download | chat-058d6b24672ce22d72451607eef7c9dcc48a255a.tar.gz chat-058d6b24672ce22d72451607eef7c9dcc48a255a.tar.bz2 chat-058d6b24672ce22d72451607eef7c9dcc48a255a.zip |
PLT-7 adding loc feature to preview
Diffstat (limited to 'web/react/components/user_settings/user_settings_display.jsx')
-rw-r--r-- | web/react/components/user_settings/user_settings_display.jsx | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx index b12eb2d9c..f2c2502fb 100644 --- a/web/react/components/user_settings/user_settings_display.jsx +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -5,6 +5,7 @@ import {savePreferences} from '../../utils/client.jsx'; import SettingItemMin from '../setting_item_min.jsx'; import SettingItemMax from '../setting_item_max.jsx'; import Constants from '../../utils/constants.jsx'; +const PreReleaseFeatures = Constants.PRE_RELEASE_FEATURES; import PreferenceStore from '../../stores/preference_store.jsx'; import ManageLanguages from './manage_languages.jsx'; import * as Utils from '../../utils/utils.jsx'; @@ -294,44 +295,46 @@ export default class UserSettingsDisplay extends React.Component { ); } - if (this.props.activeSection === 'languages') { - var inputs = []; - inputs.push( - <ManageLanguages - user={this.props.user} - key='languages-ui' - /> - ); + if (Utils.isFeatureEnabled(PreReleaseFeatures.LOC_PREVIEW)) { + if (this.props.activeSection === 'languages') { + var inputs = []; + inputs.push( + <ManageLanguages + user={this.props.user} + key='languages-ui' + /> + ); - languagesSection = ( - <SettingItemMax - title={'Language'} - width='medium' - inputs={inputs} - updateSection={(e) => { - this.updateSection(''); - e.preventDefault(); - }} - /> - ); - } else { - var locale = 'English'; - Utils.languages().forEach((l) => { - if (l.value === this.props.user.locale) { - locale = l.name; - } - }); + languagesSection = ( + <SettingItemMax + title={'Language'} + width='medium' + inputs={inputs} + updateSection={(e) => { + this.updateSection(''); + e.preventDefault(); + }} + /> + ); + } else { + var locale = 'English'; + Utils.languages().forEach((l) => { + if (l.value === this.props.user.locale) { + locale = l.name; + } + }); - languagesSection = ( - <SettingItemMin - title={'Language'} - width='medium' - describe={locale} - updateSection={() => { - this.updateSection('languages'); - }} - /> - ); + languagesSection = ( + <SettingItemMin + title={'Language'} + width='medium' + describe={locale} + updateSection={() => { + this.updateSection('languages'); + }} + /> + ); + } } return ( @@ -367,7 +370,6 @@ export default class UserSettingsDisplay extends React.Component { {nameFormatSection} <div className='divider-dark'/> {languagesSection} - <div className='divider-dark'/> </div> </div> ); |