From dd0969d48b53252746ef323f8e1810a7df6740e6 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:27:58 +0200 Subject: [PATCH] chore: drop translations of app strings the calendar agenda no longer uses --- locales/rn/ar.json | 4 ---- locales/rn/ca.json | 4 ---- locales/rn/cs.json | 4 ---- locales/rn/da.json | 4 ---- locales/rn/de.json | 4 ---- locales/rn/es.json | 4 ---- locales/rn/fa.json | 4 ---- locales/rn/fr.json | 4 ---- locales/rn/he.json | 4 ---- locales/rn/hu.json | 4 ---- locales/rn/it.json | 4 ---- locales/rn/ja.json | 4 ---- locales/rn/ko.json | 4 ---- locales/rn/lv.json | 4 ---- locales/rn/mn.json | 4 ---- locales/rn/nb.json | 4 ---- locales/rn/nl.json | 4 ---- locales/rn/pl.json | 4 ---- locales/rn/pt.json | 4 ---- locales/rn/ro.json | 4 ---- locales/rn/ru.json | 4 ---- locales/rn/sk.json | 4 ---- locales/rn/tr.json | 4 ---- locales/rn/uk.json | 4 ---- locales/rn/zh-TW.json | 4 ---- locales/rn/zh.json | 4 ---- scripts/rn-missing-translations.mjs | 23 ++++++++++++++++++++--- 27 files changed, 20 insertions(+), 107 deletions(-) diff --git a/locales/rn/ar.json b/locales/rn/ar.json index c614151e..bcd139a0 100644 --- a/locales/rn/ar.json +++ b/locales/rn/ar.json @@ -6,10 +6,6 @@ "not_starred": "غير مميزة بنجمة" }, "calendar": { - "agenda": { - "days_clear": "لا أحداث في الأيام الـ{count} القادمة.", - "no_upcoming": "لا توجد أحداث قادمة" - }, "alerts": { "unit_minutes_after": "دقائق بعد" }, diff --git a/locales/rn/ca.json b/locales/rn/ca.json index 2dd61abd..cab36b8e 100644 --- a/locales/rn/ca.json +++ b/locales/rn/ca.json @@ -6,10 +6,6 @@ "not_starred": "No destacat" }, "calendar": { - "agenda": { - "days_clear": "Els propers {count} dies són lliures.", - "no_upcoming": "Cap esdeveniment proper" - }, "alerts": { "unit_minutes_after": "minuts després" }, diff --git a/locales/rn/cs.json b/locales/rn/cs.json index 68ea69de..4a4074ad 100644 --- a/locales/rn/cs.json +++ b/locales/rn/cs.json @@ -6,10 +6,6 @@ "not_starred": "Bez hvězdičky" }, "calendar": { - "agenda": { - "days_clear": "Příštích {count} dní je volných.", - "no_upcoming": "Žádné nadcházející události" - }, "alerts": { "unit_minutes_after": "min po" }, diff --git a/locales/rn/da.json b/locales/rn/da.json index 3ee7eef9..1ae0d335 100644 --- a/locales/rn/da.json +++ b/locales/rn/da.json @@ -6,10 +6,6 @@ "not_starred": "Ikke stjernemarkerede" }, "calendar": { - "agenda": { - "days_clear": "De næste {count} dage er ledige.", - "no_upcoming": "Ingen kommende begivenheder" - }, "alerts": { "unit_minutes_after": "minutter efter" }, diff --git a/locales/rn/de.json b/locales/rn/de.json index 1d030581..6762bc4f 100644 --- a/locales/rn/de.json +++ b/locales/rn/de.json @@ -6,10 +6,6 @@ "not_starred": "Nicht markiert" }, "calendar": { - "agenda": { - "days_clear": "Die nächsten {count} Tage sind frei.", - "no_upcoming": "Keine bevorstehenden Termine" - }, "alerts": { "unit_minutes_after": "Minuten danach" }, diff --git a/locales/rn/es.json b/locales/rn/es.json index 3226cb29..cab43237 100644 --- a/locales/rn/es.json +++ b/locales/rn/es.json @@ -6,10 +6,6 @@ "not_starred": "No destacado" }, "calendar": { - "agenda": { - "days_clear": "Los próximos {count} días están libres.", - "no_upcoming": "No hay eventos próximos" - }, "alerts": { "unit_minutes_after": "minutos después" }, diff --git a/locales/rn/fa.json b/locales/rn/fa.json index cddc045d..b24f3b4a 100644 --- a/locales/rn/fa.json +++ b/locales/rn/fa.json @@ -6,10 +6,6 @@ "not_starred": "بدون ستاره" }, "calendar": { - "agenda": { - "days_clear": "در {count} روز آینده رویدادی نیست.", - "no_upcoming": "رویداد پیش‌رویی وجود ندارد" - }, "alerts": { "unit_minutes_after": "دقیقه بعد" }, diff --git a/locales/rn/fr.json b/locales/rn/fr.json index 2194cf5f..35e0363a 100644 --- a/locales/rn/fr.json +++ b/locales/rn/fr.json @@ -6,10 +6,6 @@ "not_starred": "Non suivis" }, "calendar": { - "agenda": { - "days_clear": "Les {count} prochains jours sont libres.", - "no_upcoming": "Aucun événement à venir" - }, "alerts": { "unit_minutes_after": "minutes après" }, diff --git a/locales/rn/he.json b/locales/rn/he.json index 7fface62..71578a5e 100644 --- a/locales/rn/he.json +++ b/locales/rn/he.json @@ -6,10 +6,6 @@ "not_starred": "ללא כוכב" }, "calendar": { - "agenda": { - "days_clear": "אין אירועים ב-{count} הימים הקרובים.", - "no_upcoming": "אין אירועים קרובים" - }, "alerts": { "unit_minutes_after": "דקות אחרי" }, diff --git a/locales/rn/hu.json b/locales/rn/hu.json index 4812ee98..6639aa6c 100644 --- a/locales/rn/hu.json +++ b/locales/rn/hu.json @@ -6,10 +6,6 @@ "not_starred": "Nem csillagozott" }, "calendar": { - "agenda": { - "days_clear": "A következő {count} nap szabad.", - "no_upcoming": "Nincsenek közelgő események" - }, "alerts": { "unit_minutes_after": "perccel utána" }, diff --git a/locales/rn/it.json b/locales/rn/it.json index e8514543..421b8cc0 100644 --- a/locales/rn/it.json +++ b/locales/rn/it.json @@ -6,10 +6,6 @@ "not_starred": "Non speciale" }, "calendar": { - "agenda": { - "days_clear": "I prossimi {count} giorni sono liberi.", - "no_upcoming": "Nessun evento in programma" - }, "alerts": { "unit_minutes_after": "minuti dopo" }, diff --git a/locales/rn/ja.json b/locales/rn/ja.json index 0ea3cb13..faffbcdd 100644 --- a/locales/rn/ja.json +++ b/locales/rn/ja.json @@ -6,10 +6,6 @@ "not_starred": "スターなし" }, "calendar": { - "agenda": { - "days_clear": "今後{count}日間は予定がありません。", - "no_upcoming": "今後の予定はありません" - }, "alerts": { "unit_minutes_after": "分後" }, diff --git a/locales/rn/ko.json b/locales/rn/ko.json index 555e2672..0288161c 100644 --- a/locales/rn/ko.json +++ b/locales/rn/ko.json @@ -6,10 +6,6 @@ "not_starred": "별표 없음" }, "calendar": { - "agenda": { - "days_clear": "앞으로 {count}일 동안 일정이 없어요.", - "no_upcoming": "다가오는 일정이 없어요" - }, "alerts": { "unit_minutes_after": "분 후" }, diff --git a/locales/rn/lv.json b/locales/rn/lv.json index 2e990669..623a86de 100644 --- a/locales/rn/lv.json +++ b/locales/rn/lv.json @@ -6,10 +6,6 @@ "not_starred": "Bez zvaigznītes" }, "calendar": { - "agenda": { - "days_clear": "Nākamās {count} dienas ir brīvas.", - "no_upcoming": "Nav gaidāmo notikumu" - }, "alerts": { "unit_minutes_after": "min pēc sākuma" }, diff --git a/locales/rn/mn.json b/locales/rn/mn.json index 8a82c45b..0297b6be 100644 --- a/locales/rn/mn.json +++ b/locales/rn/mn.json @@ -6,10 +6,6 @@ "not_starred": "Одгүй" }, "calendar": { - "agenda": { - "days_clear": "Дараагийн {count} өдөр үйл явдал байхгүй.", - "no_upcoming": "Удахгүй болох үйл явдал байхгүй" - }, "alerts": { "unit_minutes_after": "минутын дараа" }, diff --git a/locales/rn/nb.json b/locales/rn/nb.json index a4878b23..1fd1c2e6 100644 --- a/locales/rn/nb.json +++ b/locales/rn/nb.json @@ -6,10 +6,6 @@ "not_starred": "Ikke stjernemerket" }, "calendar": { - "agenda": { - "days_clear": "De neste {count} dagene er ledige.", - "no_upcoming": "Ingen kommende hendelser" - }, "alerts": { "unit_minutes_after": "minutter etter" }, diff --git a/locales/rn/nl.json b/locales/rn/nl.json index 1c191a3d..838fb3ce 100644 --- a/locales/rn/nl.json +++ b/locales/rn/nl.json @@ -6,10 +6,6 @@ "not_starred": "Zonder ster" }, "calendar": { - "agenda": { - "days_clear": "De komende {count} dagen zijn vrij.", - "no_upcoming": "Geen komende afspraken" - }, "alerts": { "unit_minutes_after": "minuten erna" }, diff --git a/locales/rn/pl.json b/locales/rn/pl.json index ae570bd1..41f6d6db 100644 --- a/locales/rn/pl.json +++ b/locales/rn/pl.json @@ -6,10 +6,6 @@ "not_starred": "Bez gwiazdki" }, "calendar": { - "agenda": { - "days_clear": "Najbliższe {count} dni są wolne.", - "no_upcoming": "Brak nadchodzących wydarzeń" - }, "alerts": { "unit_minutes_after": "min po" }, diff --git a/locales/rn/pt.json b/locales/rn/pt.json index b00d4a92..ed2d9851 100644 --- a/locales/rn/pt.json +++ b/locales/rn/pt.json @@ -6,10 +6,6 @@ "not_starred": "Sem estrela" }, "calendar": { - "agenda": { - "days_clear": "Os próximos {count} dias estão livres.", - "no_upcoming": "Nenhum evento próximo" - }, "alerts": { "unit_minutes_after": "minutos depois" }, diff --git a/locales/rn/ro.json b/locales/rn/ro.json index 63088213..e67177d4 100644 --- a/locales/rn/ro.json +++ b/locales/rn/ro.json @@ -6,10 +6,6 @@ "not_starred": "Fără stea" }, "calendar": { - "agenda": { - "days_clear": "Următoarele {count} de zile sunt libere.", - "no_upcoming": "Nu există evenimente viitoare" - }, "alerts": { "unit_minutes_after": "minute după" }, diff --git a/locales/rn/ru.json b/locales/rn/ru.json index ddfbef3b..a70eb3c0 100644 --- a/locales/rn/ru.json +++ b/locales/rn/ru.json @@ -6,10 +6,6 @@ "not_starred": "Без пометки" }, "calendar": { - "agenda": { - "days_clear": "В ближайшие {count} дн. событий нет.", - "no_upcoming": "Нет предстоящих событий" - }, "alerts": { "unit_minutes_after": "минут после" }, diff --git a/locales/rn/sk.json b/locales/rn/sk.json index f7ec1fad..cc8a2509 100644 --- a/locales/rn/sk.json +++ b/locales/rn/sk.json @@ -6,10 +6,6 @@ "not_starred": "Bez hviezdičky" }, "calendar": { - "agenda": { - "days_clear": "Nasledujúcich {count} dní je voľných.", - "no_upcoming": "Žiadne nadchádzajúce udalosti" - }, "alerts": { "unit_minutes_after": "min po" }, diff --git a/locales/rn/tr.json b/locales/rn/tr.json index f75e293b..3ea14237 100644 --- a/locales/rn/tr.json +++ b/locales/rn/tr.json @@ -6,10 +6,6 @@ "not_starred": "Yıldızsız" }, "calendar": { - "agenda": { - "days_clear": "Önümüzdeki {count} gün boş.", - "no_upcoming": "Yaklaşan etkinlik yok" - }, "alerts": { "unit_minutes_after": "dakika sonra" }, diff --git a/locales/rn/uk.json b/locales/rn/uk.json index 8a336e3b..98d54bf0 100644 --- a/locales/rn/uk.json +++ b/locales/rn/uk.json @@ -6,10 +6,6 @@ "not_starred": "Без зірочки" }, "calendar": { - "agenda": { - "days_clear": "У найближчі {count} дн. подій немає.", - "no_upcoming": "Немає майбутніх подій" - }, "alerts": { "unit_minutes_after": "хвилин після" }, diff --git a/locales/rn/zh-TW.json b/locales/rn/zh-TW.json index c1785eee..2015b8fc 100644 --- a/locales/rn/zh-TW.json +++ b/locales/rn/zh-TW.json @@ -6,10 +6,6 @@ "not_starred": "未加星號" }, "calendar": { - "agenda": { - "days_clear": "未來 {count} 天沒有活動。", - "no_upcoming": "沒有即將開始的活動" - }, "alerts": { "unit_minutes_after": "分鐘後" }, diff --git a/locales/rn/zh.json b/locales/rn/zh.json index 482e5905..d3bf708e 100644 --- a/locales/rn/zh.json +++ b/locales/rn/zh.json @@ -6,10 +6,6 @@ "not_starred": "无星标" }, "calendar": { - "agenda": { - "days_clear": "未来 {count} 天没有活动。", - "no_upcoming": "没有即将举行的活动" - }, "alerts": { "unit_minutes_after": "分钟后" }, diff --git a/scripts/rn-missing-translations.mjs b/scripts/rn-missing-translations.mjs index d7e4442f..b7dcfae7 100644 --- a/scripts/rn-missing-translations.mjs +++ b/scripts/rn-missing-translations.mjs @@ -4,10 +4,13 @@ // node scripts/rn-missing-translations.mjs count per language // node scripts/rn-missing-translations.mjs de the missing keys with their // English text, as nested JSON +// node scripts/rn-missing-translations.mjs --prune +// drop translated keys English +// no longer has // // Keys the vendored webmail catalog of that language already carries are not // listed: they are translated there. -import { readFileSync, readdirSync } from 'node:fs'; +import { readFileSync, readdirSync, writeFileSync } from 'node:fs'; import { join, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -40,12 +43,26 @@ function missingFor(lang, en) { const en = flatten(readJson(join(RN, 'en.json'))); const lang = process.argv[2]; +const langs = readdirSync(RN).filter((f) => f.endsWith('.json') && f !== 'en.json').map((f) => f.slice(0, -5)); -if (lang) { +if (lang === '--prune') { + for (const l of langs.sort()) { + const path = join(RN, `${l}.json`); + const kept = {}; + let dropped = 0; + for (const [key, value] of flatten(readJson(path))) { + if (en.has(key)) setDeep(kept, key, value); + else dropped++; + } + if (dropped) { + writeFileSync(path, `${JSON.stringify(kept, null, 2)}\n`); + console.log(`${l.padEnd(6)} dropped ${dropped}`); + } + } +} else if (lang) { const out = {}; for (const [key, value] of missingFor(lang, en)) setDeep(out, key, value); console.log(JSON.stringify(out, null, 2)); } else { - const langs = readdirSync(RN).filter((f) => f.endsWith('.json') && f !== 'en.json').map((f) => f.slice(0, -5)); for (const l of langs.sort()) console.log(`${l.padEnd(6)} ${missingFor(l, en).length} of ${en.size} missing`); }