summaryrefslogtreecommitdiff
path: root/searx/engines/openstreetmap.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-07-02 16:49:25 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2022-07-02 16:51:25 +0200
commit5831c15b49fb6ffeb19566deb37a0e470fd261e3 (patch)
tree7c1f7963a207183ecf64b125f651a3f71593685e /searx/engines/openstreetmap.py
parent6716c6b0c310425872e3c182f8428f623760bec9 (diff)
downloadsearxng-5831c15b49fb6ffeb19566deb37a0e470fd261e3.tar.gz
searxng-5831c15b49fb6ffeb19566deb37a0e470fd261e3.zip
[fix] engines/openstreetmap.py typo: user_langage --> user_language
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/openstreetmap.py')
-rw-r--r--searx/engines/openstreetmap.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py
index ecef9b60b..d44792077 100644
--- a/searx/engines/openstreetmap.py
+++ b/searx/engines/openstreetmap.py
@@ -206,7 +206,7 @@ def get_wikipedia_image(raw_value):
return get_external_url('wikimedia_image', raw_value)
-def fetch_wikidata(nominatim_json, user_langage):
+def fetch_wikidata(nominatim_json, user_language):
"""Update nominatim_json using the result of an unique to wikidata
For result in nominatim_json:
@@ -227,10 +227,10 @@ def fetch_wikidata(nominatim_json, user_langage):
wd_to_results.setdefault(wd_id, []).append(result)
if wikidata_ids:
- user_langage = 'en' if user_langage == 'all' else user_langage.split('-')[0]
+ user_language = 'en' if user_language == 'all' else user_language.split('-')[0]
wikidata_ids_str = " ".join(wikidata_ids)
query = wikidata_image_sparql.replace('%WIKIDATA_IDS%', sparql_string_escape(wikidata_ids_str)).replace(
- '%LANGUAGE%', sparql_string_escape(user_langage)
+ '%LANGUAGE%', sparql_string_escape(user_language)
)
wikidata_json = send_wikidata_query(query)
for wd_result in wikidata_json.get('results', {}).get('bindings', {}):
@@ -245,7 +245,7 @@ def fetch_wikidata(nominatim_json, user_langage):
# overwrite wikipedia link
wikipedia_name = wd_result.get('wikipediaName', {}).get('value')
if wikipedia_name:
- result['extratags']['wikipedia'] = user_langage + ':' + wikipedia_name
+ result['extratags']['wikipedia'] = user_language + ':' + wikipedia_name
# get website if not already defined
website = wd_result.get('website', {}).get('value')
if (