Skip to content

Commit 40ddb20

Browse files
committed
Update ollama-translate.py
1 parent 7ca114a commit 40ddb20

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tools/ollama-translate.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,15 @@ def existing_translation_needs_work(source: str, translation: str) -> bool:
334334
if not translation.strip():
335335
return True
336336

337-
return bool(validate_translation(source, translation))
337+
errors = validate_translation(source, translation)
338+
339+
# If the only error is that translation is identical to source, it's likely
340+
# a proper noun, protocol, or technical term that should remain unchanged.
341+
# Don't mark it as needing work; treat it as valid and finalize it.
342+
if errors == ["translation is identical to source"]:
343+
return False
344+
345+
return bool(errors)
338346

339347

340348
def finalize_valid_translations(root, keep_unfinished: bool) -> int:

0 commit comments

Comments
 (0)