mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
revert(core): unmerge i18n stack base (#1707)
Co-authored-by: Wesley Luyten <me@wesleyluyten.com>
This commit is contained in:
co-authored by
Wesley Luyten
parent
f0f9eed544
commit
edfec1c93e
@@ -1,20 +0,0 @@
|
||||
import { mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { SHIPPED_LOCALE_TAGS } from '../../core/src/core/i18n/built-in-locales.ts';
|
||||
|
||||
const REGISTRY = '@videojs/html/cdn/i18n-registry';
|
||||
const outDir = resolve(dirname(fileURLToPath(import.meta.url)), '../src/cdn/locales');
|
||||
const tags = SHIPPED_LOCALE_TAGS;
|
||||
|
||||
mkdirSync(outDir, { recursive: true });
|
||||
|
||||
for (const tag of tags) {
|
||||
const body = `import { registerI18n } from '${REGISTRY}';
|
||||
import translations from '@videojs/core/i18n/locales/${tag}';
|
||||
|
||||
registerI18n('${tag}', translations);
|
||||
`;
|
||||
writeFileSync(resolve(outDir, `${tag}.ts`), body);
|
||||
}
|
||||
Reference in New Issue
Block a user