From dffcdef9456d325e7e70b379652c7412339e0328 Mon Sep 17 00:00:00 2001 From: Felix Schneider Date: Sun, 31 May 2026 12:10:22 +0200 Subject: [PATCH] feat(i18n): Add translation for "ends at" (#1474) Co-authored-by: Gauvain --- components/video-player/controls/TimeDisplay.tsx | 5 ++++- translations/de.json | 3 ++- translations/en.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/video-player/controls/TimeDisplay.tsx b/components/video-player/controls/TimeDisplay.tsx index 3f8cfd69e..f85af6343 100644 --- a/components/video-player/controls/TimeDisplay.tsx +++ b/components/video-player/controls/TimeDisplay.tsx @@ -1,4 +1,5 @@ import type { FC } from "react"; +import { useTranslation } from "react-i18next"; import { View } from "react-native"; import { Text } from "@/components/common/Text"; import { formatTimeString } from "@/utils/time"; @@ -16,6 +17,8 @@ export const TimeDisplay: FC = ({ currentTime, remainingTime, }) => { + const { t } = useTranslation(); + const getFinishTime = () => { const now = new Date(); // remainingTime is in ms @@ -37,7 +40,7 @@ export const TimeDisplay: FC = ({ -{formatTimeString(remainingTime, "ms")} - ends at {getFinishTime()} + {t("player.ends_at", { time: getFinishTime() })} diff --git a/translations/de.json b/translations/de.json index 3d3001dcd..87df58142 100644 --- a/translations/de.json +++ b/translations/de.json @@ -608,7 +608,8 @@ "downloaded_file_message": "Heruntergeladene Datei abspielen?", "downloaded_file_yes": "Ja", "downloaded_file_no": "Nein", - "downloaded_file_cancel": "Abbrechen" + "downloaded_file_cancel": "Abbrechen", + "ends_at": "Endet um {{time}}" }, "item_card": { "next_up": "Als Nächstes", diff --git a/translations/en.json b/translations/en.json index 58fe4828b..320526063 100644 --- a/translations/en.json +++ b/translations/en.json @@ -698,7 +698,7 @@ "downloaded_file_no": "No", "downloaded_file_cancel": "Cancel", "swipe_down_settings": "Swipe down for settings", - "ends_at": "ends at", + "ends_at": "Ends at {{time}}", "search_subtitles": "Search Subtitles", "subtitle_tracks": "Tracks", "subtitle_search": "Search & Download",