mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-02 11:59:07 -05:00
590f505a61
This reverts commit1b1b396e92
, reversing changes made toa144bab0e6
.
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
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]);
|
|
}
|
|
|
|
module.exports = ReactIntl;
|