Skip to content

Commit

Permalink
fix: [Language] Updated the language detector to return a empty list …
Browse files Browse the repository at this point in the history
…when no language is detected
  • Loading branch information
Terrtia committed Apr 26, 2024
1 parent 35502d9 commit 1d1671c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/lib/Language.py
Expand Up @@ -493,10 +493,10 @@ def detect_libretranslate(self, content):

def detect(self, content, force_gcld3=False): # TODO detect length between 20-200 ????
if not content:
return None
return []
content = _clean_text_to_translate(content, html=True)
if not content:
return None
return []
# DEBUG
# print('-------------------------------------------------------')
# print(content)
Expand Down

0 comments on commit 1d1671c

Please sign in to comment.