forked from Ninjalama/streamyfin_mirror
Library Translation
This commit is contained in:
@@ -42,6 +42,7 @@ import {
|
||||
import { FlashList } from "@shopify/flash-list";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { colletionTypeToItemType } from "@/utils/collectionTypeToItemType";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const Page = () => {
|
||||
const searchParams = useLocalSearchParams();
|
||||
@@ -63,6 +64,8 @@ const Page = () => {
|
||||
|
||||
const { orientation } = useOrientation();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
const sop = getSortOrderPreference(libraryId, sortOrderPreference);
|
||||
if (sop) {
|
||||
@@ -437,7 +440,7 @@ const Page = () => {
|
||||
if (flatData.length === 0)
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
|
||||
@@ -446,7 +449,7 @@ const Page = () => {
|
||||
key={orientation}
|
||||
ListEmptyComponent={
|
||||
<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>
|
||||
}
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
|
||||
@@ -4,10 +4,13 @@ import { Ionicons } from "@expo/vector-icons";
|
||||
import { Stack } from "expo-router";
|
||||
import { Platform } from "react-native";
|
||||
import * as DropdownMenu from "zeego/dropdown-menu";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function IndexLayout() {
|
||||
const [settings, updateSettings] = useSettings();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!settings?.libraryOptions) return null;
|
||||
|
||||
return (
|
||||
@@ -17,7 +20,7 @@ export default function IndexLayout() {
|
||||
options={{
|
||||
headerShown: true,
|
||||
headerLargeTitle: true,
|
||||
headerTitle: "Library",
|
||||
headerTitle: t("library.library_title"),
|
||||
headerBlurEffect: "prominent",
|
||||
headerTransparent: Platform.OS === "ios" ? true : false,
|
||||
headerShadowVisible: false,
|
||||
|
||||
@@ -13,6 +13,7 @@ import { useAtom } from "jotai";
|
||||
import { useEffect } from "react";
|
||||
import { StyleSheet, View } from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function index() {
|
||||
const [api] = useAtom(apiAtom);
|
||||
@@ -54,6 +55,8 @@ export default function index() {
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
if (isLoading)
|
||||
@@ -66,7 +69,7 @@ export default function index() {
|
||||
if (!data)
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
"search_hint": "Search here...",
|
||||
"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": {
|
||||
"home": "Home",
|
||||
"search": "Search",
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
"search_hint": "Rechercher ici...",
|
||||
"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": {
|
||||
"home": "Accueil",
|
||||
"search": "Recherche",
|
||||
|
||||
Reference in New Issue
Block a user