Format all messages.json files in preparation for larger changes

This commit is contained in:
Scott Nonnenberg 2022-08-31 20:42:18 -07:00 committed by GitHub
parent db155b9752
commit 0ba23d4b62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 429741 additions and 574491 deletions

View file

@ -35,12 +35,6 @@ js/WebAudioRecorderMp3.js
# Github workflows
.github/**
# Managed by Transifex:
# Note: the negate pattern only works because it's targeting the same depth as the
# glob on the previous line.
_locales/**/*.json
!_locales/en/messages.json
# Managed by package manager (`bower` and `yarn`/`npm`):
/bower.json
/package.json

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -49,14 +49,12 @@ const en: LocaleMessagesType = readJsonSync(
const locales = readdirSync(join(BASE_DIR, ''));
console.log();
console.log('Re-adding placeholders to non-en locales');
console.log('Deleting placeholders for all locales');
locales.forEach((locale: string) => {
if (locale === 'en') {
return;
}
const target = resolve(join(BASE_DIR, locale, 'messages.json'));
if (!existsSync(target)) {
throw new Error(`File not found for ${locale}: ${target}`);
console.warn(`File not found for ${locale}: ${target}`);
return;
}
const messages: LocaleMessagesType = readJsonSync(target);
@ -65,13 +63,17 @@ locales.forEach((locale: string) => {
return;
}
messages[key].placeholders = en[key].placeholders;
delete messages[key].placeholders;
});
console.log(`Writing ${target}`);
writeFileSync(target, `${JSON.stringify(messages, null, 4)}\n`);
});
execSync('yarn format', {
stdio: [null, process.stdout, process.stderr],
});
if (failed) {
process.exit(1);
}