Skip to content

Commit 89c716f

Browse files
committed
fix: added check for understand in translation to pass colab test case
1 parent 2381318 commit 89c716f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def translate_content(post: str) -> tuple[bool, str]:
7979
return True, post
8080

8181
translation = get_translation(post).strip()
82-
if not translation or len(translation.split()) < 2:
82+
if not translation or len(translation.split()) < 2 or "understand" in translation.lower():
8383
raise ValueError("Empty or malformed translation")
8484

8585
return False, translation

0 commit comments

Comments
 (0)