From 1d1671c00f50c8bcf8cb9bfe409e55c97f570a49 Mon Sep 17 00:00:00 2001 From: terrtia Date: Fri, 26 Apr 2024 10:39:28 +0200 Subject: [PATCH] fix: [Language] Updated the language detector to return a empty list when no language is detected --- bin/lib/Language.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/lib/Language.py b/bin/lib/Language.py index 6803cf51..a53391d8 100755 --- a/bin/lib/Language.py +++ b/bin/lib/Language.py @@ -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)