You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Medium Risk
Large, user-facing change to labels and accessibility across controls and many locales; risk is mitigated by tests, codegen checks, and restoring previously reviewed design, but regressions in string keys or locale loading would affect all skins.
Overview
Restores the Video.js 10 i18n stack that was reverted from main: a new @videojs/core/i18n entry with a global registry, typed createTranslator, loadLocale lazy imports, 50+ shipped locale packs (v8 parity), and optional Chrome Translator API fallback (getBrowserTranslations / shouldAttemptBrowserTranslation).
Codegen & CI:generate-i18n-locales.ts runs on @videojs/coreprebuild, regenerating locales/all.ts, load-locale.ts, and html/react locale re-export stubs; check-workspace gains an i18n locales consistency check. package.json adds ./i18n and ./i18n/locales/* exports and marks the registry as a side effect.
Player copy: English defaults live in locales/en.ts with an expanded key set (live/cast, sliders, indicators, error dialog, timeRemainingPhrase, etc.). UI cores (e.g. captions/cast and others in the diff) now expose opaque label keys via resolveOptionalControlLabel instead of hardcoded English; related tests and internal/design/i18n.md are updated to implemented status and document provider merge order, tooltips, and loadLocale.
Reviewed by Cursor Bugbot for commit 3d1a240. Bugbot is set up for automated code reviews on this repo. Configure here.
The reason will be displayed to describe this comment to others. Learn more.
sideEffects omits bundled i18n entry
Medium Severity
sideEffects only lists **/i18n/registry.js, but the published @videojs/core/i18n entry is a single i18n bundle that inlines registry.ts (including pre-registering en). Bundlers that honor sideEffects may tree-shake away registry initialization when consumers import named exports from @videojs/core/i18n, leaving translations without the English base layer.
The reason will be displayed to describe this comment to others. Learn more.
Workspace check crashes missing locale dirs
Low Severity
Check 7 calls readdirSync on packages/html/src/i18n/locales and packages/react/src/i18n/locales without verifying those directories exist. If locale stubs were not generated yet, pnpm check:workspace throws instead of reporting a clear warning like the per-file existsSync checks above.
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
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 #1589
Refs #1590
Summary
Restores the combined i18n foundation and locale-pack work from the two accidentally merged PRs after #1707 reverted them out of main.
feat/i18nwill be the feature branch the other stacked PRs merge into and this PR will be used to merge the whole feature intomain:main← #1708
feat/i18n← #1591
feat/i18n-html← #1595
feat/i18n-react← #1593
feat/i18n-sandbox← #1600
docs/i18nNote
Medium Risk
Large, user-facing change to labels and accessibility across controls and many locales; risk is mitigated by tests, codegen checks, and restoring previously reviewed design, but regressions in string keys or locale loading would affect all skins.
Overview
Restores the Video.js 10 i18n stack that was reverted from main: a new
@videojs/core/i18nentry with a global registry, typedcreateTranslator,loadLocalelazy imports, 50+ shipped locale packs (v8 parity), and optional Chrome Translator API fallback (getBrowserTranslations/shouldAttemptBrowserTranslation).Codegen & CI:
generate-i18n-locales.tsruns on@videojs/coreprebuild, regeneratinglocales/all.ts,load-locale.ts, and html/react locale re-export stubs;check-workspacegains an i18n locales consistency check.package.jsonadds./i18nand./i18n/locales/*exports and marks the registry as a side effect.Player copy: English defaults live in
locales/en.tswith an expanded key set (live/cast, sliders, indicators, error dialog,timeRemainingPhrase, etc.). UI cores (e.g. captions/cast and others in the diff) now expose opaque label keys viaresolveOptionalControlLabelinstead of hardcoded English; related tests andinternal/design/i18n.mdare updated to implemented status and document provider merge order, tooltips, andloadLocale.Reviewed by Cursor Bugbot for commit 3d1a240. Bugbot is set up for automated code reviews on this repo. Configure here.