feat(i18n): convert to opaque keys (#1848)

This commit is contained in:
Sam Potts
2026-07-28 16:46:25 +10:00
committed by GitHub
parent be89470447
commit a3e673bd68
221 changed files with 7040 additions and 4307 deletions
@@ -35,8 +35,8 @@ export async function ensureCdnSandboxLocale(tag: SandboxLocaleTag): Promise<voi
await load();
if (import.meta.env.DEV) {
const registered = getI18nTranslations(tag).Play;
const enPlay = getI18nTranslations('en').Play;
const registered = getI18nTranslations(tag)['buttons.play'];
const enPlay = getI18nTranslations('en')['buttons.play'];
if (registered === enPlay) {
throw new Error(
`[videojs/sandbox] Locale "${tag}" did not register on the CDN i18n registry (still "${enPlay}").`
+1 -1
View File
@@ -89,7 +89,7 @@ async function syncCdnI18nProvider(tag: SandboxLocaleTag, seq: number): Promise<
if (!import.meta.env.DEV || tag === 'en') return;
if (!document.querySelector('media-play-button')) return;
const expected = getI18nTranslations(tag).Play;
const expected = getI18nTranslations(tag)['buttons.play'];
const playLabel = await waitForCdnPlayLabel(expected);
if (seq !== localeApplySeq) return;