1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00
searxng/searxng_extra/update
Markus Heiser 27369ebec2 [fix] searxng_extra/update/update_engine_descriptions.py (part 1)
Follow up of #2269

The script to update the descriptions of the engines does no longer work since
PR #2269 has been merged.

searx/engines/wikipedia.py
==========================

1. There was a misusage of zh-classical.wikipedia.org:

   - `zh-classical` is dedicate to classical Chinese [1] which is not
     traditional Chinese [2].

   - zh.wikipedia.org has LanguageConverter enabled [3] and is going to
     dynamically show simplified or traditional Chinese according to the
     HTTP Accept-Language header.

2. The update_engine_descriptions.py needs a list of all wikipedias.  The
   implementation from #2269 included only a reduced list:

   - https://meta.wikimedia.org/wiki/Wikipedia_article_depth
   - https://meta.wikimedia.org/wiki/List_of_Wikipedias

searxng_extra/update/update_engine_descriptions.py
==================================================

Before PR #2269 there was a match_language() function that did an approximation
using various methods.  With PR #2269 there are only the types in the data model
of the languages, which can be recognized by babel.  The approximation methods,
which are needed (only here) in the determination of the descriptions, must be
replaced by other methods.

[1] https://en.wikipedia.org/wiki/Classical_Chinese
[2] https://en.wikipedia.org/wiki/Traditional_Chinese_characters
[3] https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter

Closes: https://github.com/searxng/searxng/issues/2330
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-15 16:03:59 +02:00
..
__init__.py SearXNG: searxng_extra 2021-10-02 17:30:39 +02:00
update_ahmia_blacklist.py [mod] make python code pylint 2.16.1 compliant 2023-02-10 13:59:21 +01:00
update_currencies.py [fix] typos / reported by @kianmeng in searx PR-3366 2022-09-27 18:32:14 +02:00
update_engine_descriptions.py [fix] searxng_extra/update/update_engine_descriptions.py (part 1) 2023-04-15 16:03:59 +02:00
update_engine_traits.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
update_external_bangs.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
update_firefox_version.py [fix] remove usage of deprecated-module distutis 2023-02-10 15:31:54 +01:00
update_osm_keys_tags.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
update_pygments.py [theme] peel out oscar from SearXNG development 2022-04-30 13:20:27 +02:00
update_wikidata_units.py [docs] add documentation for the scripts in searxng_extra/update 2022-01-05 16:09:40 +01:00