feat(sandbox): add i18n demos and e2e coverage#1593
Open
sampotts wants to merge 14 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 25, 2026
3e339d1 to
9ded52e
Compare
9ded52e to
f0925b2
Compare
f0925b2 to
b7fead7
Compare
b7fead7 to
9f2c8ce
Compare
9f2c8ce to
bf657c7
Compare
bf657c7 to
304599e
Compare
304599e to
5221ff6
Compare
5221ff6 to
e210fe0
Compare
1c82614 to
f429bf7
Compare
99aff95 to
07c5ff8
Compare
f429bf7 to
27e96f0
Compare
07c5ff8 to
14093e8
Compare
4f43963 to
a5863f8
Compare
14093e8 to
69ce7cd
Compare
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (10)
Players (5)
Skins (30)
UI Components (39)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (9)
Skins (27)
UI Components (33)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (69)
🏷️ @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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 2a4c08d. Configure here.
mihar-22
approved these changes
Jul 2, 2026
Wire locale switching across HTML, React, and CDN sandbox presets with shared locale helpers, browser-only locale prefetch, and i18n e2e tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep postMessage-driven toggles from forcing a cache-busted iframe reload when autoplay, muted, or other shell controls change. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the templates/cdn index override that produced an invalid relative chunk path under Vite 8; setup already mirrors templates into src/cdn. Co-authored-by: Cursor <cursoragent@cursor.com>
Serialize overlapping HTML/CDN locale updates, validate locale only in shared listeners, and remove the vite e2e spec that referenced a missing page. Co-authored-by: Cursor <cursoragent@cursor.com>
Track the previous locale so the CDN preview only cache-busts when locale actually changes, not on the initial effect run. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the readyLocale gate so locale switches and browser prefetch failures no longer unmount the player preview. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Update preview iframe src when locale changes so embedded reloads keep the selected language, not just the initial URL param. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the misplaced "Media utilities" comment above the i18n re-exports. Co-authored-by: Cursor <cursoragent@cursor.com>
…locale Stop pinning lang on media-i18n-provider and I18nProvider locale props so document.documentElement.lang and the locale picker both drive i18n through the ambient observer as documented. 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 #1594
Summary
Adds locale switching to all sandbox presets (HTML, React, CDN) with shared helpers and e2e tests verifying translated control labels.
Changes
locale=esStack info
PR 5 of 5 — stacks on React i18n PR. Final PR in the i18n stack.
Testing
Note
Medium Risk
Broad sandbox and Vite resolver changes around CDN i18n registries and template mirroring could affect local dev behavior; production player packages are largely untouched aside from a React package export re-export.
Overview
Adds locale switching across the sandbox shell and every HTML, React, and CDN preset, plus Playwright checks that Spanish (
locale=es) shows Reproducir on the play control.The shell gains a Language control in player settings (built-in packs vs Chrome Translator–only tags), keeps
localein the URL, and broadcastslocale-changeto the preview iframe; CDN previews reload on locale change so chunks load cleanly.Shared helpers load packs via
@videojs/html/i18n(HTML/React) or@videojs/html/cdn/i18nand locale chunks (CDN), with optional browser translation prefetch. HTML templates wrap players inmedia-i18n-provider; React presets useSandboxI18nProvider. Vite plugins synctemplates/→src/and force a single CDN i18n registry in dev. Setup now regenerates CDN locale loaders and overwrites differing mirrored files from templates.Reviewed by Cursor Bugbot for commit b64cc38. Bugbot is set up for automated code reviews on this repo. Configure here.