mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
i18n(doctor-report): EN + DE strings for section toggles
This commit is contained in:
1 parent
81b1d79232
commit
64d50fd32e
1 file changed
+30
@@ -65,6 +65,36 @@ describe("doctor-report dialog — i18n contract", () => {
|
||||
expect(typeof dialog![key]).toBe("string");
|
||||
}
|
||||
});
|
||||
|
||||
// v1.4.25 W6c — per-section toggle strings.
|
||||
it(`exposes every doctor-report section-toggle key in ${locale}.json`, () => {
|
||||
const messages = loadMessages(locale);
|
||||
const root = messages.doctorReport as Record<string, unknown> | undefined;
|
||||
const sections = root!.sections as Record<string, unknown> | undefined;
|
||||
expect(
|
||||
sections,
|
||||
`doctorReport.sections missing in ${locale}.json`,
|
||||
).toBeDefined();
|
||||
const sectionKeys = [
|
||||
"title",
|
||||
"bp",
|
||||
"weight",
|
||||
"pulse",
|
||||
"bmi",
|
||||
"mood",
|
||||
"moodSensitive",
|
||||
"compliance",
|
||||
"sleep",
|
||||
"empty",
|
||||
];
|
||||
for (const key of sectionKeys) {
|
||||
expect(
|
||||
sections![key],
|
||||
`doctorReport.sections.${key} missing in ${locale}.json`,
|
||||
).toBeTruthy();
|
||||
expect(typeof sections![key]).toBe("string");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
it("EN dialog uses the expected English title + 90d preset", () => {
|
||||
|
||||
Reference in new issue
Block a user