fix(ffmpeg_handling): remove word boundaries \b from translation function
This commit is contained in:
1 parent
9929dcbd8c
commit
2d623bbff6
1 file changed
+2
-2
@@ -65,7 +65,7 @@ AUDIO_TRANSLATIONS = {
|
||||
"Оригинал": "Original",
|
||||
"Дубляж": "Dubbed",
|
||||
# Languages
|
||||
r"русск": "Russian",
|
||||
"русск": "Russian",
|
||||
"Английски": "English",
|
||||
"български": "Bulgarian",
|
||||
"Български": "Bulgarian",
|
||||
@@ -173,7 +173,7 @@ def translate_audio_tracks(tracks: list[dict]) -> list[dict]:
|
||||
if not isinstance(value, str):
|
||||
continue
|
||||
for src, dst in AUDIO_TRANSLATIONS.items():
|
||||
if re.search(rf"\b{re.escape(src)}\b", value, flags=re.IGNORECASE):
|
||||
if re.search(rf"{re.escape(src)}", value, flags=re.IGNORECASE):
|
||||
value = dst
|
||||
break
|
||||
if CYRILLIC_RE.search(value):
|
||||
|
||||
Reference in new issue
Block a user