searxng/searx
Markus Heiser 4a28a5e6f6 [fix] replace language_support by a language/region view
Most engines response best results if a region is selected, most often a
language is also in the properties of a engine and sometimes the language
argument is just the language of the UI.  Most often choosing a language has a
minor effect on the result list.

To summarize:

Some engines have language codes (e.g. `ca`) in their properties, some have
region codes (e.g. `ca-ES`), some have regions and languages in their properties
and other engine do not have any language or region support.

In the past we generalized *language* over all kind of engines without taking
into mind that most engines gave best result when there is a region selected.

  This *language-centric* view in SearXNG is misleading when we need
  region-codes to parameterize engine request!

This patch replaces the *language-centric* view by a "language / region" view.

Conclusions:

With regions we can't say any longer that a engine supports *this or that*
language, by example: when the user selects 'zh' and a engine supports only
region codes like 'zh-TW' or 'zh-CN' we do not what results the user expects /
similar with 'en' or 'fr when the engine needs a region tag.

- Since it is unclear what the user expects by his language selection, we can't
  assert a property that says: "supports_selected_language"

  The feature is replaced in the UI by the wider sense of "language_support",
  what stands for:

    The engine has some kind of language support, either
    by a region tag or by a language tag.

- A list of "supported_languages" does not make sense when there are regions
  responsible for the result of an engine.

  The "supported_languages" has been removed from the /config URL

- The `has_language` test in the `searx/search/checker/impl.py` has been removed
  since it does not cover engines with region support.

  If there is a need for such a test we can implement new tests after all
  engines with language (region) support has been moved to the *supported
  properites* scheme (see searxng_extra/update/update_languages.py)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-19 14:35:02 +02:00
..
answerers [fix] issue reported by pylint 22.1.0 2022-02-04 09:45:35 +01:00
data Update searx.data - update_engine_descriptions.py 2022-04-16 13:17:39 +02:00
engines [mod] engines_languages.json: add new type engine_properties 2022-04-19 14:35:02 +02:00
infopage Merge pull request #1048 from Linerly/patch-1 2022-04-09 20:30:49 +02:00
metrics [enh] settings.yml: implement general.enable_metrics 2022-01-05 19:03:04 +01:00
network [mod] remove deprecate code 2022-01-29 08:54:12 +01:00
plugins [doc] add some documentation about the limiter plugin (and redis) 2022-03-25 11:26:10 +01:00
search [fix] replace language_support by a language/region view 2022-04-19 14:35:02 +02:00
shared [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
static [build] /static 2022-04-06 15:07:42 +02:00
templates [fix] replace language_support by a language/region view 2022-04-19 14:35:02 +02:00
translations [translations] update from Weblate 2022-04-15 07:18:31 +00:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
autocomplete.py [mod] engines_languages.json: add new type engine_properties 2022-04-19 14:35:02 +02:00
babel_extract.py [mod] move category and names of constants to searx/searxng.msg 2022-03-16 09:55:53 +01:00
compat.py [fix] add module for backward compatibility 2022-03-12 15:45:28 +01:00
exceptions.py [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
external_bang.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
external_urls.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
flaskfix.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
languages.py [fix] dailymotion engine: filter by language & country 2022-04-16 09:27:34 +02:00
locales.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
preferences.py [mod] infinite_scroll as preference 2022-02-20 22:58:51 +01:00
query.py [mod] add flags to the languages filter 2022-03-19 15:09:13 +01:00
results.py [simple theme] replace Image_layout.js with flexbox CS impl. 2022-02-26 22:31:47 +01:00
searxng.msg [mod] move category and names of constants to searx/searxng.msg 2022-03-16 09:55:53 +01:00
settings.yml [mod] Make a default domain for ebay 2022-04-17 10:37:12 +02:00
settings_defaults.py [interim fix] static files can't be delivered by HTTP. 2022-03-20 16:28:14 +01:00
settings_loader.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
unixthreadname.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
utils.py searx.utils.html_to_text: replace <br/> by a space 2022-04-16 09:45:57 +02:00
version.py [mod] version formatting 2022-02-21 21:18:37 +01:00
webadapter.py [fix] disabling all engines in a category makes the bang search in general 2022-01-03 20:23:46 +01:00
webapp.py [fix] replace language_support by a language/region view 2022-04-19 14:35:02 +02:00
webutils.py [mod] URL for the static file contains the sha1 2022-03-05 10:50:48 +00:00