mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-16 12:12:14 +00:00
12 lines
328 B
JavaScript
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;
|
||
|
};
|