You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
486 B
15 lines
486 B
1 year ago
|
const path = require('path');
|
||
|
|
||
1 year ago
|
const upstreamTranslations = require(path.join(__dirname, "../app/javascript/mastodon/locales/en.json"));
|
||
|
const currentTranslations = require(path.join(__dirname, "../app/javascript/flavours/glitch/locales/en.json"));
|
||
1 year ago
|
|
||
|
exports.format = (msgs) => {
|
||
|
const results = {};
|
||
|
for (const [id, msg] of Object.entries(msgs)) {
|
||
1 year ago
|
if (!upstreamTranslations[id]) {
|
||
|
results[id] = currentTranslations[id] || msg.defaultMessage;
|
||
|
}
|
||
1 year ago
|
}
|
||
|
return results;
|
||
|
};
|