mirror of https://github.com/searxng/searxng.git
[doc] introduce about.language and sort engines by it
This commit is contained in:
parent
3c0f01aed7
commit
e28c6bda35
|
@ -43,6 +43,9 @@ Explanation of the :ref:`general engine configuration` shown in the table
|
||||||
- ``!{{mod.shortcut}}``
|
- ``!{{mod.shortcut}}``
|
||||||
- {{mod.__name__}}
|
- {{mod.__name__}}
|
||||||
- {{(mod.disabled and "y") or ""}}
|
- {{(mod.disabled and "y") or ""}}
|
||||||
|
{%- if mod.about and mod.about.language %}
|
||||||
|
({{mod.about.language | upper}})
|
||||||
|
{%- endif %}
|
||||||
- {{mod.timeout}}
|
- {{mod.timeout}}
|
||||||
- {{mod.weight or 1 }}
|
- {{mod.weight or 1 }}
|
||||||
{% if mod.engine_type == 'online' %}
|
{% if mod.engine_type == 'online' %}
|
||||||
|
|
|
@ -50,7 +50,11 @@ jinja_contexts = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
jinja_filters = {
|
jinja_filters = {
|
||||||
'sort_engines': lambda engines: sorted(engines, key=lambda engine: (engine[1].disabled, engine[0]))
|
'sort_engines':
|
||||||
|
lambda engines: sorted(
|
||||||
|
engines,
|
||||||
|
key=lambda engine: (engine[1].disabled, engine[1].about.get('language', ''), engine[0])
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# usage:: lorem :patch:`f373169` ipsum
|
# usage:: lorem :patch:`f373169` ipsum
|
||||||
|
|
|
@ -16,6 +16,7 @@ about = {
|
||||||
"use_official_api": False,
|
"use_official_api": False,
|
||||||
"require_api_key": False,
|
"require_api_key": False,
|
||||||
"results": 'HTML',
|
"results": 'HTML',
|
||||||
|
"language": 'de',
|
||||||
}
|
}
|
||||||
|
|
||||||
categories = ['general']
|
categories = ['general']
|
||||||
|
|
|
@ -18,6 +18,7 @@ about = {
|
||||||
"use_official_api": False,
|
"use_official_api": False,
|
||||||
"require_api_key": False,
|
"require_api_key": False,
|
||||||
"results": 'HTML',
|
"results": 'HTML',
|
||||||
|
"language": 'fr',
|
||||||
}
|
}
|
||||||
|
|
||||||
# engine dependent config
|
# engine dependent config
|
||||||
|
|
|
@ -14,6 +14,7 @@ about = {
|
||||||
"use_official_api": True,
|
"use_official_api": True,
|
||||||
"require_api_key": False,
|
"require_api_key": False,
|
||||||
"results": 'JSON',
|
"results": 'JSON',
|
||||||
|
"language": "de",
|
||||||
}
|
}
|
||||||
|
|
||||||
categories = ['videos']
|
categories = ['videos']
|
||||||
|
|
|
@ -22,6 +22,7 @@ about = {
|
||||||
"use_official_api": False,
|
"use_official_api": False,
|
||||||
"require_api_key": False,
|
"require_api_key": False,
|
||||||
"results": "HTML",
|
"results": "HTML",
|
||||||
|
"language": "cz",
|
||||||
}
|
}
|
||||||
|
|
||||||
base_url = 'https://search.seznam.cz/'
|
base_url = 'https://search.seznam.cz/'
|
||||||
|
|
|
@ -18,6 +18,7 @@ about = {
|
||||||
"use_official_api": False,
|
"use_official_api": False,
|
||||||
"require_api_key": False,
|
"require_api_key": False,
|
||||||
"results": 'HTML',
|
"results": 'HTML',
|
||||||
|
"language": 'pl',
|
||||||
}
|
}
|
||||||
|
|
||||||
categories = ['general']
|
categories = ['general']
|
||||||
|
|
|
@ -352,6 +352,9 @@ engines:
|
||||||
use_official_api: false
|
use_official_api: false
|
||||||
require_api_key: false
|
require_api_key: false
|
||||||
results: HTML
|
results: HTML
|
||||||
|
# We don't set language: de here because media.ccc.de is not just
|
||||||
|
# for a German audience. It contains many English videos and many
|
||||||
|
# German videos have English subtitles.
|
||||||
|
|
||||||
- name: ccengine
|
- name: ccengine
|
||||||
engine: ccengine
|
engine: ccengine
|
||||||
|
@ -1573,6 +1576,7 @@ engines:
|
||||||
use_official_api: false
|
use_official_api: false
|
||||||
require_api_key: false
|
require_api_key: false
|
||||||
results: HTML
|
results: HTML
|
||||||
|
language: ko
|
||||||
|
|
||||||
- name: rubygems
|
- name: rubygems
|
||||||
shortcut: rbg
|
shortcut: rbg
|
||||||
|
@ -1649,6 +1653,7 @@ engines:
|
||||||
use_official_api: false
|
use_official_api: false
|
||||||
require_api_key: false
|
require_api_key: false
|
||||||
results: HTML
|
results: HTML
|
||||||
|
language: de
|
||||||
|
|
||||||
- name: słownik języka polskiego
|
- name: słownik języka polskiego
|
||||||
engine: sjp
|
engine: sjp
|
||||||
|
@ -1676,6 +1681,7 @@ engines:
|
||||||
use_official_api: false
|
use_official_api: false
|
||||||
require_api_key: false
|
require_api_key: false
|
||||||
results: HTML
|
results: HTML
|
||||||
|
language: fr
|
||||||
|
|
||||||
- name: brave
|
- name: brave
|
||||||
shortcut: brave
|
shortcut: brave
|
||||||
|
|
Loading…
Reference in New Issue