8f03b7a2fb
* Add notifications when a reblogged status has been updated * Change wording to say "edit" instead of "update" and add missing controls * Replace previous update notifications with the most up-to-date one
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
/* @preval */
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const filtered = {};
|
|
const filenames = fs.readdirSync(path.resolve(__dirname, '../locales'));
|
|
|
|
filenames.forEach(filename => {
|
|
if (!filename.match(/\.json$/) || filename.match(/defaultMessages|whitelist/)) return;
|
|
|
|
const content = fs.readFileSync(path.resolve(__dirname, `../locales/${filename}`), 'utf-8');
|
|
const full = JSON.parse(content);
|
|
const locale = filename.split('.')[0];
|
|
|
|
filtered[locale] = {
|
|
'notification.favourite': full['notification.favourite'] || '',
|
|
'notification.follow': full['notification.follow'] || '',
|
|
'notification.follow_request': full['notification.follow_request'] || '',
|
|
'notification.mention': full['notification.mention'] || '',
|
|
'notification.reblog': full['notification.reblog'] || '',
|
|
'notification.poll': full['notification.poll'] || '',
|
|
'notification.status': full['notification.status'] || '',
|
|
'notification.update': full['notification.update'] || '',
|
|
|
|
'status.show_more': full['status.show_more'] || '',
|
|
'status.reblog': full['status.reblog'] || '',
|
|
'status.favourite': full['status.favourite'] || '',
|
|
|
|
'notifications.group': full['notifications.group'] || '',
|
|
};
|
|
});
|
|
|
|
module.exports = JSON.parse(JSON.stringify(filtered));
|