You've already forked LibreTranslate
mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-07-12 22:22:02 +02:00
Handle empty translation
This commit is contained in:
@ -81,7 +81,7 @@ def detect_languages(text):
|
||||
def improve_translation_formatting(source, translation, improve_punctuation=True):
|
||||
source = source.strip()
|
||||
|
||||
if not len(source):
|
||||
if not len(source) or not len(translation):
|
||||
return ""
|
||||
|
||||
if improve_punctuation:
|
||||
|
Reference in New Issue
Block a user