[fix] openstreetmap engine: map "all" language to English

This commit is contained in:
Alexandre Flament 2021-09-13 08:37:25 +02:00
parent e63410d2f4
commit 6f11b61cd5

View File

@ -220,6 +220,7 @@ 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
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)