Add i18n support for event navigation buttons

This commit is contained in:
Ran Mizrachi 2025-10-26 10:48:51 +02:00
parent 2e9ca27acf
commit 4a660262fc
2 changed files with 8 additions and 2 deletions

View File

@ -6,6 +6,10 @@
"title": "Submit this frame to Frigate+?",
"submit": "Submit"
},
"eventNavigation": {
"previous": "Previous Event",
"next": "Next Event"
},
"livePlayerRequiredIOSVersion": "iOS 17.1 or greater is required for this live stream type.",
"streamOffline": {
"title": "Stream Offline",

View File

@ -100,6 +100,8 @@ export default function VideoControls({
toggleFullscreen,
containerRef,
}: VideoControlsProps) {
const { t } = useTranslation(["components/player"]);
// layout
const controlsContainerRef = useRef<HTMLDivElement | null>(null);
@ -300,7 +302,7 @@ export default function VideoControls({
<>
<IoMdSkipBackward
className="size-5 cursor-pointer"
title="Previous Event"
title={t("eventNavigation.previous")}
onClick={(e) => {
e.stopPropagation();
onJumpToEvent("previous");
@ -308,7 +310,7 @@ export default function VideoControls({
/>
<IoMdSkipForward
className="size-5 cursor-pointer"
title="Next Event"
title={t("eventNavigation.next")}
onClick={(e) => {
e.stopPropagation();
onJumpToEvent("next");