mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02: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:
parent
1be6ab2a91
commit
46ca32c3cc
4 changed files with 15044 additions and 7774 deletions
File diff suppressed because it is too large
Load diff
|
@ -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]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue