mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
Merge branch 'pr-1322' into review/pr-1322
This commit is contained in:
commit
3e2e2ad56b
58 files changed
+14939
-25
No files matched your search
@@ -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 nine shipped locales", () => {
|
||||
it("covers all ten shipped locales", () => {
|
||||
// A floor: an empty locale list would make the loop below assert nothing.
|
||||
expect(locales.length).toBe(9);
|
||||
expect(locales.length).toBe(10);
|
||||
});
|
||||
|
||||
for (const locale of locales) {
|
||||
|
||||
@@ -93,6 +93,7 @@ describe("CoachReadStrip — the latest reading's day", () => {
|
||||
ko: "10월 1일",
|
||||
pl: "1 października",
|
||||
"pt-BR": "1 de outubro",
|
||||
ru: "1 октября",
|
||||
};
|
||||
for (const [locale, date] of Object.entries(expected) as Array<
|
||||
[Locale, string]
|
||||
|
||||
@@ -41,7 +41,7 @@ const REQUIRED_KEYS = [
|
||||
];
|
||||
|
||||
describe("measurement-reminder + bulk-share dynamic i18n keys", () => {
|
||||
it("discovers all nine shipped locales", () => {
|
||||
it("discovers all ten shipped locales", () => {
|
||||
expect(LOCALES.map((l) => l.locale).sort()).toEqual([
|
||||
"de",
|
||||
"en",
|
||||
@@ -52,6 +52,7 @@ describe("measurement-reminder + bulk-share dynamic i18n keys", () => {
|
||||
"nl",
|
||||
"pl",
|
||||
"pt-BR",
|
||||
"ru",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "@/lib/integrations/connection-health";
|
||||
|
||||
import de from "../../../../../messages/de.json";
|
||||
import ru from "../../../../../messages/ru.json";
|
||||
import en from "../../../../../messages/en.json";
|
||||
import es from "../../../../../messages/es.json";
|
||||
import fr from "../../../../../messages/fr.json";
|
||||
@@ -36,6 +37,7 @@ const CATALOGS: Record<Locale, unknown> = {
|
||||
nl,
|
||||
ko,
|
||||
"pt-BR": ptBR,
|
||||
ru: ru,
|
||||
};
|
||||
|
||||
function translator(locale: Locale) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { de, enUS, es, fr, it, ko, nl, pl, ptBR } from "date-fns/locale";
|
||||
import { de, enUS, es, fr, it, ko, nl, pl, ptBR, ru } from "date-fns/locale";
|
||||
import type { Locale as DateFnsLocale } from "date-fns";
|
||||
|
||||
import type { Locale } from "@/lib/i18n/config";
|
||||
@@ -27,6 +27,8 @@ export function resolveDateFnsLocale(locale: Locale): DateFnsLocale {
|
||||
return nl;
|
||||
case "pt-BR":
|
||||
return ptBR;
|
||||
case "ru":
|
||||
return ru;
|
||||
default:
|
||||
return enUS;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user