mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] add back missing languages & regions (followup of PR #1071)
In PR #1071 the language catalog of dailymotion has been cleaned up, before
there had been over 7000 "languages" in the catalog.
As a side effect of this clean-up the language & region catalog in SearXNG has
been reduced [1].
This patch reduce the ``min_engines_per_lang`` from 13 to 12 to get the missed
languages back in language & region catalog of SearXNG.
[1] 3bb62823ec (diff-f3f00db0f87f95b882624a192e0aac21525638af0b18c9514e765fcf1991678d)
Requested-by: @tiekoetter in a Matrix chat
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -117,7 +117,8 @@ def get_territory_name(lang_code):
|
||||
country_name = None
|
||||
locale = get_locale(lang_code)
|
||||
try:
|
||||
country_name = locale.get_territory_name()
|
||||
if locale is not None:
|
||||
country_name = locale.get_territory_name()
|
||||
except FileNotFoundError as exc:
|
||||
print("ERROR: %s --> %s" % (locale, exc))
|
||||
return country_name
|
||||
@@ -190,7 +191,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 = 13
|
||||
min_engines_per_lang = 12
|
||||
min_engines_per_country = 7
|
||||
# pylint: disable=consider-using-dict-items, consider-iterating-dictionary
|
||||
main_engines = [
|
||||
|
||||
Reference in New Issue
Block a user