_locales: Remove empty description fields

This commit is contained in:
Scott Nonnenberg 2022-09-16 14:59:00 -07:00 committed by GitHub
parent bbf4e74239
commit 46baf2a69b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 3646 additions and 7259 deletions

View file

@ -43,9 +43,6 @@ try {
}
const BASE_DIR = join(__dirname, '../../_locales');
const en: LocaleMessagesType = readJsonSync(
join(BASE_DIR, '/en/messages.json')
);
const locales = readdirSync(join(BASE_DIR, ''));
console.log();
@ -59,11 +56,11 @@ locales.forEach((locale: string) => {
const messages: LocaleMessagesType = readJsonSync(target);
Object.keys(messages).forEach(key => {
if (!en[key]) {
return;
}
delete messages[key].placeholders;
if (!messages[key].description) {
delete messages[key].description;
}
});
console.log(`Writing ${target}`);