Format all messages.json files in preparation for larger changes
This commit is contained in:
parent
db155b9752
commit
0ba23d4b62
77 changed files with 429741 additions and 574491 deletions
|
@ -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
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue