feat(i18n): Add translation for "ends at" (#1474)

Co-authored-by: Gauvain <contact@uruk.dev>
This commit is contained in:
Felix Schneider
2026-05-31 12:10:22 +02:00
committed by GitHub
parent fa1c3f3947
commit dffcdef945
3 changed files with 7 additions and 3 deletions

View File

@@ -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<TimeDisplayProps> = ({
currentTime,
remainingTime,
}) => {
const { t } = useTranslation();
const getFinishTime = () => {
const now = new Date();
// remainingTime is in ms
@@ -37,7 +40,7 @@ export const TimeDisplay: FC<TimeDisplayProps> = ({
-{formatTimeString(remainingTime, "ms")}
</Text>
<Text className='text-[10px] text-neutral-500 opacity-70'>
ends at {getFinishTime()}
{t("player.ends_at", { time: getFinishTime() })}
</Text>
</View>
</View>

View File

@@ -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",

View File

@@ -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",