Attempt to update icon based on survey date, small translation update

This commit is contained in:
pietervdvn 2021-05-17 00:16:54 +02:00
parent a8463ac0ce
commit ebc89385ea
3 changed files with 9 additions and 8 deletions

View file

@ -11,6 +11,10 @@
"source": { "source": {
"osmTags": "emergency=defibrillator" "osmTags": "emergency=defibrillator"
}, },
"calculatedTags": [
"_days_since_last_survey=Math.floor(new Date() - new Date(feat.properties['survey:date'])/(1000*60*60*24))",
"_recently_surveyed=Number(feat.properties._days_since_last_survey) <= 90"
],
"minzoom": 12, "minzoom": 12,
"title": { "title": {
"render": { "render": {
@ -26,11 +30,7 @@
"render": "./assets/themes/aed/aed.svg", "render": "./assets/themes/aed/aed.svg",
"mappings": [ "mappings": [
{ {
"if": { "if": "_recently_surveyed=true",
"and": [
"survey:date~*"
]
},
"then": { "then": {
"en": "./assets/layers/defibrillator/aed_checked.svg" "en": "./assets/layers/defibrillator/aed_checked.svg"
} }

View file

@ -153,7 +153,8 @@
"de": "Erledigt!" "de": "Erledigt!"
}, },
"retrying": { "retrying": {
"en": "Loading data failed. Trying again... ({count})", "en": "Loading data failed. Trying again in {count} seconds...",
"nl": "Data inladed mislukt - wordt opnieuw geladen over {count} seconden",
"ca": "La càrrega de dades ha fallat. Tornant-ho a intentar... ({count})", "ca": "La càrrega de dades ha fallat. Tornant-ho a intentar... ({count})",
"es": "La carga de datos ha fallado. Volviéndolo a probar... ({count})", "es": "La carga de datos ha fallado. Volviéndolo a probar... ({count})",
"gl": "A carga dos datos fallou. Tentándoo de novo... ({count})", "gl": "A carga dos datos fallou. Tentándoo de novo... ({count})",