From e6437b50cc5f961557937b7096814a3ad6bbad58 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 17 Dec 2022 16:19:25 +0000 Subject: [PATCH] Abandon arabic language detection --- utils.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/utils.py b/utils.py index 519e2ad29..afb505102 100644 --- a/utils.py +++ b/utils.py @@ -253,24 +253,13 @@ def get_language_from_post(post_json_object: {}, system_language: str, if this_post_json[map_dict].get(system_language): sys_lang = this_post_json[map_dict][system_language] if isinstance(sys_lang, str): - content = this_post_json[map_dict][system_language] - if is_arabic(content): - return 'ar' return system_language else: # is there a contentMap/summaryMap entry for one of # the understood languages? for lang in languages_understood: if this_post_json[map_dict].get(lang): - content = this_post_json[map_dict][lang] - if is_arabic(content): - return 'ar' return lang - else: - if isinstance(this_post_json[content_type], str): - content = this_post_json[content_type] - if is_arabic(content): - return 'ar' return system_language