From 4bb0f18ecca513c05e55f2e916d6dc62182d1b84 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 16 Dec 2022 23:12:46 +0100 Subject: [PATCH 1/6] Fix last survey date for defibrillator --- assets/layers/defibrillator/defibrillator.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/defibrillator/defibrillator.json b/assets/layers/defibrillator/defibrillator.json index c5b1e35d73..ba55143d30 100644 --- a/assets/layers/defibrillator/defibrillator.json +++ b/assets/layers/defibrillator/defibrillator.json @@ -23,7 +23,7 @@ "osmTags": "emergency=defibrillator" }, "calculatedTags": [ - "_days_since_last_survey=Math.floor(new Date() - new Date(feat.properties['survey:date'])/(1000*60*60*24))", + "_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, From 203cac9b6b3e1b0e1f0c83b113fc4cb40ad43691 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 16 Dec 2022 23:14:33 +0100 Subject: [PATCH 2/6] Use split question for toilet layer --- assets/layers/toilet/toilet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/layers/toilet/toilet.json b/assets/layers/toilet/toilet.json index 4c46ef28e3..80ce2c3a44 100644 --- a/assets/layers/toilet/toilet.json +++ b/assets/layers/toilet/toilet.json @@ -233,7 +233,7 @@ "id": "toilet-charge" }, { - "builtin": "payment-options", + "builtin": "payment-options-split", "override": { "condition": "fee=yes" } From b540fa4c8b9a751c8cf917274940bbdcfebdb098 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 16 Dec 2022 23:20:38 +0100 Subject: [PATCH 3/6] Switch to lowercase --- assets/layers/ticket_validator/ticket_validator.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/layers/ticket_validator/ticket_validator.json b/assets/layers/ticket_validator/ticket_validator.json index 3c6312db03..192f4784ac 100644 --- a/assets/layers/ticket_validator/ticket_validator.json +++ b/assets/layers/ticket_validator/ticket_validator.json @@ -59,7 +59,7 @@ "then": { "en": "This ticket validator accepts OV-Chipkaart" }, - "hideInAnswer": "_country!=nl" + "hideInAnswer": true }, { "if": "payment:ov-chipkaart=yes", @@ -67,7 +67,7 @@ "then": { "en": "This ticket validator accepts OV-Chipkaart" }, - "hideInAnswer": true + "hideInAnswer": "_country!=nl" } ] } From a8c9de81f9a257dd316607a6a492731e1caeb7c0 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 16 Dec 2022 23:36:30 +0100 Subject: [PATCH 4/6] Add extra questions to ATM --- assets/layers/atm/atm.json | 109 ++++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/assets/layers/atm/atm.json b/assets/layers/atm/atm.json index d38c727779..17d16943b3 100644 --- a/assets/layers/atm/atm.json +++ b/assets/layers/atm/atm.json @@ -73,7 +73,100 @@ "en": "The ATM is operated by {operator}" } }, - "opening_hours" + "opening_hours", + { + "id": "cash_out", + "question": { + "en": "Can you withdraw cash from this ATM?" + }, + "mappings": [ + { + "if": "cash_out=", + "then": { + "en": "You can withdraw cash from this ATM" + }, + "hideInAnswer": true + }, + { + "if": "cash_out=yes", + "then": { + "en": "You can withdraw cash from this ATM" + } + }, + { + "if": "cash_out=no", + "then": { + "en": "You cannot withdraw cash from this ATM" + } + } + ] + }, + { + "id": "cash_in", + "question": { + "en": "Can you deposit cash into this ATM?" + }, + "mappings": [ + { + "if": "cash_in=", + "then": { + "en": "You probably cannot deposit cash into this ATM" + }, + "hideInAnswer": true + }, + { + "if": "cash_in=yes", + "then": { + "en": "You can deposit cash into this ATM" + } + }, + { + "if": "cash_in=no", + "then": { + "en": "You cannot deposit cash into this ATM" + } + } + ] + }, + { + "id": "speech_output", + "question": { + "en": "Does this ATM have speech output for visually impaired users?" + }, + "mappings": [ + { + "if": "speech_output=yes", + "then": { + "en": "This ATM has speech output, usually available through a headphone jack" + } + }, + { + "if": "speech_output=no", + "then": { + "en": "This ATM does not have speech output" + } + } + ] + }, + { + "id": "speech_output_language", + "condition": "speech_output=yes", + "render": { + "special": { + "type": "language_chooser", + "key": "speech_output", + "question": { + "en": "In which languages does this ATM have speech output?" + }, + "render_list_item": { + "en": "This ATM has speech output in {language():font-bold}" + }, + "render_single_language": { + "en": "This ATM has speech output in {language():font-bold}" + } + } + } + } ], "mapRendering": [ { @@ -83,5 +176,19 @@ "centroid" ] } + ], + "filter": [ + "open_now", + { + "id": "speech_output", + "options": [ + { + "question": { + "en": "With speech output" + }, + "osmTags": "speech_output=yes" + } + ] + } ] } \ No newline at end of file From c2f94fd791e0fbae03efc3cf3c1bc5472fcf66bf Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Fri, 16 Dec 2022 23:39:02 +0100 Subject: [PATCH 5/6] Translate tagrendering --- assets/tagRenderings/questions.json | 12 ++++-- langs/layers/en.json | 57 +++++++++++++++++++++++++++++ langs/shared-questions/nl.json | 18 +++++++++ 3 files changed, 83 insertions(+), 4 deletions(-) diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json index 5756feaca8..6a93e74ccd 100644 --- a/assets/tagRenderings/questions.json +++ b/assets/tagRenderings/questions.json @@ -918,7 +918,8 @@ "ifnot": "payment:coins=no", "icon": "./assets/tagRenderings/coins.svg", "then": { - "en": "Coins are accepted here" + "en": "Coins are accepted here", + "nl": "Muntgeld wordt hier aanvaard" } }, { @@ -926,7 +927,8 @@ "ifnot": "payment:notes=no", "icon": "./assets/tagRenderings/notes.svg", "then": { - "en": "Bank notes are accepted here" + "en": "Bank notes are accepted here", + "nl": "Bankbiljetten worden hier aanvaard" } }, { @@ -934,7 +936,8 @@ "ifnot": "payment_debit_cards=no", "icon": "./assets/tagRenderings/payment_card.svg", "then": { - "en": "Debit cards are accepted here" + "en": "Debit cards are accepted here", + "nl": "Betalen met debetkaarten kan hier" } }, { @@ -942,7 +945,8 @@ "ifnot": "payment:credit_cards=no", "icon": "./assets/tagRenderings/payment_card.svg", "then": { - "en": "Credit cards are accepted here" + "en": "Credit cards are accepted here", + "nl": "Betalen met creditkaarten kan hier" } } ] diff --git a/langs/layers/en.json b/langs/layers/en.json index 3fd1fa1c04..d487f06dfa 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -169,6 +169,15 @@ }, "atm": { "description": "ATMS to withdraw money", + "filter": { + "1": { + "options": { + "0": { + "question": "With speech output" + } + } + } + }, "name": "ATMs", "presets": { "0": { @@ -183,6 +192,34 @@ "question": "What brand is this ATM?", "render": "The brand of this ATM is {brand}" }, + "cash_in": { + "mappings": { + "0": { + "then": "You probably cannot deposit cash into this ATM" + }, + "1": { + "then": "You can deposit cash into this ATM" + }, + "2": { + "then": "You cannot deposit cash into this ATM" + } + }, + "question": "Can you deposit cash into this ATM?" + }, + "cash_out": { + "mappings": { + "0": { + "then": "You can withdraw cash from this ATM" + }, + "1": { + "then": "You can withdraw cash from this ATM" + }, + "2": { + "then": "You cannot withdraw cash from this ATM" + } + }, + "question": "Can you withdraw cash from this ATM?" + }, "name": { "render": "The name of this ATM is {name}" }, @@ -192,6 +229,26 @@ }, "question": "What company operates this ATM?", "render": "The ATM is operated by {operator}" + }, + "speech_output": { + "mappings": { + "0": { + "then": "This ATM has speech output, usually available through a headphone jack" + }, + "1": { + "then": "This ATM does not have speech output" + } + }, + "question": "Does this ATM have speech output for visually impaired users?" + }, + "speech_output_language": { + "render": { + "special": { + "question": "In which languages does this ATM have speech output?", + "render_list_item": "This ATM has speech output in {language():font-bold}", + "render_single_language": "This ATM has speech output in {language():font-bold}" + } + } } }, "title": { diff --git a/langs/shared-questions/nl.json b/langs/shared-questions/nl.json index e6f990bfe8..9068a0c91c 100644 --- a/langs/shared-questions/nl.json +++ b/langs/shared-questions/nl.json @@ -150,6 +150,24 @@ } } }, + "payment-options-split": { + "override": { + "mappings+": { + "0": { + "then": "Muntgeld wordt hier aanvaard" + }, + "1": { + "then": "Bankbiljetten worden hier aanvaard" + }, + "2": { + "then": "Betalen met debetkaarten kan hier" + }, + "3": { + "then": "Betalen met creditkaarten kan hier" + } + } + } + }, "phone": { "question": "Wat is het telefoonnummer van {title()}?" }, From 6207ddbd99b9adf53f6fb1e6312222b1bede48a2 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 17 Dec 2022 00:20:09 +0100 Subject: [PATCH 6/6] Add description to ticket validator preset --- assets/layers/ticket_validator/ticket_validator.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/layers/ticket_validator/ticket_validator.json b/assets/layers/ticket_validator/ticket_validator.json index 192f4784ac..6bfba5c49e 100644 --- a/assets/layers/ticket_validator/ticket_validator.json +++ b/assets/layers/ticket_validator/ticket_validator.json @@ -80,6 +80,9 @@ ], "title": { "en": "a ticket validator" + }, + "description": { + "en": "A ticket validator to validate a public transport ticket. This can be either a digital reader, reading a card or ticket, or a machine stamping or punching a ticket." } } ],