mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[mod] update currencies.json and fetch_currencies.py
use a sparql request on wikidata to get the list of currencies. currencies.json contains the translation for all supported searx languages. Supersede #993
This commit is contained in:
@@ -20,6 +20,8 @@ def name_to_iso4217(name):
|
||||
global CURRENCIES
|
||||
name = normalize_name(name)
|
||||
currency = CURRENCIES['names'].get(name, [name])
|
||||
if isinstance(currency, str):
|
||||
return currency
|
||||
return currency[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user