mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-04 13:50:21 +00:00
Extend /languages to include targets
This commit is contained in:
parent
0478d4ee2c
commit
e79089b5c1
3 changed files with 10 additions and 13 deletions
|
@ -81,9 +81,12 @@ def detect_languages(text):
|
|||
def improve_translation_formatting(source, translation, improve_punctuation=True):
|
||||
source = source.strip()
|
||||
|
||||
if not len(source) or not len(translation):
|
||||
if not len(source):
|
||||
return ""
|
||||
|
||||
if not len(translation):
|
||||
return source
|
||||
|
||||
if improve_punctuation:
|
||||
source_last_char = source[len(source) - 1]
|
||||
translation_last_char = translation[len(translation) - 1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue