import { describe, expect, it } from "vitest"; import {
DEFAULT_LOCALE,
SUPPORTED_LOCALES,
loadLazyLocaleTranslation,
resolveNavigatorLocale,
} from "../../ui/src/i18n/lib/registry.ts"; import type { TranslationMap } from "../../ui/src/i18n/lib/types.ts";
function getNestedTranslation(map: TranslationMap | null, ...path: string[]): string | undefined {
let value: string | TranslationMap | undefined = map ?? undefined; for (const key of path) { if (value === undefined || typeof value === "string") { return undefined;
}
value = value[key];
} returntypeof value === "string" ? value : undefined;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.