diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx
index b12eb2d9cb..f2c2502fbb 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(
-
- );
+ if (Utils.isFeatureEnabled(PreReleaseFeatures.LOC_PREVIEW)) {
+ if (this.props.activeSection === 'languages') {
+ var inputs = [];
+ inputs.push(
+
+ );
- languagesSection = (
- {
- this.updateSection('');
- e.preventDefault();
- }}
- />
- );
- } else {
- var locale = 'English';
- Utils.languages().forEach((l) => {
- if (l.value === this.props.user.locale) {
- locale = l.name;
- }
- });
+ languagesSection = (
+ {
+ this.updateSection('');
+ e.preventDefault();
+ }}
+ />
+ );
+ } else {
+ var locale = 'English';
+ Utils.languages().forEach((l) => {
+ if (l.value === this.props.user.locale) {
+ locale = l.name;
+ }
+ });
- languagesSection = (
- {
- this.updateSection('languages');
- }}
- />
- );
+ languagesSection = (
+ {
+ this.updateSection('languages');
+ }}
+ />
+ );
+ }
}
return (
@@ -367,7 +370,6 @@ export default class UserSettingsDisplay extends React.Component {
{nameFormatSection}
{languagesSection}
-
);
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 5d6aa9329b..851bc5f6c4 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -451,6 +451,10 @@ export default {
EMBED_PREVIEW: {
label: 'embed_preview',
description: 'Show preview snippet of links below message'
+ },
+ LOC_PREVIEW: {
+ label: 'loc_preview',
+ description: 'Show user language in display settings'
}
},
OVERLAY_TIME_DELAY: 400,