1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-12-21 10:08:20 +09:00
whippy-edition/config/formatjs-formatter.js
2023-05-31 23:43:39 +02:00

12 lines
328 B
JavaScript

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;
};