From 4d3f2f48d258c88aa1525fcb2f087fa05aa42118 Mon Sep 17 00:00:00 2001 From: dalf Date: Sun, 1 Aug 2021 06:24:12 +0000 Subject: [PATCH 1/2] Update searx.data - update_languages.py --- searx/data/engines_languages.json | 16 ++++++++++++++++ searx/languages.py | 10 +--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/searx/data/engines_languages.json b/searx/data/engines_languages.json index a64918959..2e861e1e6 100644 --- a/searx/data/engines_languages.json +++ b/searx/data/engines_languages.json @@ -26142,6 +26142,10 @@ "english_name": "Danish", "name": "Dansk" }, + "dag": { + "english_name": "Dagbani", + "name": "Dagbanli" + }, "de": { "english_name": "German", "name": "Deutsch" @@ -26866,6 +26870,10 @@ "english_name": "Serbo-Croatian", "name": "Srpskohrvatski / \u0421\u0440\u043f\u0441\u043a\u043e\u0445\u0440\u0432\u0430\u0442\u0441\u043a\u0438" }, + "shi": { + "english_name": "Tachelhit", + "name": "Tacl\u1e25it" + }, "shn": { "english_name": "Shan", "name": "\u101c\u102d\u1075\u103a\u1088\u1010\u1086\u1038" @@ -27384,6 +27392,10 @@ "english_name": "Danish", "name": "Dansk" }, + "dag": { + "english_name": "Dagbani", + "name": "Dagbanli" + }, "de": { "english_name": "German", "name": "Deutsch" @@ -28108,6 +28120,10 @@ "english_name": "Serbo-Croatian", "name": "Srpskohrvatski / \u0421\u0440\u043f\u0441\u043a\u043e\u0445\u0440\u0432\u0430\u0442\u0441\u043a\u0438" }, + "shi": { + "english_name": "Tachelhit", + "name": "Tacl\u1e25it" + }, "shn": { "english_name": "Shan", "name": "\u101c\u102d\u1075\u103a\u1088\u1010\u1086\u1038" diff --git a/searx/languages.py b/searx/languages.py index f9c9f65e1..7db692a9c 100644 --- a/searx/languages.py +++ b/searx/languages.py @@ -2,9 +2,7 @@ # list of language codes # this file is generated automatically by utils/fetch_languages.py language_codes = \ -( ('af-ZA', 'Afrikaans', '', 'Afrikaans'), - ('ar-EG', 'العربية', '', 'Arabic'), - ('be-BY', 'Беларуская', '', 'Belarusian'), +( ('ar-EG', 'العربية', '', 'Arabic'), ('bg-BG', 'Български', '', 'Bulgarian'), ('ca-ES', 'Català', '', 'Catalan'), ('cs-CZ', 'Čeština', '', 'Czech'), @@ -28,7 +26,6 @@ language_codes = \ ('es-ES', 'Español', 'España', 'Spanish'), ('es-MX', 'Español', 'México', 'Spanish'), ('et-EE', 'Eesti', '', 'Estonian'), - ('fa-IR', 'فارسی', '', 'Persian'), ('fi-FI', 'Suomi', '', 'Finnish'), ('fr', 'Français', '', 'French'), ('fr-BE', 'Français', 'Belgique', 'French'), @@ -38,9 +35,7 @@ language_codes = \ ('he-IL', 'עברית', '', 'Hebrew'), ('hr-HR', 'Hrvatski', '', 'Croatian'), ('hu-HU', 'Magyar', '', 'Hungarian'), - ('hy-AM', 'Հայերեն', '', 'Armenian'), ('id-ID', 'Indonesia', '', 'Indonesian'), - ('is-IS', 'Íslenska', '', 'Icelandic'), ('it-IT', 'Italiano', '', 'Italian'), ('ja-JP', '日本語', '', 'Japanese'), ('ko-KR', '한국어', '', 'Korean'), @@ -58,12 +53,9 @@ language_codes = \ ('ru-RU', 'Русский', '', 'Russian'), ('sk-SK', 'Slovenčina', '', 'Slovak'), ('sl-SI', 'Slovenščina', '', 'Slovenian'), - ('sr-RS', 'Srpski', '', 'Serbian'), ('sv-SE', 'Svenska', '', 'Swedish'), - ('sw-TZ', 'Kiswahili', '', 'Swahili'), ('th-TH', 'ไทย', '', 'Thai'), ('tr-TR', 'Türkçe', '', 'Turkish'), - ('uk-UA', 'Українська', '', 'Ukrainian'), ('vi-VN', 'Tiếng Việt', '', 'Vietnamese'), ('zh', '中文', '', 'Chinese'), ('zh-CN', '中文', '中国', 'Chinese'), From 274edd523c73126576f2b6d704171440ab1b2907 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 1 Aug 2021 13:04:24 +0200 Subject: [PATCH 2/2] [fix] get common used languages back (min_engines_per_lang = 13) In commit 4d3f2f48d common used languages has been droped. By reducing the number of `min_engines_per_lang` from 15 to 13 we get theses languages back. Signed-off-by: Markus Heiser --- searx/languages.py | 9 ++++++++- searx_extra/update/update_languages.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/searx/languages.py b/searx/languages.py index 7db692a9c..5f52d03f3 100644 --- a/searx/languages.py +++ b/searx/languages.py @@ -2,7 +2,9 @@ # list of language codes # this file is generated automatically by utils/fetch_languages.py language_codes = \ -( ('ar-EG', 'العربية', '', 'Arabic'), +( ('af-ZA', 'Afrikaans', '', 'Afrikaans'), + ('ar-EG', 'العربية', '', 'Arabic'), + ('be-BY', 'Беларуская', '', 'Belarusian'), ('bg-BG', 'Български', '', 'Bulgarian'), ('ca-ES', 'Català', '', 'Catalan'), ('cs-CZ', 'Čeština', '', 'Czech'), @@ -26,6 +28,7 @@ language_codes = \ ('es-ES', 'Español', 'España', 'Spanish'), ('es-MX', 'Español', 'México', 'Spanish'), ('et-EE', 'Eesti', '', 'Estonian'), + ('fa-IR', 'فارسی', '', 'Persian'), ('fi-FI', 'Suomi', '', 'Finnish'), ('fr', 'Français', '', 'French'), ('fr-BE', 'Français', 'Belgique', 'French'), @@ -36,6 +39,7 @@ language_codes = \ ('hr-HR', 'Hrvatski', '', 'Croatian'), ('hu-HU', 'Magyar', '', 'Hungarian'), ('id-ID', 'Indonesia', '', 'Indonesian'), + ('is-IS', 'Íslenska', '', 'Icelandic'), ('it-IT', 'Italiano', '', 'Italian'), ('ja-JP', '日本語', '', 'Japanese'), ('ko-KR', '한국어', '', 'Korean'), @@ -53,9 +57,12 @@ language_codes = \ ('ru-RU', 'Русский', '', 'Russian'), ('sk-SK', 'Slovenčina', '', 'Slovak'), ('sl-SI', 'Slovenščina', '', 'Slovenian'), + ('sr-RS', 'Srpski', '', 'Serbian'), ('sv-SE', 'Svenska', '', 'Swedish'), + ('sw-TZ', 'Kiswahili', '', 'Swahili'), ('th-TH', 'ไทย', '', 'Thai'), ('tr-TR', 'Türkçe', '', 'Turkish'), + ('uk-UA', 'Українська', '', 'Ukrainian'), ('vi-VN', 'Tiếng Việt', '', 'Vietnamese'), ('zh', '中文', '', 'Chinese'), ('zh-CN', '中文', '中国', 'Chinese'), diff --git a/searx_extra/update/update_languages.py b/searx_extra/update/update_languages.py index 1b43e01af..3f8a989eb 100755 --- a/searx_extra/update/update_languages.py +++ b/searx_extra/update/update_languages.py @@ -109,7 +109,7 @@ def join_language_lists(engines_languages): # Filter language list so it only includes the most supported languages and countries def filter_language_list(all_languages): - min_engines_per_lang = 15 + min_engines_per_lang = 13 min_engines_per_country = 10 main_engines = [engine_name for engine_name in engines.keys() if 'general' in engines[engine_name].categories and