feat: offer plain language with simpler English and German wording

This commit is contained in:
Linus Rath
2026-10-31 14:58:04 +01:00
parent c6501ec886
commit 97b71e22f5
11 changed files with 1825 additions and 12 deletions
+18 -1
View File
@@ -1,4 +1,6 @@
// Vendor the webmail locale catalogs into ./locales/<lang>/common.json.
// Vendor the webmail locale catalogs into ./locales/<lang>/common.json, and
// the plain-language strings (./locales/<lang>/plain.json, English and German
// only; src/i18n/index.ts lays them over the catalog when Plain language is on).
// Run from the RN repo root: `node scripts/sync-locales.mjs [--check]`.
//
// The webmail catalog is the source of truth and is copied verbatim. Keys the
@@ -68,6 +70,21 @@ for (const lang of langs) {
copied++;
}
const plainSrc = join(WEBMAIL_LOCALES, lang, 'plain.json');
const plainDest = join(destDir, 'plain.json');
if (existsSync(plainSrc)) {
if (CHECK_ONLY) {
const same = existsSync(plainDest)
&& (await readFile(plainSrc, 'utf8')) === (await readFile(plainDest, 'utf8'));
if (!same) {
console.log(`stale: locales/${lang}/plain.json differs from the webmail`);
problems++;
}
} else {
await copyFile(plainSrc, plainDest);
}
}
// Report overlay keys the webmail now ships (safe to delete from the overlay)
// so the RN-only set stays minimal.
const overlayPath = join(RN_OVERLAYS, `${lang}.json`);