searxng/searx
Markus Heiser 3df7d50df0 [fix] replace language_support by a language/region view
Many WEB-search engines (e.g. startpage) response best results if a **region**
is selected, most often a language filter is also in the properties of the
WEB-search engine.

hint::

   The **search language** should not be mixed: sometimes the language argument
   is just the language of the UI with none effect on the result list.

To summarize:

Some WEB-search engines have language codes (e.g. `ca`) in their properties,
other have a region codes (e.g. `ca-ES`), some have regions and languages in
their properties (e.g. startpage) 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 several WEB-search engines have best results when there is a
region selected.

  This *language-centric* view in SearXNG is misleading when we need
  region-codes to parameterize a 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 (`'type': 'engine_properties'`) / see commit previous
  commit:

    [mod] engines_languages.json: add new type EngineProperties

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-29 18:13:46 +02:00
..
answerers [fix] issue reported by pylint 22.1.0 2022-02-04 09:45:35 +01:00
data [mod] qwant: moved supported_languages to type EngineProperties 2022-08-29 18:13:46 +02:00
engines [mod] qwant: moved supported_languages to type EngineProperties 2022-08-29 18:13:46 +02:00
infopage Donation link: default value to searxng.org, can be hidden or custom 2022-07-02 11:29:21 +02:00
metrics [fix] prepare for pylint 2.14.0 2022-06-03 15:41:52 +02:00
network bing.py: resolve bing.com/ck/a redirections 2022-07-08 22:02:21 +02:00
plugins [mod] limiter plugin: Accept-Encoding handling 2022-08-25 23:21:30 +02:00
search [fix] replace language_support by a language/region view 2022-08-29 18:13:46 +02:00
shared [fix] typo in uWSGI cache: searxcache --> searxngcache 2022-08-07 12:31:09 +02:00
static [build] /static 2022-08-27 06:52:20 +00:00
templates/simple [fix] replace language_support by a language/region view 2022-08-29 18:13:46 +02:00
translations [translations] update from Weblate 2022-08-26 07:24:01 +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 EngineProperties 2022-08-29 18:13:46 +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] pyright repported errors 2022-07-30 18:04:44 +02:00
exceptions.py [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
external_bang.py External bang: bug fix: URL encode the query so "!!g 1+1" works as intended 2022-08-27 07:10:26 +00: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] add back missing languages & regions (followup of PR #1071) 2022-04-22 12:09:42 +02:00
locales.py [fix] get_engine_locale: better approximation of 'en' is 'en-US' 2022-08-14 15:45:07 +02:00
preferences.py [fix] typo: add missing 'n' in center_aligment --> center_alignment 2022-07-03 17:35:54 +02:00
query.py [mod] add flags to the languages filter 2022-03-19 15:09:13 +01:00
redislib.py [mod] redislib - optimize LUA script registration. 2022-05-30 11:21:09 +02: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 Merge pull request #1699 from liimee/eng-app-store 2022-08-27 07:43:23 +02:00
settings_defaults.py Merge pull request #1428 from return42/fix-center_aligment 2022-07-07 09:43:12 +02: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 [fix] pyright repported errors 2022-07-30 18:04:44 +02:00
version.py [fix] pyright repported errors 2022-07-30 18:04:44 +02: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-08-29 18:13:46 +02:00
webutils.py theme: remove __common__ 2022-05-07 19:40:48 +02:00