feat(html): add i18n provider and wire controls#1591
Open
sampotts wants to merge 10 commits into
Open
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
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 2ecd3b9. Configure here.
66f0283 to
33113b0
Compare
fe7b46e to
f579d71
Compare
472666f to
f6ce653
Compare
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
📦 Bundle Size Report🎨 @videojs/html
Presets (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 — no changesEntries (68)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretJS sizes are initial static graph totals (minified + brotli). Lazy dynamic chunks are shown separately when present.
Run |
Add createI18n with ambient lang inheritance, browser translation fallback, default loadLocale, I18nController/TextMixin, and translated labels across HTML UI. Co-authored-by: Cursor <cursoragent@cursor.com>
Wrap store provider mixins with I18nProviderMixin so ambient lang inheritance and lazy locale loading apply to default skins without manual wrappers. Co-authored-by: Cursor <cursoragent@cursor.com>
CDN create-i18n imports loadLocale from the i18n bundle; re-export it so sandbox and CDN builds resolve the symbol. Co-authored-by: Cursor <cursoragent@cursor.com>
Compose i18n provider onto SkinElement, resolve playback-rate tooltips via getResolvedLabel, and normalize CDN i18n entry paths on Windows. Co-authored-by: Cursor <cursoragent@cursor.com>
Re-check lazy-load sequence after getBrowserTranslations resolves so a superseded locale cannot register browser translations globally. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep tooltip copy visible before media state attaches by translating the trigger label when getResolvedLabel returns undefined. Co-authored-by: Cursor <cursoragent@cursor.com>
Use formatRemaining with the parametric timeRemainingPhrase template instead of the removed remainingTimeSuffix key. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds integration coverage that play button aria-label updates when document.documentElement.lang changes and the i18n provider has no explicit lang attribute. Co-authored-by: Cursor <cursoragent@cursor.com>
Use mergeLocaleOverlays loadedTags instead of merged overlay so English-only lazy merges no longer block browser translation fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
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 #1365
Closes #1367
Summary
Adds the HTML i18n layer with ambient
<html lang>inheritance, browser translation fallback, defaultloadLocale, and translated labels across web component controls.Changes
createI18n()—I18nController,ProviderMixin,TextMixin,<media-i18n-provider>,<media-text>aria-labels and tooltips viaI18nController@videojs/html/i18nand@videojs/html/cdn/i18nStack info
PR 3 of 5 — stacks on locale packs PR.
Testing
pnpm -F @videojs/html build pnpm -F @videojs/html test src/i18nMade with Cursor
Note
Medium Risk
Touches many player UI and accessibility strings across skins and controls; async locale/browser loading adds edge cases, though covered by new tests.
Overview
Adds an HTML i18n layer on top of
@videojs/core/i18n:createI18n()exposes Lit context,I18nController, provider/text mixins, and registers<media-i18n-provider>/<media-text>. Locale resolution follows explicitlang, ambient<html lang>, lazy shipped locale packs, registry overlays, and optional browser translation (with sequence guards on async loads).Players and
SkinElementare wrapped withI18nProviderMixinso skins and controls share a translator. UI elements consumeI18nControllerand useresolveControlAttrs/resolveControlLabelfor translatedaria-labels, tooltips, error-dialog copy, time remaining phrases, and input-indicator labels. Skin templates drop hardcoded error-dialog strings in favor of runtime-filled elements.Packaging & CDN: new
@videojs/html/i18nand locale export paths,build:cdnruns locale generation pluscdnI18nExternalPlugin(sharedi18n.json jsDelivr in prod, relative in dev), and the video CDN entry pulls indefine/i18n.Reviewed by Cursor Bugbot for commit 85e56ff. Bugbot is set up for automated code reviews on this repo. Configure here.