diff --git a/src/hooks/usePlayerNativeEvents.ts b/src/hooks/usePlayerNativeEvents.ts index a830eb5..cedcfe7 100644 --- a/src/hooks/usePlayerNativeEvents.ts +++ b/src/hooks/usePlayerNativeEvents.ts @@ -11,7 +11,7 @@ import type { AppState } from '../core/types'; function presentNativePlayerError(message: string): string { const sourceFailure = /\b(loading failed|failed to open|http(?:\s+error)?|403|401|forbidden|unauthorized|not found|timed?\s*out|connection (?:refused|reset|failed)|network|no such host|certificate)\b/i.test(message); if (!sourceFailure) return message; - return `Source error: the selected stream is unavailable, expired, or blocked.\n${message}`; + return t('player.source_error_detail', message); } export function usePlayerNativeEvents({ @@ -55,7 +55,7 @@ export function usePlayerNativeEvents({ void (async () => { const proxyDetail = await playerLastStreamError(); const message = proxyDetail - ? `Source error: the selected stream is unavailable, expired, or blocked.\n${proxyDetail}` + ? t('player.source_error_detail', proxyDetail) : presentNativePlayerError(event.payload); await onPlayerError(message); })(); diff --git a/src/i18n/english_us.json b/src/i18n/english_us.json index 5fd750f..cc45602 100644 --- a/src/i18n/english_us.json +++ b/src/i18n/english_us.json @@ -492,6 +492,7 @@ "format.remaining_almost_done": "Almost done", "format.seconds": "%s seconds", "player.audio": "Audio", + "player.source_error_detail": "Source error: the selected stream is unavailable, expired, or blocked.\n%s", "player.subtitles": "Subtitles", "player.subtitles_off": "Off", "player.speed": "Speed", diff --git a/src/i18n/tr_tr.json b/src/i18n/tr_tr.json index eb6fdfa..bd3cab9 100644 --- a/src/i18n/tr_tr.json +++ b/src/i18n/tr_tr.json @@ -492,6 +492,7 @@ "format.remaining_almost_done": "Bitiş yakın", "format.seconds": "%s saniye", "player.audio": "Ses", + "player.source_error_detail": "Kaynak hatası: seçilen yayın kullanılamıyor, süresi dolmuş veya engellenmiş.\n%s", "player.subtitles": "Altyazı", "player.subtitles_off": "Kapalı", "player.speed": "Hız",