From 4ab0ce31cf3eea9f8e708c7ccb2413ea1e0718d2 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Sat, 1 Mar 2025 02:55:32 +0100 Subject: [PATCH] Themes(charging_station: Add question for app name (#1258) --- .../charging_station/charging_station.json | 61 +++++++++++++++++- .../charging_station.proto.json | 63 ++++++++++++++++++- 2 files changed, 121 insertions(+), 3 deletions(-) diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 5f517611a0..fcf8ffa159 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -2544,9 +2544,68 @@ "fee=yes", "charge~*" ] - } + }, + "mappings+": [ + { + "if": { + "and": [ + "payment:app~*", + "payment:app!=no", + "payment:app!=yes" + ] + }, + "icon": "./assets/layers/questions/smartphone.svg", + "then": { + "en": "Payment is done using a dedicated app", + "nl": "Betalen via een app van het netwerk", + "hu": "Fizetés erre a célra szolgáló alkalmazással", + "zh_Hant": "使用專用應用程式付款", + "de": "Die Bezahlung erfolgt über eine spezielle App", + "fr": "Paiement via une application", + "sl": "Plačilo se opravi z namensko aplikacijo", + "ca": "El pagament es fa amb una app dedicada", + "fil": "Binabayaran gamit ang sariling app", + "es": "El pago se realiza utilizando una aplicación dedicada", + "zh_Hans": "使用专用APP支付", + "da": "Betaling sker ved hjælp af en dedikeret app", + "nb_NO": "Betaling utføres med et eget program", + "pt": "O pagamento é feito utilizando uma aplicação dedicada", + "it": "Pagamento effettuato utilizzando un'app dedicata", + "id": "Pembayaran dilakukan dengan aplikasi khusus", + "cs": "Platba se provádí pomocí speciální aplikace", + "pl": "Płatność odbywa się za pomocą dedykowanej aplikacji" + }, + "hideInAnswer": true + } + ] } }, + { + "id": "app-name", + "condition": { + "and": [ + "payment:app~*", + "payment:app!=no" + ] + }, + "question": { + "en": "What is the name of the app used for payment?", + "nl": "Hoe heet de app die gebruikt wordt voor betaling?" + }, + "freeform": { + "key": "payment:app", + "placeholder": { + "en": "Name of the app", + "nl": "Naam van de app" + }, + "type": "string" + }, + "render": { + "en": "Payment can be done using the app {payment:app}", + "nl": "Betalen kan met de app {payment:app}" + }, + "invalidValues": "payment:app=yes" + }, { "id": "Authentication", "#": "In some cases, charging is free but one has to be authenticated. We only ask for authentication if fee is no (or unset). By default one sees the questions for either the payment options or the authentication options, but normally not both", diff --git a/assets/layers/charging_station/charging_station.proto.json b/assets/layers/charging_station/charging_station.proto.json index c2eddc7072..841415eab7 100644 --- a/assets/layers/charging_station/charging_station.proto.json +++ b/assets/layers/charging_station/charging_station.proto.json @@ -485,9 +485,68 @@ "fee=yes", "charge~*" ] - } + }, + "mappings+": [ + { + "if": { + "and": [ + "payment:app~*", + "payment:app!=no", + "payment:app!=yes" + ] + }, + "icon": "./assets/layers/questions/smartphone.svg", + "then": { + "en": "Payment is done using a dedicated app", + "nl": "Betalen via een app van het netwerk", + "hu": "Fizetés erre a célra szolgáló alkalmazással", + "zh_Hant": "使用專用應用程式付款", + "de": "Die Bezahlung erfolgt über eine spezielle App", + "fr": "Paiement via une application", + "sl": "Plačilo se opravi z namensko aplikacijo", + "ca": "El pagament es fa amb una app dedicada", + "fil": "Binabayaran gamit ang sariling app", + "es": "El pago se realiza utilizando una aplicación dedicada", + "zh_Hans": "使用专用APP支付", + "da": "Betaling sker ved hjælp af en dedikeret app", + "nb_NO": "Betaling utføres med et eget program", + "pt": "O pagamento é feito utilizando uma aplicação dedicada", + "it": "Pagamento effettuato utilizzando un'app dedicata", + "id": "Pembayaran dilakukan dengan aplikasi khusus", + "cs": "Platba se provádí pomocí speciální aplikace", + "pl": "Płatność odbywa się za pomocą dedykowanej aplikacji" + }, + "hideInAnswer": true + } + ] } }, + { + "id": "app-name", + "condition": { + "and": [ + "payment:app~*", + "payment:app!=no" + ] + }, + "question": { + "en": "What is the name of the app used for payment?", + "nl": "Hoe heet de app die gebruikt wordt voor betaling?" + }, + "freeform": { + "key": "payment:app", + "placeholder": { + "en": "Name of the app", + "nl": "Naam van de app" + }, + "type": "string" + }, + "render": { + "en": "Payment can be done using the app {payment:app}", + "nl": "Betalen kan met de app {payment:app}" + }, + "invalidValues": "payment:app=yes" + }, { "id": "Authentication", "#": "In some cases, charging is free but one has to be authenticated. We only ask for authentication if fee is no (or unset). By default one sees the questions for either the payment options or the authentication options, but normally not both", @@ -1064,4 +1123,4 @@ }, "neededChangesets": 10 } -} +} \ No newline at end of file