feat(i18n): localize hardcoded UI strings and fix misspelled keys

Move remaining hardcoded English strings (player menus, technical-info
overlay, music/now-playing, live TV, TV search badges, MPV subtitle
settings, accessibility labels, not-found screen, session picker) to
en.json, and correct misspelled keys (occured -> occurred, autorized ->
authorized, liraries -> libraries, jellyseer -> jellyseerr) along with
their usages.
This commit is contained in:
Gauvain
2026-06-10 22:29:16 +02:00
parent 0a2dadffd2
commit 0d47c8d43a
32 changed files with 200 additions and 90 deletions

View File

@@ -645,7 +645,7 @@ export default function SettingsTV() {
formatValue={(v) => `${v.toFixed(1)}x`}
/>
<TVSettingsStepper
label='Vertical Margin'
label={t("home.settings.subtitles.mpv_subtitle_margin_y")}
value={settings.mpvSubtitleMarginY ?? 0}
onDecrease={() => {
const newValue = Math.max(
@@ -663,11 +663,11 @@ export default function SettingsTV() {
}}
/>
<TVSettingsOptionButton
label='Horizontal Alignment'
label={t("home.settings.subtitles.mpv_subtitle_align_x")}
value={alignXLabel}
onPress={() =>
showOptions({
title: "Horizontal Alignment",
title: t("home.settings.subtitles.mpv_subtitle_align_x"),
options: alignXOptions,
onSelect: (value) =>
updateSettings({
@@ -677,11 +677,11 @@ export default function SettingsTV() {
}
/>
<TVSettingsOptionButton
label='Vertical Alignment'
label={t("home.settings.subtitles.mpv_subtitle_align_y")}
value={alignYLabel}
onPress={() =>
showOptions({
title: "Vertical Alignment",
title: t("home.settings.subtitles.mpv_subtitle_align_y"),
options: alignYOptions,
onSelect: (value) =>
updateSettings({

View File

@@ -71,7 +71,7 @@ export default function AppearanceHideLibrariesPage() {
))}
</ListGroup>
<Text className='px-4 text-xs text-neutral-500 mt-1'>
{t("home.settings.other.select_liraries_you_want_to_hide")}
{t("home.settings.other.select_libraries_you_want_to_hide")}
</Text>
</DisabledSetting>
</ScrollView>

View File

@@ -60,7 +60,7 @@ export default function HideLibrariesPage() {
))}
</ListGroup>
<Text className='px-4 text-xs text-neutral-500 mt-1'>
{t("home.settings.other.select_liraries_you_want_to_hide")}
{t("home.settings.other.select_libraries_you_want_to_hide")}
</Text>
</DisabledSetting>
);

View File

@@ -89,7 +89,7 @@ export default function ArtistsScreen() {
return (
<View className='flex-1 justify-center items-center bg-black px-6'>
<Text className='text-neutral-500 text-center'>
Missing music library id.
{t("music.missing_library_id")}
</Text>
</View>
);

View File

@@ -122,7 +122,7 @@ export default function PlaylistsScreen() {
return (
<View className='flex-1 justify-center items-center bg-black px-6'>
<Text className='text-neutral-500 text-center'>
Missing music library id.
{t("music.missing_library_id")}
</Text>
</View>
);

View File

@@ -226,7 +226,7 @@ export default function SuggestionsScreen() {
return (
<View className='flex-1 justify-center items-center bg-black px-6'>
<Text className='text-neutral-500 text-center'>
Missing music library id.
{t("music.missing_library_id")}
</Text>
</View>
);

View File

@@ -6,6 +6,7 @@ import type {
MediaSourceInfo,
} from "@jellyfin/sdk/lib/generated-client/models";
import { Image } from "expo-image";
import { t } from "i18next";
import { useAtom } from "jotai";
import React, {
useCallback,
@@ -230,7 +231,9 @@ export default function NowPlayingScreen() {
paddingBottom: Platform.OS === "android" ? insets.bottom : 0,
}}
>
<Text className='text-neutral-500'>No track playing</Text>
<Text className='text-neutral-500'>
{t("music.no_track_playing")}
</Text>
</View>
</BottomSheetModalProvider>
);
@@ -267,7 +270,7 @@ export default function NowPlayingScreen() {
: "text-neutral-500"
}
>
Now Playing
{t("music.now_playing")}
</Text>
</TouchableOpacity>
<TouchableOpacity
@@ -831,13 +834,15 @@ const QueueView: React.FC<QueueViewProps> = ({
ListHeaderComponent={
<View className='px-4 py-2'>
<Text className='text-neutral-400 text-xs uppercase tracking-wider'>
{history.length > 0 ? "Playing from queue" : "Up next"}
{history.length > 0
? t("music.playing_from_queue")
: t("music.up_next")}
</Text>
</View>
}
ListEmptyComponent={
<View className='flex-1 items-center justify-center py-20'>
<Text className='text-neutral-500'>Queue is empty</Text>
<Text className='text-neutral-500'>{t("music.queue_empty")}</Text>
</View>
}
/>

View File

@@ -1267,7 +1267,7 @@ export default function DirectPlayerPage() {
console.error("Video Error:", e.nativeEvent);
Alert.alert(
t("player.error"),
t("player.an_error_occured_while_playing_the_video"),
t("player.an_error_occurred_while_playing_the_video"),
);
writeToLog("ERROR", "Video Error", e.nativeEvent);
}}

View File

@@ -192,6 +192,7 @@ const SubtitleResultCard = React.forwardRef<
>(({ result, hasTVPreferredFocus, isDownloading, onPress }, ref) => {
const { focused, handleFocus, handleBlur, animatedStyle } =
useTVFocusAnimation({ scaleAmount: 1.03 });
const { t } = useTranslation();
return (
<Pressable
@@ -328,7 +329,7 @@ const SubtitleResultCard = React.forwardRef<
]}
>
<Text style={[styles.flagText, { fontSize: scaleSize(10) }]}>
Hash Match
{t("player.hash_match")}
</Text>
</View>
)}

View File

@@ -1,17 +1,20 @@
import { Link, Stack } from "expo-router";
import { useTranslation } from "react-i18next";
import { StyleSheet } from "react-native";
import { ThemedText } from "@/components/ThemedText";
import { ThemedView } from "@/components/ThemedView";
export default function NotFoundScreen() {
const { t } = useTranslation();
return (
<>
<Stack.Screen options={{ title: "Oops!" }} />
<Stack.Screen options={{ title: t("home.oops") }} />
<ThemedView style={styles.container}>
<ThemedText type='title'>This screen doesn't exist.</ThemedText>
<ThemedText type='title'>{t("not_found.title")}</ThemedText>
<Link href={"/home"} style={styles.link}>
<ThemedText type='link'>Go to home screen!</ThemedText>
<ThemedText type='link'>{t("not_found.go_home")}</ThemedText>
</Link>
</ThemedView>
</>