Upgrade react-intl (#24906)
This commit is contained in:
parent
00c222377d
commit
44cd88adc4
130 changed files with 413 additions and 5046 deletions
11
config/formatjs-formatter.js
Normal file
11
config/formatjs-formatter.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const path = require('path');
|
||||
|
||||
const currentTranslations = require(path.join(__dirname, "../app/javascript/mastodon/locales/en.json"));
|
||||
|
||||
exports.format = (msgs) => {
|
||||
const results = {};
|
||||
for (const [id, msg] of Object.entries(msgs)) {
|
||||
results[id] = currentTranslations[id] || msg.defaultMessage;
|
||||
}
|
||||
return results;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue