feat(packages): add built-in locale packs with v8 parity#1566
feat(packages): add built-in locale packs with v8 parity#1566sampotts wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
07f598b to
56466e2
Compare
9f2dc4e to
63898ce
Compare
56466e2 to
aa63876
Compare
395fc2f to
3f036bb
Compare
aa63876 to
eeb7263
Compare
3f036bb to
ff04df3
Compare
ff04df3 to
6401cdb
Compare
2946154 to
a9ebb9f
Compare
6401cdb to
311a1a6
Compare
a9ebb9f to
1e9229b
Compare
311a1a6 to
470a768
Compare
| startCasting: 'Übertragung starten', | ||
| stopCasting: 'Übertragung beenden', |
There was a problem hiding this comment.
| startCasting: 'Übertragung starten', | |
| stopCasting: 'Übertragung beenden', | |
| startCasting: 'Streamen', | |
| stopCasting: 'Streamen beenden', |
Chrome's UI used to use übertragen for casting, but settled on streamen a while back.
| startCasting: 'Übertragung starten', | ||
| stopCasting: 'Übertragung beenden', | ||
| connectingCast: 'Verbinden', | ||
| seek: 'Status', |
There was a problem hiding this comment.
v8 has "Status" for "Progress", but this probably isn't right if the English is "seek". How and where is this used?
| playingLive: 'Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.', | ||
| seekToLiveEdge: 'Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.', |
There was a problem hiding this comment.
| playingLive: 'Zur Live-Übertragung wechseln. Es wird aktuell live abgespielt.', | |
| seekToLiveEdge: 'Zur Live-Übertragung wechseln. Aktuell wird es nicht live abgespielt.', | |
| playingLive: 'Es wird live abgespielt.', | |
| seekToLiveEdge: 'Zurück zur Liveübertragung.', |
These always were more clunky than they needed to be in v8.
| play: 'Wiedergabe', | ||
| pause: 'Pause', | ||
| replay: 'Erneut abspielen', | ||
| mute: 'Stumm schalten', |
There was a problem hiding this comment.
| mute: 'Stumm schalten', | |
| mute: 'Stummschalten', |
3fddf1d to
b36a1b8
Compare
77c5968 to
77d7fdf
Compare
77d7fdf to
2b57799
Compare
b36a1b8 to
3491def
Compare
3491def to
dd4164e
Compare
2b57799 to
5cacef4
Compare
Ship 50+ non-English locale modules in core (default export per pack), with framework entry points at @videojs/html/i18n and @videojs/react/i18n (locales/* and all). Includes pt-BR/pt-PT and zh-CN/zh-TW splits, pt/zh v8 aliases, locale completeness tests, dynamic tsdown entries, and sandbox locale picker wiring. Closes #1368 Co-authored-by: Cursor <cursoragent@cursor.com>
Fill in remaining built-in translations, restore per-locale timeSliderValueTextRange for screen readers, and drop redundant slider keys that do not vary by language. Co-authored-by: Cursor <cursoragent@cursor.com>
Satisfies ParametricTranslations so html/react i18n/all typechecks. Co-authored-by: Cursor <cursoragent@cursor.com>
src/ is gitignored; Vercel clones without it so dir-compare failed. Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror-only setup is enough for CI and fresh clones; use reset/sync when src drifts from templates. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace English PiP labels left in the ko locale pack. Co-authored-by: Cursor <cursoragent@cursor.com>
Locale pack aggregation lives in html and react; core does not ship this entry. Co-authored-by: Cursor <cursoragent@cursor.com>
Intl.DisplayNames maps the v8 `ba` tag to Bashkir; override it to Bosnian. Co-authored-by: Cursor <cursoragent@cursor.com>
Video.js v8 used ba for Bosnian, but BCP 47 assigns ba to Bashkir and bs to Bosnian. Use the correct tag so Intl labels and locale lookup work without sandbox overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep generic language tags in the locale union alongside regional packs. Co-authored-by: Cursor <cursoragent@cursor.com>
Move the aggregated locale map to @videojs/core/i18n/all and keep thin html/react entry points for existing import paths. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid a flash of English copy when the sandbox locale changes after mount. Co-authored-by: Cursor <cursoragent@cursor.com>
dd4164e to
f70ad12
Compare
5cacef4 to
06c0f4f
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 06c0f4f. Configure here.
| indicatorFullscreen: 'Plein écran', | ||
| indicatorExitFullscreen: 'Quitter le plein écran', | ||
| indicatorPictureInPicture: 'Image dans l’image', | ||
| indicatorExitPictureInPicture: 'Quitter l’image dans l’image', |
There was a problem hiding this comment.
French locale mixes apostrophe character encodings
Low Severity
The French locale uses two different apostrophe characters for the same text. Lines 15–16 use double-quoted strings (containing ASCII APOSTROPHE U+0027 for l'image), while lines 40–41 use single-quoted strings with Unicode RIGHT SINGLE QUOTATION MARK U+2019 for the identical phrase. Same inconsistency affects s'est on lines 50 and 52. French users see visually mismatched apostrophes across different UI contexts.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 06c0f4f. Configure here.
|
Consolidating i18n work into a single feature branch ( |


Summary
@videojs/core(default export per@videojs/core/i18n/locales/*), withpt/zhv8 aliases andpt-BR/pt-PT,zh-CN/zh-TWsplits.@videojs/html/i18nand@videojs/react/i18n(locales/*,all) so apps register packs without importing core directly.srcdeclaration emit under i18n paths.Closes #1368
Stacked on #1367 (
feat/i18n-ui-elements).Test plan
pnpm -F @videojs/core test src/core/i18n/testspnpm -F @videojs/core build && pnpm -F @videojs/html build && pnpm typecheckimport es from '@videojs/html/i18n/locales/es'+registerI18n('es', es)worksMade with Cursor
Note
Medium Risk
Medium risk due to introducing many new i18n exports/entrypoints and build config changes across
core,html, andreact, which could affect package resolution and bundle size. Sandbox wiring is low risk but depends on new postMessage/query-param plumbing forlocale.Overview
Adds built-in i18n locale packs (50+ translations) to
@videojs/core, including new@videojs/*/i18n/allentrypoints, v8 alias tags (pt,zh), andpt-BR/pt-PT,zh-CN/zh-TWsplits.Updates package exports and build configs (
tsdown.config.ts) forcore,html, andreactto shipi18n/alland per-locale modules, and refactorsBuiltInLocaletyping to derive from a singleBUILT_IN_LOCALESlist.Wires the sandbox to support runtime language switching via a new
localequery param andpostMessagechannel, adds a language picker in the settings menu for video presets, and updates HTML/React templates to apply the selected locale to their i18n providers.Reviewed by Cursor Bugbot for commit 06c0f4f. Bugbot is set up for automated code reviews on this repo. Configure here.