Merge branch 'pr839tmp' into feat/korean-locale

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Marc-André Bombeck committed 2026-08-28 21:59:36 +02:00
commit 6ff81b2717
74 files changed
+10848 -66

No files matched your search

@@ -202,7 +202,7 @@ describe("dashboard.*Short keys exist across all six locales", () => {
// Resolved at test time so the assertion runs against the current
// bundle, not a stale cached snapshot.
const locales = ["en", "de", "fr", "es", "it", "pl"] as const;
const locales = ["en", "de", "fr", "es", "it", "pl", "ko"] as const;
it.each(locales)("%s carries every dashboard.*Short key", async (locale) => {
const messages = (await import(`../../../../messages/${locale}.json`))
@@ -223,9 +223,9 @@ const FULL_RECORD = {
const DOTTED_KEY = /\b[a-z][A-Za-z0-9]*(\.[A-Za-z0-9_]+){2,}\b/g;
describe("<ClinicianView> resolves every label in every locale", () => {
it("covers all six shipped locales", () => {
it("covers all seven shipped locales", () => {
// A floor: an empty locale list would make the loop below assert nothing.
expect(locales.length).toBe(6);
expect(locales.length).toBe(7);
});
for (const locale of locales) {
@@ -15,7 +15,7 @@ import { useTranslations } from "@/lib/i18n/context";
* but the prose has not been hand-reviewed for register, regional
* vocabulary, or domain-specific nuance.
*
* This banner renders ONLY on non-maintained locales (FR/ES/IT/PL
* This banner renders ONLY on non-maintained locales (FR/ES/IT/PL/KO
* today) and surfaces a small, dismissible strip at the top of the
* authenticated app shell. It tells the user the translation is
* AI-maintained and links to the GitHub translation-feedback issue
@@ -66,7 +66,7 @@ describe("<OfflineBanner>", () => {
});
it("ships the message key in every supported locale", () => {
for (const locale of ["en", "de", "fr", "es", "it", "pl"] as const) {
for (const locale of ["en", "de", "fr", "es", "it", "pl", "ko"] as const) {
const m = loadMessages(locale);
expect(m.offlineBanner.message.length, locale).toBeGreaterThan(0);
}
@@ -41,13 +41,14 @@ const REQUIRED_KEYS = [
];
describe("measurement-reminder + bulk-share dynamic i18n keys", () => {
it("discovers all six shipped locales", () => {
it("discovers all seven shipped locales", () => {
expect(LOCALES.map((l) => l.locale).sort()).toEqual([
"de",
"en",
"es",
"fr",
"it",
"ko",
"pl",
]);
});
@@ -71,7 +71,7 @@ export interface NaturalLanguageExtractorProps {
* UI locale forwarded to the route as a hint. The route accepts an
* undefined value and falls back to the resolver chain.
*/
locale?: "en" | "de" | "es" | "fr" | "it" | "pl";
locale?: "en" | "de" | "es" | "fr" | "it" | "pl" | "ko";
/**
* Optional override of the API path so the wizard test harness can
* point at a mock server. Defaults to the production route.
@@ -108,7 +108,7 @@ describe("<ImportPanel> — SSR smoke", () => {
});
describe("<AppleHealthEstimateWarning>", () => {
it.each(["en", "de", "es", "fr", "it", "pl"] as const)(
it.each(["en", "de", "es", "fr", "it", "pl", "ko"] as const)(
"renders localized estimate disclosure for %s",
(locale) => {
const html = render(<AppleHealthEstimateWarning days={3} />, locale);
@@ -7,7 +7,7 @@ import { ALL_METRICS } from "@/lib/validations/thresholds";
import { ManagedRecordSettingsForm } from "../managed-record-settings-section";
const LOCALES = ["de", "en", "es", "fr", "it", "pl"] as const;
const LOCALES = ["de", "en", "es", "fr", "it", "pl", "ko"] as const;
const render = (
family: Parameters<typeof ManagedRecordSettingsForm>[0]["family"],
@@ -276,7 +276,7 @@ describe("the managed-profile card, in the shared-access section", () => {
/<select[^>]*data-slot="managed-profile-locale"[\s\S]*?<\/select>/
.exec(html)?.[0]
.match(/<option/g) ?? [];
expect(options).toHaveLength(6);
expect(options).toHaveLength(7);
});
it("lists the profiles this account looks after, and only those", () => {
@@ -218,7 +218,7 @@ describe("<AppleHealthCard>", () => {
}
});
it.each(["en", "de", "es", "fr", "it", "pl"] as const)(
it.each(["en", "de", "es", "fr", "it", "pl", "ko"] as const)(
"renders localized Apple Health copy for %s without leaking keys",
(locale) => {
statusPayload = {
@@ -400,7 +400,7 @@ function ProfileSettingsForm({
<option value="">
{t("settings.sharedRecord.managedSettings.profile.systemDefault")}
</option>
{["de", "en", "es", "fr", "it", "pl"].map((locale) => (
{["de", "en", "es", "fr", "it", "pl", "ko"].map((locale) => (
<option key={locale} value={locale}>
{locale}
</option>
+3 -1
View File
@@ -3,7 +3,7 @@
import * as React from "react";
import { CalendarIcon } from "lucide-react";
import type { Matcher } from "react-day-picker";
import { de, enUS, es, fr, it, pl } from "date-fns/locale";
import { de, enUS, es, fr, it, ko, pl } from "date-fns/locale";
import type { Locale as DateFnsLocale } from "date-fns";
import { cn } from "@/lib/utils";
@@ -325,6 +325,8 @@ function resolveDateFnsLocale(
return it;
case "pl":
return pl;
case "ko":
return ko;
default:
return enUS;
}