mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2024-12-22 13:42:30 -05:00
commit
75fa9f93e7
2 changed files with 14 additions and 2 deletions
|
@ -16,6 +16,7 @@ import gl from 'react-intl/locale-data/gl';
|
||||||
import he from 'react-intl/locale-data/he';
|
import he from 'react-intl/locale-data/he';
|
||||||
import hu from 'react-intl/locale-data/hu';
|
import hu from 'react-intl/locale-data/hu';
|
||||||
import id from 'react-intl/locale-data/id';
|
import id from 'react-intl/locale-data/id';
|
||||||
|
import is from 'react-intl/locale-data/is';
|
||||||
import it from 'react-intl/locale-data/it';
|
import it from 'react-intl/locale-data/it';
|
||||||
import ja from 'react-intl/locale-data/ja';
|
import ja from 'react-intl/locale-data/ja';
|
||||||
import ko from 'react-intl/locale-data/ko';
|
import ko from 'react-intl/locale-data/ko';
|
||||||
|
@ -35,7 +36,7 @@ import uk from 'react-intl/locale-data/uk';
|
||||||
import vi from 'react-intl/locale-data/vi';
|
import vi from 'react-intl/locale-data/vi';
|
||||||
import zh from 'react-intl/locale-data/zh';
|
import zh from 'react-intl/locale-data/zh';
|
||||||
|
|
||||||
import locales, {customLocales} from './supported-locales.js';
|
import locales, {customLocales, isRtl} from './supported-locales.js';
|
||||||
/*
|
/*
|
||||||
locales = {
|
locales = {
|
||||||
'ab': {name: 'Аҧсшәа'},
|
'ab': {name: 'Аҧсшәа'},
|
||||||
|
@ -85,6 +86,7 @@ let localeData = [].concat(
|
||||||
he,
|
he,
|
||||||
hu,
|
hu,
|
||||||
id,
|
id,
|
||||||
|
is,
|
||||||
it,
|
it,
|
||||||
ja,
|
ja,
|
||||||
ko,
|
ko,
|
||||||
|
@ -111,5 +113,6 @@ for (const lang in customLocales) {
|
||||||
|
|
||||||
export {
|
export {
|
||||||
locales as default,
|
locales as default,
|
||||||
|
isRtl,
|
||||||
localeData // data expected for initializing ReactIntl.addLocaleData
|
localeData // data expected for initializing ReactIntl.addLocaleData
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,6 +74,15 @@ const customLocales = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// list of RTL locales supported, and a function to check whether a locale is RTL
|
||||||
|
const rtlLocales = [
|
||||||
|
'he'
|
||||||
|
];
|
||||||
|
|
||||||
|
const isRtl = locale => {
|
||||||
|
return rtlLocales.indexOf(locale) !== -1;
|
||||||
|
};
|
||||||
|
|
||||||
const wwwLocales = {
|
const wwwLocales = {
|
||||||
'ab': {name: 'Аҧсшәа'},
|
'ab': {name: 'Аҧсшәа'},
|
||||||
'ar': {name: 'العربية'},
|
'ar': {name: 'العربية'},
|
||||||
|
@ -150,4 +159,4 @@ const wwwLocales = {
|
||||||
'zh-tw': {name: '繁體中文'}
|
'zh-tw': {name: '繁體中文'}
|
||||||
};
|
};
|
||||||
|
|
||||||
export {locales as default, customLocales, wwwLocales};
|
export {locales as default, customLocales, rtlLocales, isRtl, wwwLocales};
|
||||||
|
|
Loading…
Reference in a new issue