More Translations

This commit is contained in:
Simon Caron
2025-01-04 16:41:54 -05:00
parent 459ca3245b
commit 53ea1cc899
27 changed files with 189 additions and 73 deletions

View File

@@ -423,7 +423,7 @@ export default function page() {
if (isErrorItem || isErrorStreamUrl)
return (
<View className="w-screen h-screen flex flex-col items-center justify-center bg-black">
<Text className="text-white">Error</Text>
<Text className="text-white">{t("player.error")}</Text>
</View>
);

View File

@@ -25,6 +25,7 @@ import React, { useCallback, useMemo, useRef, useState } from "react";
import { Pressable, useWindowDimensions, View } from "react-native";
import { useSharedValue } from "react-native-reanimated";
import Video, { OnProgressData, VideoRef } from "react-native-video";
import { useTranslation } from "react-i18next";
export default function page() {
const api = useAtomValue(apiAtom);
@@ -32,6 +33,7 @@ export default function page() {
const [settings] = useSettings();
const videoRef = useRef<VideoRef | null>(null);
const windowDimensions = useWindowDimensions();
const { t } = useTranslation();
const firstTime = useRef(true);
@@ -278,14 +280,14 @@ export default function page() {
if (isErrorItem || isErrorStreamUrl)
return (
<View className="w-screen h-screen flex flex-col items-center justify-center bg-black">
<Text className="text-white">Error</Text>
<Text className="text-white">{t("player.error")}</Text>
</View>
);
if (!item || !stream)
return (
<View className="w-screen h-screen flex flex-col items-center justify-center bg-black">
<Text className="text-white">Error</Text>
<Text className="text-white">{t("player.error")}</Text>
</View>
);

View File

@@ -39,12 +39,14 @@ import Video, {
VideoRef,
} from "react-native-video";
import { SubtitleHelper } from "@/utils/SubtitleHelper";
import { useTranslation } from "react-i18next";
const Player = () => {
const api = useAtomValue(apiAtom);
const user = useAtomValue(userAtom);
const [settings] = useSettings();
const videoRef = useRef<VideoRef | null>(null);
const { t } = useTranslation();
const firstTime = useRef(true);
const revalidateProgressCache = useInvalidatePlaybackProgressCache();
@@ -373,7 +375,7 @@ const Player = () => {
if (isErrorItem || isErrorStreamUrl)
return (
<View className="w-screen h-screen flex flex-col items-center justify-center bg-black">
<Text className="text-white">Error</Text>
<Text className="text-white">{t("player.error")}</Text>
</View>
);
@@ -440,7 +442,7 @@ const Player = () => {
/>
</>
) : (
<Text>No video source...</Text>
<Text>{t("player.no_video_source")}</Text>
)}
</View>