mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-13 09:20:23 +01:00
Library Translation
This commit is contained in:
@@ -42,6 +42,7 @@ import {
|
|||||||
import { FlashList } from "@shopify/flash-list";
|
import { FlashList } from "@shopify/flash-list";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
import { colletionTypeToItemType } from "@/utils/collectionTypeToItemType";
|
import { colletionTypeToItemType } from "@/utils/collectionTypeToItemType";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const searchParams = useLocalSearchParams();
|
const searchParams = useLocalSearchParams();
|
||||||
@@ -63,6 +64,8 @@ const Page = () => {
|
|||||||
|
|
||||||
const { orientation } = useOrientation();
|
const { orientation } = useOrientation();
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const sop = getSortOrderPreference(libraryId, sortOrderPreference);
|
const sop = getSortOrderPreference(libraryId, sortOrderPreference);
|
||||||
if (sop) {
|
if (sop) {
|
||||||
@@ -437,7 +440,7 @@ const Page = () => {
|
|||||||
if (flatData.length === 0)
|
if (flatData.length === 0)
|
||||||
return (
|
return (
|
||||||
<View className="h-full w-full flex justify-center items-center">
|
<View className="h-full w-full flex justify-center items-center">
|
||||||
<Text className="text-lg text-neutral-500">No items found</Text>
|
<Text className="text-lg text-neutral-500">{t("library.no_items_found")}</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -446,7 +449,7 @@ const Page = () => {
|
|||||||
key={orientation}
|
key={orientation}
|
||||||
ListEmptyComponent={
|
ListEmptyComponent={
|
||||||
<View className="flex flex-col items-center justify-center h-full">
|
<View className="flex flex-col items-center justify-center h-full">
|
||||||
<Text className="font-bold text-xl text-neutral-500">No results</Text>
|
<Text className="font-bold text-xl text-neutral-500">{t("library.no_results")}</Text>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
contentInsetAdjustmentBehavior="automatic"
|
contentInsetAdjustmentBehavior="automatic"
|
||||||
|
|||||||
@@ -4,10 +4,13 @@ import { Ionicons } from "@expo/vector-icons";
|
|||||||
import { Stack } from "expo-router";
|
import { Stack } from "expo-router";
|
||||||
import { Platform } from "react-native";
|
import { Platform } from "react-native";
|
||||||
import * as DropdownMenu from "zeego/dropdown-menu";
|
import * as DropdownMenu from "zeego/dropdown-menu";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function IndexLayout() {
|
export default function IndexLayout() {
|
||||||
const [settings, updateSettings] = useSettings();
|
const [settings, updateSettings] = useSettings();
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
if (!settings?.libraryOptions) return null;
|
if (!settings?.libraryOptions) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +20,7 @@ export default function IndexLayout() {
|
|||||||
options={{
|
options={{
|
||||||
headerShown: true,
|
headerShown: true,
|
||||||
headerLargeTitle: true,
|
headerLargeTitle: true,
|
||||||
headerTitle: "Library",
|
headerTitle: t("library.library_title"),
|
||||||
headerBlurEffect: "prominent",
|
headerBlurEffect: "prominent",
|
||||||
headerTransparent: Platform.OS === "ios" ? true : false,
|
headerTransparent: Platform.OS === "ios" ? true : false,
|
||||||
headerShadowVisible: false,
|
headerShadowVisible: false,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { useAtom } from "jotai";
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { StyleSheet, View } from "react-native";
|
import { StyleSheet, View } from "react-native";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function index() {
|
export default function index() {
|
||||||
const [api] = useAtom(apiAtom);
|
const [api] = useAtom(apiAtom);
|
||||||
@@ -54,6 +55,8 @@ export default function index() {
|
|||||||
}
|
}
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
|
|
||||||
if (isLoading)
|
if (isLoading)
|
||||||
@@ -66,7 +69,7 @@ export default function index() {
|
|||||||
if (!data)
|
if (!data)
|
||||||
return (
|
return (
|
||||||
<View className="h-full w-full flex justify-center items-center">
|
<View className="h-full w-full flex justify-center items-center">
|
||||||
<Text className="text-lg text-neutral-500">No libraries found</Text>
|
<Text className="text-lg text-neutral-500">{t("library.no_libraries_found")}</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,12 @@
|
|||||||
"search_hint": "Search here...",
|
"search_hint": "Search here...",
|
||||||
"no_results_found_for": "No results found for"
|
"no_results_found_for": "No results found for"
|
||||||
},
|
},
|
||||||
|
"library": {
|
||||||
|
"library_title": "Library",
|
||||||
|
"no_items_found": "No items found",
|
||||||
|
"no_results": "No results",
|
||||||
|
"no_libraries_found": "No libraries found"
|
||||||
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
|
|||||||
@@ -33,6 +33,12 @@
|
|||||||
"search_hint": "Rechercher ici...",
|
"search_hint": "Rechercher ici...",
|
||||||
"no_results_found_for": "Aucun résultat trouvé pour"
|
"no_results_found_for": "Aucun résultat trouvé pour"
|
||||||
},
|
},
|
||||||
|
"library": {
|
||||||
|
"library_title": "Bibliothèque",
|
||||||
|
"no_items_found": "Aucun item trouvé",
|
||||||
|
"no_results": "Aucun résultat",
|
||||||
|
"no_libraries_found": "Aucune bibliothèque trouvée"
|
||||||
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"home": "Accueil",
|
"home": "Accueil",
|
||||||
"search": "Recherche",
|
"search": "Recherche",
|
||||||
|
|||||||
Reference in New Issue
Block a user