mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(i18n): convert to opaque keys (#1848)
This commit is contained in:
@@ -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}").`
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user