fix: [Language] Updated the language detector to return a empty list when no language is detected

otp
terrtia 2024-04-26 10:39:28 +02:00
parent 35502d955f
commit 1d1671c00f
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 2 deletions

View File

@ -493,10 +493,10 @@ class LanguagesDetector:
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)