1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00

Handle empty translation

This commit is contained in:
Piero Toffanin 2022-12-09 14:35:39 -05:00
parent b87b210bfc
commit 0478d4ee2c
2 changed files with 4 additions and 4 deletions

View File

@ -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: