Open mdumond opened 4 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
public | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 17, 2024 8:49pm |
This pull request introduces a new key, "video-subtitle"
, to multiple JSON localization files, which provides paths to subtitle files for video testimonials in German, English, French, and Italian. Additionally, it modifies the MuxVideoComponent
and HeroVideo
function to accept and utilize these subtitles dynamically based on language and region. The overall structure of the JSON files and existing functionalities of the components remain unchanged.
File Path | Change Summary |
---|---|
shared/locales/de/website-home.json |
Added new key: "video-subtitle": "/assets/video/subtitle-video-testimonials.de_DE.vtt" |
shared/locales/en/website-home.json |
Added new key: "video-subtitle": "/assets/video/subtitle-video-testimonials.en_US.vtt" |
shared/locales/fr/website-home.json |
Added new key: "video-subtitle": "/assets/video/subtitle-video-testimonials.fr_FR.vtt" |
shared/locales/it/website-home.json |
Added new key: "video-subtitle": "/assets/video/subtitle-video-testimonials.it_IT.vtt" |
website/src/app/[lang]/[region]/(website)/(home)/(components)/mux-video.tsx |
Updated MuxVideoComponent to accept lang and translations props; added HeroVideoSubtitles type. |
website/src/app/[lang]/[region]/(website)/(home)/(sections)/hero-video.tsx |
Updated HeroVideo to pass translations , lang , and region props to MuxVideoComponent . |
MuxVideoComponent
to display subtitles in the same language as the website content through the new "video-subtitle"
keys.🐰 "In the fields where videos play,
Subtitles dance in bright array.
With every language, clear and bright,
Our stories shine, a joyful sight!
Hop along, let voices blend,
In every tongue, our tales extend!" 🎥✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Visit the preview URL for this PR (updated for commit caccde3):
https://si-admin-staging--pr944-934-video-subtitle-t-rs8fz6jc.web.app
(expires Sun, 24 Nov 2024 20:45:27 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Sign: b7b0969384059dce6ea8fad1ee1d1737e54e6676
I replaced the call to an external file for the local translated versions. The files are correct in the html:
on live:
on the branch:
they don't appear yet though, but I also have trouble displaying the subtitles in the current main branch..
Also, the "label" argument is supposed to be the language name, I did not find in the code that we have a way to get that from the langcode, do we have something like that already?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation