Allow adding extra tags
This commit is contained in:
parent
8332650ea3
commit
943db6b02d
13 changed files with 57 additions and 70 deletions
|
@ -396,32 +396,17 @@
|
|||
},
|
||||
"condition": "ref=",
|
||||
"freeform": {
|
||||
"key": "brand"
|
||||
"key": "brand",
|
||||
"type": "nsi",
|
||||
"helperArgs": [
|
||||
"amenity=public_bookcase",
|
||||
"nobrand="
|
||||
],
|
||||
"placeholder": {
|
||||
"en": "Name of the network"
|
||||
}
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"then": {
|
||||
"en": "Part of the network 'Little Free Library'",
|
||||
"nl": "Deel van het netwerk 'Little Free Library'",
|
||||
"de": "Der Bücherschrank gehört zum Netzwerk 'Little Free Library'",
|
||||
"fr": "Fait partie du réseau Little Free Library",
|
||||
"it": "Fa parte della rete 'Little Free Library'",
|
||||
"hu": "A „Little Free Library” hálózat része",
|
||||
"es": "Parte de la red 'Little Free Library'",
|
||||
"pl": "Część sieci \"Little Free Library\"",
|
||||
"ca": "Part de la xarxa 'Little Free Library'",
|
||||
"cs": "Součást sítě 'Little Free Library'"
|
||||
},
|
||||
"if": {
|
||||
"and": [
|
||||
"brand=Little Free Library",
|
||||
"nobrand="
|
||||
]
|
||||
},
|
||||
"addExtraTags": [
|
||||
"brand:wikidata=Q6650101"
|
||||
]
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"and": [
|
||||
|
@ -438,7 +423,10 @@
|
|||
"hu": "Ez a nyilvános könyvespolc nem része egy nagyobb hálózatnak",
|
||||
"ca": "Aquesta prestatgeria pública no és part d'una xarxa més gran",
|
||||
"cs": "Tato veřejná knihobudka není součástí větší sítě"
|
||||
}
|
||||
},
|
||||
"addExtraTags": [
|
||||
"brand:wikidata="
|
||||
]
|
||||
}
|
||||
],
|
||||
"id": "public_bookcase-brand"
|
||||
|
@ -639,4 +627,4 @@
|
|||
"neededChangesets": 5
|
||||
},
|
||||
"allowMove": true
|
||||
}
|
||||
}
|
|
@ -6032,9 +6032,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Part de la xarxa 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "Aquesta prestatgeria pública no és part d'una xarxa més gran"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6263,9 +6263,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Součást sítě 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "Tato veřejná knihobudka není součástí větší sítě"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2166,7 +2166,7 @@
|
|||
"title": "Ladestation für Elektrofahrräder"
|
||||
},
|
||||
"1": {
|
||||
"title": "Ladestation für Elektrofahrräder"
|
||||
"title": "Ladestation für Autos"
|
||||
}
|
||||
},
|
||||
"tagRenderings": {
|
||||
|
@ -7467,9 +7467,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Der Bücherschrank gehört zum Netzwerk 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "Der Bücherschrank gehört zu keinem Netzwerk"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1495,6 +1495,11 @@
|
|||
},
|
||||
"question": "What is the relative location of this bicycle parking?"
|
||||
},
|
||||
"charge": {
|
||||
"question": "How much does it cost to park your bike here?",
|
||||
"questionHint": "This is the amount which is charged for a single bike",
|
||||
"render": "Parking your bike costs {charge}"
|
||||
},
|
||||
"fee": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
|
@ -7590,11 +7595,11 @@
|
|||
"question": "Is this bookcase located outdoors?"
|
||||
},
|
||||
"public_bookcase-brand": {
|
||||
"freeform": {
|
||||
"placeholder": "Name of the network"
|
||||
},
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Part of the network 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "This public bookcase is not part of a bigger network"
|
||||
}
|
||||
},
|
||||
|
@ -10651,6 +10656,10 @@
|
|||
"4": {
|
||||
"human": "{quantity} months",
|
||||
"humanSingular": "one month"
|
||||
},
|
||||
"5": {
|
||||
"human": "{quantity} years",
|
||||
"humanSingular": "one year"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3448,13 +3448,6 @@
|
|||
"then": "Solo accesible a clientes"
|
||||
}
|
||||
}
|
||||
},
|
||||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Parte de la red 'Little Free Library'"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -595,6 +595,9 @@
|
|||
},
|
||||
"1": {
|
||||
"then": "Ce banc n'a pas d'oeuvre d'art intégrée"
|
||||
},
|
||||
"2": {
|
||||
"then": "Ce banc ne comporte <span class=\"subtle\">probablement</span> pas d'œuvre d'art"
|
||||
}
|
||||
},
|
||||
"question": "Est-ce que ce banc inclut un élément artistique ?",
|
||||
|
@ -654,7 +657,7 @@
|
|||
"then": "Ce banc n'a pas d'inscription"
|
||||
},
|
||||
"1": {
|
||||
"then": "Ce banc n'a<span class='subtle'>(probablement)</span> pas d'inscription"
|
||||
"then": "Ce banc n'a <span class='subtle'>(probablement)</span> pas d'inscription"
|
||||
}
|
||||
},
|
||||
"question": "Est-ce que ce banc possède une inscription ?",
|
||||
|
@ -2960,6 +2963,13 @@
|
|||
"question": "Quelle est la profondeur de cet ascenseur ?",
|
||||
"render": "Cet ascenseur a une profondeur de {canonical(length)}"
|
||||
},
|
||||
"elevator-shape": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Cet ascenseur est de forme rectangulaire"
|
||||
}
|
||||
}
|
||||
},
|
||||
"elevator-width": {
|
||||
"question": "Quelle est la largeur de cet ascenseur ?",
|
||||
"render": "Cet ascenseur a une largeur de {canonical(width)}"
|
||||
|
@ -4502,9 +4512,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Fait partie du réseau Little Free Library"
|
||||
},
|
||||
"1": {
|
||||
"then": "Cette microbibliothèque ne fait pas partie d'un réseau/groupe"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -712,9 +712,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "A „Little Free Library” hálózat része"
|
||||
},
|
||||
"1": {
|
||||
"then": "Ez a nyilvános könyvespolc nem része egy nagyobb hálózatnak"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1967,9 +1967,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Fa parte della rete 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "Questa microbiblioteca non fa parte di una rete"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1211,6 +1211,11 @@
|
|||
},
|
||||
"question": "Wat is de relatieve locatie van deze parking??"
|
||||
},
|
||||
"charge": {
|
||||
"question": "Hoeveel kost het om een fiets te stallen?",
|
||||
"questionHint": "Dit is de kostprijs voor een enkele fiets",
|
||||
"render": "Je fiets hier parkeren kost {charge}"
|
||||
},
|
||||
"fee": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
|
@ -6310,9 +6315,6 @@
|
|||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Deel van het netwerk 'Little Free Library'"
|
||||
},
|
||||
"1": {
|
||||
"then": "Dit boekenruilkastje maakt geen deel uit van een netwerk"
|
||||
}
|
||||
},
|
||||
|
@ -8710,6 +8712,10 @@
|
|||
"4": {
|
||||
"human": "{quantity} maanden",
|
||||
"humanSingular": "één maand"
|
||||
},
|
||||
"5": {
|
||||
"human": "{quantity} jaar",
|
||||
"humanSingular": "één jaar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2234,17 +2234,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"public_bookcase": {
|
||||
"tagRenderings": {
|
||||
"public_bookcase-brand": {
|
||||
"mappings": {
|
||||
"0": {
|
||||
"then": "Część sieci \"Little Free Library\""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"questions": {
|
||||
"tagRenderings": {
|
||||
"check_date": {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
let maintag = helperArgs[0].toString()
|
||||
let tag = key
|
||||
let addExtraTags = helperArgs[1].split(";")
|
||||
|
||||
const path = `${tag}s/${maintag.split("=")[0]}/${maintag.split("=")[1]}`
|
||||
|
||||
|
@ -132,6 +133,11 @@
|
|||
})
|
||||
}
|
||||
|
||||
// If we have layer-defined extra tags, also add them
|
||||
addExtraTags.forEach((extraTag) => {
|
||||
tags[extraTag.split("=")[0]] = extraTag.split("=")[1]
|
||||
})
|
||||
|
||||
// Finally, set the extra tags
|
||||
extraTags.setData(tags)
|
||||
}
|
||||
|
|
|
@ -24,6 +24,10 @@ export default class NameSuggestionIndexValidator extends Validator {
|
|||
"main",
|
||||
"The main tag to give suggestions for, e.g. `amenity=restaurant`.",
|
||||
],
|
||||
[
|
||||
"addExtraTags",
|
||||
"Extra tags to add to the suggestions, e.g. `nobrand=yes`.",
|
||||
],
|
||||
]
|
||||
),
|
||||
]),
|
||||
|
|
Loading…
Reference in a new issue