mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
data: currencies: use SQLite instead of JSON
This commit is contained in:
parent
83d4a2ebb0
commit
71f1789be0
7 changed files with 10155 additions and 15018 deletions
|
|
@ -10,7 +10,7 @@ from functools import partial
|
|||
|
||||
from flask_babel import gettext
|
||||
|
||||
from searx.data import OSM_KEYS_TAGS, CURRENCIES
|
||||
from searx.data import OSM_KEYS_TAGS, fetch_name_from_iso4217
|
||||
from searx.utils import searx_useragent
|
||||
from searx.external_urls import get_external_url
|
||||
from searx.engines.wikidata import send_wikidata_query, sparql_string_escape, get_thumbnail
|
||||
|
|
@ -449,9 +449,9 @@ def get_key_label(key_name, lang):
|
|||
# https://taginfo.openstreetmap.org/keys/currency#values
|
||||
currency = key_name.split(':')
|
||||
if len(currency) > 1:
|
||||
o = CURRENCIES['iso4217'].get(currency[1])
|
||||
if o:
|
||||
return get_label(o, lang).lower()
|
||||
label = fetch_name_from_iso4217(currency[1], lang)
|
||||
if label:
|
||||
return label
|
||||
return currency[1]
|
||||
|
||||
labels = OSM_KEYS_TAGS['keys']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue