From f30d01ffabd50d7bb1a17da04e768c075bb8789d Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 3 Aug 2021 15:13:00 +0200 Subject: [mod] settings.yml: remove locales There are detected from the searx/translations directory --- searx_extra/update/update_currencies.py | 5 +++-- searx_extra/update/update_engine_descriptions.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'searx_extra') diff --git a/searx_extra/update/update_currencies.py b/searx_extra/update/update_currencies.py index 0cfb7a951..a572f4e9d 100755 --- a/searx_extra/update/update_currencies.py +++ b/searx_extra/update/update_currencies.py @@ -8,7 +8,8 @@ import json from sys import path from os.path import realpath, dirname, join -from searx import searx_dir, settings +from searx import searx_dir +from searx.locales import LOCALE_NAMES from searx.engines.wikidata import send_wikidata_query @@ -44,7 +45,7 @@ ORDER BY ?iso4217 ?article_name """ -LANGUAGES = settings['locales'].keys() +LANGUAGES = LOCALE_NAMES.keys() LANGUAGES_SPARQL = ', '.join(set(map(lambda l: repr(l.split('_')[0]), LANGUAGES))) diff --git a/searx_extra/update/update_engine_descriptions.py b/searx_extra/update/update_engine_descriptions.py index cf9007da3..37be77177 100755 --- a/searx_extra/update/update_engine_descriptions.py +++ b/searx_extra/update/update_engine_descriptions.py @@ -8,6 +8,7 @@ from lxml.html import fromstring from searx.engines.wikidata import send_wikidata_query from searx.utils import extract_text +from searx.locales import LOCALE_NAMES import searx import searx.search import searx.network @@ -35,7 +36,7 @@ WHERE { ORDER BY ?itemLang """ -LANGUAGES = searx.settings['locales'].keys() +LANGUAGES = LOCALE_NAMES.keys() LANGUAGES_SPARQL = ', '.join(set(map(lambda l: repr(l.split('_')[0]), LANGUAGES))) IDS = None -- cgit v1.2.3