feat: add i18n support for skip button text

- Add player.skip_* translation keys for all 5 segment types
- Enable proper localization of skip button text
- Addresses GitHub Copilot review comment
This commit is contained in:
Uruk
2026-01-14 14:10:28 +01:00
committed by Gauvain
parent 92460cf202
commit 378288bf08
2 changed files with 12 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import type {
} from "@jellyfin/sdk/lib/generated-client";
import { useLocalSearchParams } from "expo-router";
import { type FC, useCallback, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { StyleSheet, useWindowDimensions, View } from "react-native";
import Animated, {
Easing,
@@ -394,10 +395,11 @@ export const Controls: FC<Props> = ({
? outroSkipper.currentSegment.endTime < maxSeconds
: false;
// Get button text based on segment type
// Get button text based on segment type using i18n
const { t } = useTranslation();
const skipButtonText = activeSegment
? `Skip ${activeSegment.type}`
: "Skip Intro";
? t(`player.skip_${activeSegment.type.toLowerCase()}`)
: t("player.skip_intro");
const goToItemCommon = useCallback(
(item: BaseItemDto) => {