Skip to content

Commit 6ebe4b6

Browse files
committed
Fix translate_content to match CI tuple output
1 parent 84e27c7 commit 6ebe4b6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/translator.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ def translate(content: str) -> tuple[bool, str]:
8080
return True, ""
8181

8282

83-
def translate_content(content: str) -> dict:
83+
def translate_content(content: str):
8484
"""
85-
Wrapper for Flask app to return JSON-friendly output.
86-
Returns keys in camelCase to match NodeBB expectations.
85+
CI TESTS EXPECT A TUPLE:
86+
(is_english, translated_content)
8787
"""
8888
is_english, translated_content = translate(content)
89-
return {
90-
"isEnglish": is_english,
91-
"translatedContent": translated_content
92-
}
89+
return is_english, translated_content
90+

0 commit comments

Comments
 (0)