From c4829f9ab82e934221f88b3a187c8bb8ec6ee89c Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Tue, 22 Feb 2022 19:55:08 +0100 Subject: [PATCH] Add mappings --- assets/themes/postboxes/postboxes.json | 30 +++++- langs/themes/de.json | 8 ++ langs/themes/en.json | 134 +++++++++++++++++++++++++ 3 files changed, 170 insertions(+), 2 deletions(-) diff --git a/assets/themes/postboxes/postboxes.json b/assets/themes/postboxes/postboxes.json index aefc139a3b..e67a2ab4e9 100644 --- a/assets/themes/postboxes/postboxes.json +++ b/assets/themes/postboxes/postboxes.json @@ -56,7 +56,33 @@ "zh_Hant": "郵筒", "id": "Kotak pos", "hu": "Postaláda" - } + }, + "mappings": [ + { + "if": { + "and": [ + "post_office=post_partner", + "name=" + ] + }, + "then": { + "en": "Post partner at a shop", + "de": "Postfiliale im Einzelhandel" + } + }, + { + "if": { + "and": [ + "post_office=post_partner", + "name~*" + ] + }, + "then": { + "en": "Post partner at {name}", + "de": "Postfiliale im {name}" + } + } + ] }, "description": { "en": "The layer showing postboxes.", @@ -489,7 +515,7 @@ ] }, { - "id": "addLayer", + "id": "shops", "name": { "en": "Shops" }, diff --git a/langs/themes/de.json b/langs/themes/de.json index b00308813d..74bb01e6ba 100644 --- a/langs/themes/de.json +++ b/langs/themes/de.json @@ -1005,6 +1005,14 @@ } }, "title": { + "mappings": { + "0": { + "then": "Postfiliale im Einzelhandel" + }, + "1": { + "then": "Postfiliale im {name}" + } + }, "render": "Briefkasten" } }, diff --git a/langs/themes/en.json b/langs/themes/en.json index fb0db2db45..c727c7d277 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1148,6 +1148,14 @@ } }, "title": { + "mappings": { + "0": { + "then": "Post partner at a shop" + }, + "1": { + "then": "Post partner at {name}" + } + }, "render": "Postbox" } }, @@ -1177,11 +1185,137 @@ }, "question": "What are the opening hours for this post office?", "render": "Opening Hours: {opening_hours_table()}" + }, + "letter-from": { + "mappings": { + "0": { + "then": "You can post letters here" + }, + "1": { + "then": "You can't post letters here" + } + }, + "question": "Can you post a letter here?", + "render": "You can post letters with these companies: {post_office:letter_from}" + }, + "parcel-from": { + "mappings": { + "0": { + "then": "You can send parcels here" + }, + "1": { + "then": "You can't send parcels here" + } + }, + "question": "Can you send a parcel here?", + "render": "You can post parcels with these companies: {post_office:parcel_from}" + }, + "parcel-pickup": { + "mappings": { + "0": { + "then": "You can pick up missed parcels here" + }, + "1": { + "then": "You can't pick up missed parcels here" + } + }, + "question": "Can you pick up missed parcels here?", + "render": "You can pick up parcels from these companies: {post_office:parcel_pickup}" + }, + "parcel-to": { + "mappings": { + "0": { + "then": "You can send parcels to here for pickup" + }, + "1": { + "then": "You can't send parcels to here for pickup" + } + }, + "question": "Can you send parcels to here for pickup?", + "render": "You can send parcels to here for pickup with these companies: {post_office:parcel_to}" + }, + "partner-brand": { + "mappings": { + "0": { + "then": "This location offers services for DHL" + }, + "1": { + "then": "This location offers services for DPD" + }, + "2": { + "then": "This location offers services for GLS" + }, + "3": { + "then": "This location offers services for UPS" + }, + "4": { + "then": "This location is a DHL Paketshop" + }, + "5": { + "then": "This location is a Hermes PaketShop" + }, + "6": { + "then": "This location is a PostNL-point" + }, + "7": { + "then": "This location offers services for bpost" + } + }, + "question": "For which brand does this location offer services?", + "render": "This location offers services for {post_office:brand}" + }, + "post_partner": { + "mappings": { + "0": { + "then": "This shop is a post partner" + }, + "1": { + "then": "This shop is not a post partner" + } + }, + "question": "Is this a post partner?" + }, + "stamps": { + "mappings": { + "0": { + "then": "You can buy stamps here" + }, + "1": { + "then": "You can't buy stamps here" + } + }, + "question": "Can you buy stamps here?", + "render": "You can buy stamps from companies: {post_office:stamps}" } }, "title": { "render": "Post Office" } + }, + "2": { + "description": "Add a new post partner to the map in an existing shop", + "name": "Shops", + "tagRenderings": { + "post_partner": { + "mappings": { + "0": { + "then": "This shop is a post partner" + }, + "1": { + "then": "This shop is not a post partner" + } + }, + "question": "Is this shop a post partner?" + } + }, + "title": { + "mappings": { + "0": { + "then": "{name}" + } + }, + "render": "Shop" + } } }, "shortDescription": "A map showing postboxes and post offices",