feat(core): add built-in locale packs and lazy loadLocale#1590
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 25, 2026
0da2fa9 to
08a4f50
Compare
08a4f50 to
98c82df
Compare
98c82df to
66f0283
Compare
66f0283 to
33113b0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be7c182. Configure here.
c6aa9d3 to
fe7b46e
Compare
This was referenced Jun 17, 2026
909a9d8 to
bf72f98
Compare
fe7b46e to
f579d71
Compare
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Use a parametric timeRemainingPhrase key so locales control full remaining time word order; formatDuration accepts formatRemaining instead of translate. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 7139b92)
Ship v8-parity locale packs with codegen for loadLocale, platform re-exports, CDN locale stubs, and workspace consistency checks. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 6fc0451)
Map lowercase BCP 47 tags from localeLookupChain to canonical loader keys so regional packs like pt-BR and zh-TW load correctly. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit a9eced9)
Use sentence case for liveBadge (skins uppercase via CSS), replace legacy Video.js Progress mappings with seek slider labels, and add timeRemainingPhrase to every shipped locale. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit d669ff4)
Replace legacy compound live-button strings, wrong exit-fullscreen labels, and noun-only caption toggles with short aria-label copy aligned to how LiveButtonCore and CaptionsButtonCore use each key. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 9abcdc9)
Use canonicalLocaleRegistryKey for lazy loader lookup so tags like zh-CN-u-nu-hans match shipped packs the same way as the registry. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 6e7c966)
Generated CDN locale files import registerI18n from this module, which maps to the shared i18n.js bundle via the CDN build plugin. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 5319847)
Locale copy fixes live in the locale pack files directly; the one-off override catalog is not needed in the repo. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 5643f9f)
Regional tags such as es-MX now lazy-load the nearest shipped base pack instead of requiring an exact loader match. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit f579d71)
472666f to
f6ce653
Compare
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (10)
Players (5)
Skins (30)
UI Components (38)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (9)
Skins (27)
UI Components (32)
Sizes are marginal over the root entry point. 🧩 @videojs/core
Entries (67)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Refs #222
Closes #1368
Closes #1369
Summary
Ships v8-parity built-in locale packs (~50 languages) with codegen for lazy
loadLocale, platform re-exports, CDN locale stubs, and workspace consistency checks.Changes
.tspacks +all.tsaggregator in@videojs/core/i18n/localesbuilt-in-locales.ts,load-locale.ts(codegen), andgenerate-i18n-locales.tsscriptcheck:workspacei18n locale consistency checkStack info
PR 2 of 5 — stacks on #1589 (core foundation).
Testing
pnpm -F @videojs/core build pnpm -F @videojs/core test src/core/i18n/tests/load-locale.test.ts pnpm check:workspaceMade with Cursor
Note
Medium Risk
Large additive i18n surface (many locale files and generated outputs);
loadLocaleand lookup-chain behavior affect runtime translations but are covered by tests and mostly data/codegen.Overview
Adds v8-parity built-in locale packs (~50 languages) in
@videojs/core, with a single source of truth inbuilt-in-locales.tsand codegen (generate-i18n-locales.ts) that runs onprebuildto refreshload-locale.ts,locales/all.ts, and generated re-exports under html and react.loadLocaleis exported from@videojs/core/i18n: it lazy-imports shipped packs when nothing is already registered, walkinglocaleLookupChain(regional tags, casing, Unicode extensions).canonicalLocaleRegistryKeyis now public for that normalization.Build & tooling:
tsdownbundles every locale entry;check:workspacegains an i18n locales check; HTML gets a CDN locale stub generator. Types widenBuiltInLocalebeyonden. Tests coverloadLocalebehavior.Reviewed by Cursor Bugbot for commit fe7b46e. Bugbot is set up for automated code reviews on this repo. Configure here.