forked from mirrors/LibreTranslate
Handle empty translation
This commit is contained in:
parent
b87b210bfc
commit
0478d4ee2c
2 changed files with 4 additions and 4 deletions
|
@ -81,7 +81,7 @@ def detect_languages(text):
|
||||||
def improve_translation_formatting(source, translation, improve_punctuation=True):
|
def improve_translation_formatting(source, translation, improve_punctuation=True):
|
||||||
source = source.strip()
|
source = source.strip()
|
||||||
|
|
||||||
if not len(source):
|
if not len(source) or not len(translation):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
if improve_punctuation:
|
if improve_punctuation:
|
||||||
|
|
Loading…
Reference in a new issue