Merge branch 'master' into develop

This commit is contained in:
pietervdvn 2021-01-13 16:18:51 +01:00
commit 7a2b99a566
5 changed files with 51 additions and 6 deletions

View file

@ -94,6 +94,10 @@ export default class TagRenderingConfig {
throw `A question is defined, but no mappings nor freeform (key) are. The question is ${this.question.txt} at ${context}`
}
if(this.freeform && this.render === undefined){
throw `Detected a freeform key without rendering... Key: ${this.freeform.key} in ${context}`
}
if (json.multiAnswer) {
if ((this.mappings?.length ?? 0) === 0) {
throw "MultiAnswer is set, but no mappings are defined"

View file

@ -7,11 +7,20 @@
"render": {
"en": "Bicycle tube vending machine"
},
"mappings": [{
"if": "name~*",
"then": "Bicycle tube vending machine {name}"
}]
"mappings": [
{
"if": "name~*",
"then": "Bicycle tube vending machine {name}"
}
]
},
"titleIcons": [
{
"render": "<a href='https://fietsambassade.gent.be/' target='_blank'><img src='./assets/themes/cyclofix/fietsambassade_gent_logo_small.svg'/></a>",
"condition": "operator=De Fietsambassade Gent"
},
"defaults"
],
"icon": {
"render": "pin:#ffffff;./assets/layers/bicycle_tube_vending_machine/pinIcon.svg"
},
@ -113,6 +122,7 @@
"freeform": {
"key": "brand"
},
"render": "{brand} tubes are sold here",
"mappings": [
{
"if": "brand=Continental",
@ -123,7 +133,25 @@
"then": "Schwalbe tubes are sold here"
}
],
"multiAnswer": true
"multiAnswer": true,
"condition": "operator!=Schwalbe"
},
{
"question": "Who maintains this vending machine?",
"render": "This vending machine is maintained by {operator}",
"mappings": [
{
"if": "operator=Schwalbe",
"then": "Maintained by Schwalbe"
},
{
"if": "operator=Continental",
"then": "Maintained by Continental"
}
],
"freeform": {
"key": "operator"
}
},
{
"question": "Are other bicycle bicycle accessories sold here?",
@ -143,6 +171,10 @@
{
"if": "vending:bicycle_pump=yes",
"then": "Bicycle pumps are sold here"
},
{
"if": "vending:bicycle_lock=yes",
"then": "Bicycle locks are sold here"
}
],
"multiAnswer": true

View file

@ -163,7 +163,7 @@
"then": {
"en": "There are both tools and a pump present",
"nl": "Er is zowel een pomp als gereedschap aanwezig",
"fr": "IL y a des outils et une pompe",
"fr": "Il y a des outils et une pompe",
"gl": "Hai ferramentas e unha bomba de ar presentes",
"de": "Es sind sowohl Werkzeuge als auch eine Pumpe vorhanden"
}

View file

@ -188,6 +188,10 @@
"en": "On which level is this camera located?",
"nl": "Op welke verdieping bevindt deze camera zich?"
},
"render": {
"en": "Located on level {level}",
"nl": "Bevindt zich op verdieping {level}"
},
"freeform": {
"key": "level",
"type": "nat"
@ -287,6 +291,10 @@
"en": "How is this camera placed?",
"nl": "Hoe is deze camera geplaatst?"
},
"render": {
"en": "Mounting method: {mount}",
"nl": "Montage: {mount}"
},
"freeform": {
"key": "camera:mount"
},

View file

@ -97,6 +97,7 @@
"key": "opening_hours",
"type": "opening_hours"
},
"render": "{opening_hours_table(opening_hours)}",
"question": {
"nl": "Op welke uren is deze speeltuin toegankelijk?"
},