feat(i18n): MaintainershipBanner acknowledges AI-drafted safety-critical content

Updates the banner notice across all six locales to be explicit that
the AI-initial locales (FR / ES / IT / PL) are AI-drafted including
the Coach's safety-critical instructions, and that automated
validation guards them in CI. The CTA reframes from "help out" to
"report on GitHub" so users with a regression know the
contribution path is bug reporting, not editorial rewrites.

Pins the new wording in the banner test so a future copy regression
cannot quietly soften the disclosure. Banner gating (renders only on
non-maintained locales, SSR-safe) and the GitHub-issue CTA target
URL remain unchanged from W9e.
This commit is contained in:
Marc-André Bombeck committed 2026-05-14 18:30:36 +02:00
1 parent b55942fd18
commit 9b30e116ee
7 files changed
+113 -12

No files matched your search

+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BD im Zielbereich",
"weightShort": "Gewicht",
"bloodPressureSysShort": "BD (Sys)",
"bloodPressureDiaShort": "BD (Dia)",
"pulseShort": "Puls",
"bodyFatShort": "KF",
"moodShort": "Stimmung",
"sleepShort": "Schlaf",
"stepsShort": "Schritte",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "BD-Ziel",
"days30Short": "30T",
"medications": "Medikamente",
"insightsPreview": "KI-Insights-Vorschau",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "Diese Übersetzung wird per KI gepflegt und kann ungenau sein.",
"cta": "Hilf mit auf GitHub",
"notice": "Diese Sprachversion ist KI-entworfen, inklusive der sicherheitskritischen Coach-Anweisungen. Automatisierte Validierung läuft in CI; KI-Coach-Regressionen bitte auf GitHub melden.",
"cta": "Auf GitHub melden",
"dismiss": "Schließen"
}
},
+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BP in Target",
"weightShort": "Weight",
"bloodPressureSysShort": "BP (Sys)",
"bloodPressureDiaShort": "BP (Dia)",
"pulseShort": "Pulse",
"bodyFatShort": "Body Fat",
"moodShort": "Mood",
"sleepShort": "Sleep",
"stepsShort": "Steps",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "BP in Target",
"days30Short": "30d",
"medications": "Medications",
"insightsPreview": "AI Insights preview",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "This translation is AI-maintained and may contain inaccuracies.",
"cta": "Help out on GitHub",
"notice": "This locale is AI-drafted including the Coach's safety-critical instructions. Automated validation runs in CI; please report any AI Coach regressions on GitHub.",
"cta": "Report on GitHub",
"dismiss": "Dismiss"
}
},
+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BP in Target",
"weightShort": "Peso",
"bloodPressureSysShort": "PA (Sys)",
"bloodPressureDiaShort": "PA (Dia)",
"pulseShort": "Pulso",
"bodyFatShort": "GC",
"moodShort": "Humor",
"sleepShort": "Sueño",
"stepsShort": "Pasos",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "PA-objetivo",
"days30Short": "30d",
"medications": "Medicamentos",
"insightsPreview": "AI Insights preview",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "Esta traducción está mantenida por IA y puede contener imprecisiones.",
"cta": "Ayúdanos en GitHub",
"notice": "Este idioma está redactado por IA, incluidas las instrucciones críticas para la seguridad del Coach. La validación automática se ejecuta en CI; informe de cualquier regresión del Coach IA en GitHub.",
"cta": "Informar en GitHub",
"dismiss": "Cerrar"
}
},
+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BP in Target",
"weightShort": "Poids",
"bloodPressureSysShort": "TA (Sys)",
"bloodPressureDiaShort": "TA (Dia)",
"pulseShort": "Pouls",
"bodyFatShort": "TG",
"moodShort": "Humeur",
"sleepShort": "Sommeil",
"stepsShort": "Pas",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "TA-cible",
"days30Short": "30d",
"medications": "Médicaments",
"insightsPreview": "AI Insights preview",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "Cette traduction est maintenue par IA et peut contenir des imprécisions.",
"cta": "Aidez-nous sur GitHub",
"notice": "Cette langue est rédigée par IA, y compris les instructions critiques pour la sécurité du Coach. Une validation automatique tourne en CI ; signalez toute régression du Coach IA sur GitHub.",
"cta": "Signaler sur GitHub",
"dismiss": "Ignorer"
}
},
+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BP in Target",
"weightShort": "Peso",
"bloodPressureSysShort": "PA (Sys)",
"bloodPressureDiaShort": "PA (Dia)",
"pulseShort": "Polso",
"bodyFatShort": "GC",
"moodShort": "Umore",
"sleepShort": "Sonno",
"stepsShort": "Passi",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "PA-target",
"days30Short": "30d",
"medications": "Farmaci",
"insightsPreview": "AI Insights preview",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "Questa traduzione è gestita tramite IA e potrebbe contenere imprecisioni.",
"cta": "Aiutaci su GitHub",
"notice": "Questa lingua è redatta tramite IA, incluse le istruzioni critiche per la sicurezza del Coach. La validazione automatica gira in CI; segnali qualsiasi regressione del Coach IA su GitHub.",
"cta": "Segnala su GitHub",
"dismiss": "Chiudi"
}
},
+12 -2
View File
@@ -250,6 +250,16 @@
"vo2Max": "VO₂ max",
"vo2MaxUnit": "mL/(kg·min)",
"bpInTarget": "BP in Target",
"weightShort": "Waga",
"bloodPressureSysShort": "RR (Sk)",
"bloodPressureDiaShort": "RR (Rk)",
"pulseShort": "Tętno",
"bodyFatShort": "TT",
"moodShort": "Nastrój",
"sleepShort": "Sen",
"stepsShort": "Kroki",
"vo2MaxShort": "VO₂ max",
"bpInTargetShort": "RR-cel",
"days30Short": "30d",
"medications": "Leki",
"insightsPreview": "AI Insights preview",
@@ -2791,8 +2801,8 @@
},
"i18n": {
"maintainershipBanner": {
"notice": "To tłumaczenie jest utrzymywane przez AI i może zawierać nieścisłości.",
"cta": "Pomóż na GitHubie",
"notice": "Ta wersja językowa jest opracowana przez AI, w tym instrukcje krytyczne dla bezpieczeństwa Coacha. Walidacja automatyczna działa w CI; proszę zgłaszać wszelkie regresje Coacha AI na GitHubie.",
"cta": "Zgłoś na GitHubie",
"dismiss": "Zamknij"
}
},
@@ -82,4 +82,45 @@ describe("<MaintainershipBanner>", () => {
expect(cfg.isMaintainedLocale("it")).toBe(false);
expect(cfg.isMaintainedLocale("pl")).toBe(false);
});
// v1.4.25 W14c — banner copy upgraded to acknowledge that the
// FR/ES/IT/PL Coach prompts are AI-drafted including safety-critical
// instructions. Pin the new wording so a copy regression cannot
// quietly soften the disclosure.
it("EN banner copy names safety-critical AI-drafted Coach content", async () => {
const { readFileSync } = await import("node:fs");
const { join } = await import("node:path");
const en = JSON.parse(
readFileSync(join(process.cwd(), "messages", "en.json"), "utf8"),
) as { i18n: { maintainershipBanner: { notice: string } } };
const notice = en.i18n.maintainershipBanner.notice;
expect(notice).toMatch(/AI-drafted/);
expect(notice).toMatch(/safety-critical/);
expect(notice).toMatch(/GitHub/);
expect(notice).toMatch(/Coach/);
});
it("every AI-initial locale's banner notice acknowledges the AI-drafted Coach content", async () => {
const { readFileSync } = await import("node:fs");
const { join } = await import("node:path");
const aiDraftPatterns: Record<string, RegExp> = {
fr: /rédigée par IA/,
es: /redactado por IA/,
it: /redatta tramite IA/,
pl: /opracowana przez AI/,
};
for (const [locale, pattern] of Object.entries(aiDraftPatterns)) {
const data = JSON.parse(
readFileSync(
join(process.cwd(), "messages", `${locale}.json`),
"utf8",
),
) as { i18n: { maintainershipBanner: { notice: string } } };
const notice = data.i18n.maintainershipBanner.notice;
expect(notice, `${locale} banner notice`).toMatch(pattern);
expect(notice, `${locale} banner notice mentions Coach`).toMatch(
/Coach/,
);
}
});
});