From bdf5cba98ba05e22f3ada29df046b9225e7c7d44 Mon Sep 17 00:00:00 2001
From: vlOd <66838724+vlOd2@users.noreply.github.com>
Date: Sat, 27 Dec 2025 01:21:40 +0200
Subject: [PATCH] Update src/stores/player/utils/captionstranslation.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
src/stores/player/utils/captionstranslation.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/stores/player/utils/captionstranslation.ts b/src/stores/player/utils/captionstranslation.ts
index aa0613cc..b65913cc 100644
--- a/src/stores/player/utils/captionstranslation.ts
+++ b/src/stores/player/utils/captionstranslation.ts
@@ -76,11 +76,11 @@ async function translateCaption(
for (let i = 0; i < RETRY_COUNT; i += 1) {
try {
text = await translateText(
- caption.text.replace("\n", "
"),
+ caption.text.replaceAll("\n", "
"),
targetLang,
);
if (text) {
- text = text.replace("
", "\n");
+ text = text.replaceAll("
", "\n");
break;
}
} catch (error) {