Merge pull request #2707 from chrisgarrity/feature/exclude-rtl

[DEVELOP] Temporarily exclude RTL languages from the language menu
This commit is contained in:
chrisgarrity authored and GitHub committed 2018-07-24 10:18:12 -04:00
commit b089786b8a
1 file changed
+15 -8
@@ -5,6 +5,9 @@ import Box from '../box/box.jsx';
import locales from 'scratch-l10n';
import styles from './language-selector.css';
// supported languages to exclude from the menu, but allow as a URL option
const ignore = ['he'];
class LanguageSelector extends React.Component {
render () {
const {
@@ -26,14 +29,18 @@ class LanguageSelector extends React.Component {
value={currentLocale}
onChange={onChange}
>
{Object.keys(locales).map(locale => (
<option
key={locale}
value={locale}
>
{locales[locale].name}
</option>
))}
{
Object.keys(locales)
.filter(l => !ignore.includes(l))
.map(locale => (
<option
key={locale}
value={locale}
>
{locales[locale].name}
</option>
))
}
</select>
</div>
</Box>