diff --git a/src/components/LocalePicker.js b/src/components/LocalePicker.js index 747433962d9b..5be074168250 100644 --- a/src/components/LocalePicker.js +++ b/src/components/LocalePicker.js @@ -7,7 +7,6 @@ import * as App from '../libs/actions/App'; import withLocalize, {withLocalizePropTypes} from './withLocalize'; import ONYXKEYS from '../ONYXKEYS'; import CONST from '../CONST'; -import Permissions from '../libs/Permissions'; import * as Localize from '../libs/Localize'; import Picker from './Picker'; import styles from '../styles/styles'; @@ -19,16 +18,12 @@ const propTypes = { /** Indicates size of a picker component and whether to render the label or not */ size: PropTypes.oneOf(['normal', 'small']), - /** Beta features list */ - betas: PropTypes.arrayOf(PropTypes.string), - ...withLocalizePropTypes, }; const defaultProps = { preferredLocale: CONST.DEFAULT_LOCALE, size: 'normal', - betas: [], }; const localesToLanguages = { @@ -42,28 +37,22 @@ const localesToLanguages = { }, }; -const LocalePicker = (props) => { - if (!Permissions.canUseInternationalization(props.betas)) { - return null; - } - - return ( - { - if (locale === props.preferredLocale) { - return; - } +const LocalePicker = props => ( + { + if (locale === props.preferredLocale) { + return; + } - App.setLocale(locale); - }} - items={_.values(localesToLanguages)} - size={props.size} - value={props.preferredLocale} - containerStyles={props.size === 'small' ? [styles.pickerContainerSmall] : []} - /> - ); -}; + App.setLocale(locale); + }} + items={_.values(localesToLanguages)} + size={props.size} + value={props.preferredLocale} + containerStyles={props.size === 'small' ? [styles.pickerContainerSmall] : []} + /> +); LocalePicker.defaultProps = defaultProps; LocalePicker.propTypes = propTypes; @@ -75,8 +64,5 @@ export default compose( preferredLocale: { key: ONYXKEYS.NVP_PREFERRED_LOCALE, }, - betas: { - key: ONYXKEYS.BETAS, - }, }), )(LocalePicker); diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 905b29c99cf4..68f1a493f158 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -43,14 +43,6 @@ function canUseDefaultRooms(betas) { return _.contains(betas, CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas); } -/** - * @param {Array} betas - * @returns {Boolean} - */ -function canUseInternationalization(betas) { - return _.contains(betas, CONST.BETAS.INTERNATIONALIZATION) || canUseAllBetas(betas); -} - /** * @param {Array} betas * @returns {Boolean} @@ -107,7 +99,6 @@ export default { canUseIOU, canUsePayWithExpensify, canUseDefaultRooms, - canUseInternationalization, canUseIOUSend, canUseWallet, canUseCommentLinking,