mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
commit
df30112b75
4 changed files with 3594 additions and 3659 deletions
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"ab": {
|
||||
"locale": "ab",
|
||||
"parentLocale": "az"
|
||||
},
|
||||
"an": {
|
||||
"locale": "an",
|
||||
"parentLocale": "ca"
|
||||
},
|
||||
"cat": {
|
||||
"locale": "cat",
|
||||
"parentLocale": "en"
|
||||
},
|
||||
"ht": {
|
||||
"locale": "ht",
|
||||
"parentLocale": "fr"
|
||||
},
|
||||
"ja-hr": {
|
||||
"locale": "ja-hr",
|
||||
"parentLocale": "ja"
|
||||
},
|
||||
"rap": {
|
||||
"locale": "rap",
|
||||
"parentLocale": "es"
|
||||
},
|
||||
"la": {
|
||||
"locale": "la",
|
||||
"parentLocale": "it"
|
||||
},
|
||||
"sc": {
|
||||
"locale": "sc",
|
||||
"parentLocale": "it"
|
||||
},
|
||||
"yum": {
|
||||
"locale": "yum",
|
||||
"parentLocale": "en"
|
||||
},
|
||||
"zh-cn": {
|
||||
"locale": "zh-cn",
|
||||
"parentLocale": "zh"
|
||||
},
|
||||
"zh-tw": {
|
||||
"locale": "zh-tw",
|
||||
"parentLocale": "zh"
|
||||
}
|
||||
}
|
7182
package-lock.json
generated
7182
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,21 +1,7 @@
|
|||
const requireAll = require('./require-all');
|
||||
const ReactIntl = require('react-intl');
|
||||
|
||||
const allLocaleData = requireAll(require.context('react-intl/locale-data', true, /^\.\/.*\.js$/));
|
||||
const customLocaleData = require('../../custom-locales.json');
|
||||
|
||||
/**
|
||||
* Add all locales
|
||||
*/
|
||||
for (const locale in allLocaleData) {
|
||||
ReactIntl.addLocaleData(allLocaleData[locale]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom locales to react-intl if it doesn't have them.
|
||||
*/
|
||||
for (const customLocale in customLocaleData) {
|
||||
ReactIntl.addLocaleData(customLocaleData[customLocale]);
|
||||
}
|
||||
// Add locale data to react intl for all supported languages
|
||||
const localeData = require('scratch-l10n').localeData;
|
||||
ReactIntl.addLocaleData(localeData);
|
||||
|
||||
module.exports = ReactIntl;
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
const requireAll = requireContext => (
|
||||
requireContext.keys().map(requireContext)
|
||||
);
|
||||
|
||||
module.exports = requireAll;
|
Loading…
Reference in a new issue