From 5986629c6bfe0fd800f30913f59b2cc43c9e58b6 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 21 Mar 2025 10:34:15 +0100 Subject: [fix] make data.traits - partial revert of commit 30a8204 The entries in the catalog of search languages are build up from the "Engine Traits" [1] and which entries are included in the catalog is controlled qby two threshold values [2]. If possible, the values should ensure that no languages or regions disappear from the catalog of search languages [3]. The threshold values should have been adjusted in commit 30a8204: - ``min_eng_per_region = 18`` - ``min_eng_per_lang = 22`` Because the threshold values were not adjusted, many entries were missing in the search language catalog. This bug has been fixed with this patch: the threshold values have been adjusted and the catalog of search languages has been completed again. [1] https://docs.searxng.org/dev/engines/enginelib.html#module-searx.enginelib.traits [2] https://github.com/searxng/searxng/blob/96a6e3dcb2283fa7ad9db4172a00582073a166d7/searxng_extra/update/update_engine_traits.py#L104-L105 [3] https://github.com/searxng/searxng/blob/master/searx/sxng_locales.py Closes: https://github.com/searxng/searxng/issues/4519 Signed-off-by: Markus Heiser --- searxng_extra/update/update_engine_traits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searxng_extra') diff --git a/searxng_extra/update/update_engine_traits.py b/searxng_extra/update/update_engine_traits.py index 51b86c39f..a28d4d496 100755 --- a/searxng_extra/update/update_engine_traits.py +++ b/searxng_extra/update/update_engine_traits.py @@ -101,8 +101,8 @@ def fetch_traits_map(): def filter_locales(traits_map: EngineTraitsMap): """Filter language & region tags by a threshold.""" - min_eng_per_region = 22 - min_eng_per_lang = 24 + min_eng_per_region = 18 + min_eng_per_lang = 22 _ = {} for eng in traits_map.values(): -- cgit v1.2.3