Update uk_addresses.json

This commit is contained in:
RobJN 2022-06-24 21:35:23 +01:00 committed by Pieter Vander Vennet
parent 8faddbd0b5
commit 07ee80a675

View file

@ -256,17 +256,24 @@
}, },
{ {
"id": "uk_addresses_unit", "id": "uk_addresses_unit",
"render": "<b>{addr:unit}</b>", "render": "<div class='subtle'>Sub-unit (e.g. 1, Flat 2, Unit C)</div><div><b>{addr:unit}</b></div>",
"question": { "question": {
"en": "What is the sub-unit for this address? <div class='subtle'>Some named building or large complexes are split into sub-units (e.g. \"1\", \"Flat 2\", \"Unit C\")</div>" "en": "What is the sub-unit for this address? <div class='subtle'>Some named building or large complexes are split into sub-units</div>"
}, },
"freeform": { "freeform": {
"key": "addr:unit", "key": "addr:unit",
"addExtraTags": [ "placeholder": "Sub-unit (e.g. 1, Flat 2, Unit C)",
"not:addr:unit=" "addExtraTags": ["not:addr:unit="]
]
}, },
"mappings": [ "mappings": [
{
"if": "not:addr:unit=yes",
"then": "<div class='subtle'>Sub-unit (e.g. 1, Flat 2, Unit C)</div><div>There is no sub-unit within this address</div>",
"addExtraTags": [
"addr:unit="
],
"hideInAnswer": true
},
{ {
"if": "not:addr:unit=yes", "if": "not:addr:unit=yes",
"then": "There is no sub-unit within this address", "then": "There is no sub-unit within this address",
@ -276,7 +283,7 @@
}, },
{ {
"if": "addr:unit=", "if": "addr:unit=",
"then": "<div class='subtle'>Sub-unit (e.g. \"1\", \"Flat 2\", \"Unit C\")</div>", "then": "<div class='subtle'>Sub-unit (e.g. 1, Flat 2, Unit C)</div>",
"hideInAnswer": true "hideInAnswer": true
} }
], ],
@ -290,15 +297,26 @@
}, },
{ {
"id": "uk_addresses_housename", "id": "uk_addresses_housename",
"question": "What is the house or building name for this address?<div class='subtle'>As shown on a sign (e.g. \"Rose Cottage\", \"Broadcasting House\", \"Acme Corp HQ\"). Please do NOT add names of the people who live here!</div>", "question": "What is the house or building name for this address?<div class='subtle'>As shown on a sign. Please do NOT add names of the people who live here!</div>",
"render": "<b>{addr:housename}</b>", "render": "<div class='subtle'>House or building name</div><div><b>{addr:housename}</b></div>",
"freeform": { "freeform": {
"key": "addr:housename", "key": "addr:housename",
"placeholder": "Name (e.g. Rose Cottage, Broadcasting House, Acme Corp HQ)",
"addExtraTags": [ "addExtraTags": [
"nohousename=" "nohousename="
] ]
}, },
"mappings": [ "mappings": [
{
"if": {
"and": [
"nohousename=yes",
"addr:housename="
]
},
"then": "<div class='subtle'>House or building name</div><div>This building has no housename</div>",
"hideInAnswer": true
},
{ {
"if": { "if": {
"and": [ "and": [
@ -323,17 +341,28 @@
}, },
{ {
"id": "uk_addresses_housenumber", "id": "uk_addresses_housenumber",
"render": "<b>{addr:housenumber}</b>", "render": "<div class='subtle'>Number (e.g. 1, 1A, 2)</div><div><b>{addr:housenumber}</b></div>",
"question": { "question": {
"en": "What is the house or building number for this address?" "en": "What is the house or building number for this address?"
}, },
"freeform": { "freeform": {
"key": "addr:housenumber", "key": "addr:housenumber",
"placeholder": "Number (e.g. 1, 1A, 2)",
"addExtraTags": [ "addExtraTags": [
"nohousenumber=" "nohousenumber="
] ]
}, },
"mappings": [ "mappings": [
{
"if": "nohousenumber=yes",
"then": {
"en": "<div class='subtle'>Number (e.g. 1, 1A, 2)</div><div>This building has no house number</div>"
},
"addExtraTags": [
"addr:housenumber="
],
"hideInAnswer": true
},
{ {
"if": "nohousenumber=yes", "if": "nohousenumber=yes",
"then": { "then": {
@ -350,19 +379,32 @@
{ {
"id": "uk_addresses_placename", "id": "uk_addresses_placename",
"question": { "question": {
"en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")</div>" "en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address</div>"
}, },
"render": { "render": {
"en": "<b>{addr:substreet}</b>" "en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div><div><b>{addr:substreet}</b></div>"
}, },
"freeform": { "freeform": {
"key": "addr:substreet", "key": "addr:substreet",
"placeholder": "Place (e.g. The Cross, West Business Park, Castle Mews)",
"addExtraTags": [ "addExtraTags": [
"not:addr:parentstreet=",
"addr:parentstreet:={addr:street}", "addr:parentstreet:={addr:street}",
"addr:street=" "addr:street=",
"not:addr:substreet="
] ]
}, },
"mappings": [ "mappings": [
{
"if": "not:addr:substreet=yes",
"then": {
"en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div><div>No extra place name is given or needed</div>"
},
"addExtraTags": [
"addr:substreet="
],
"hideInAnswer": true
},
{ {
"if": "not:addr:substreet=yes", "if": "not:addr:substreet=yes",
"then": { "then": {
@ -375,7 +417,7 @@
{ {
"if": "addr:substreet=", "if": "addr:substreet=",
"then": { "then": {
"en": "<div class='subtle'>Place (e.g. \"Castle Mews\", \"West Business Park\")</div>" "en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div>"
}, },
"hideInAnswer": true "hideInAnswer": true
} }
@ -385,19 +427,30 @@
{ {
"id": "uk_addresses_placename_with_parent", "id": "uk_addresses_placename_with_parent",
"question": { "question": {
"en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")</div>" "en": "What is the place or locality for this address?<div class='subtle'>This is additional information that appears before (or instead of) a street name in the address</div>"
}, },
"render": { "render": {
"en": "<b>{addr:substreet}</b>" "en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div><div><b>{addr:substreet}</b></div>"
}, },
"freeform": { "freeform": {
"key": "addr:substreet", "key": "addr:substreet",
"placeholder": "Place (e.g. The Cross, West Business Park, Castle Mews)",
"addExtraTags": [ "addExtraTags": [
"addr:street=", "addr:street=",
"not:addr:substreet=" "not:addr:substreet="
] ]
}, },
"mappings": [ "mappings": [
{
"if": "not:addr:substreet=yes",
"then": {
"en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div><div>No extra place name is given or needed</div>"
},
"addExtraTags": [
"addr:substreet="
],
"hideInAnswer": true
},
{ {
"if": "not:addr:substreet=yes", "if": "not:addr:substreet=yes",
"then": { "then": {
@ -410,7 +463,7 @@
{ {
"if": "addr:substreet=", "if": "addr:substreet=",
"then": { "then": {
"en": "<div class='subtle'>Place (e.g. \"Castle Mews\", \"West Business Park\")</div>" "en": "<div class='subtle'>Place (e.g. Castle Mews, West Business Park)</div>"
}, },
"hideInAnswer": true "hideInAnswer": true
} }
@ -435,14 +488,30 @@
}, },
{ {
"id": "uk_addresses_street", "id": "uk_addresses_street",
"render": "<b>{addr:street}</b>", "render": "<div class='subtle'>Street name</div><div><b>{addr:street}</b></div>",
"question": { "question": {
"en": "What is the street name for this address?" "en": "What is the street name for this address?"
}, },
"freeform": { "freeform": {
"key": "addr:street" "key": "addr:street",
"placeholder": "Other (please specify)"
}, },
"mappings": [ "mappings": [
{
"if": "addr:street:={_closest_street:0:name}",
"then": "<div class='subtle'>Street name</div><div><b>{_closest_street:0:name}</b></div>",
"hideInAnswer": true
},
{
"if": "addr:street:={_closest_street:1:name}",
"then": "<div class='subtle'>Street name</div><div><b>{_closest_street:1:name}</b></div>",
"hideInAnswer": true
},
{
"if": "addr:street:={_closest_street:2:name}",
"then": "<div class='subtle'>Street name</div><div><b>{_closest_street:2:name}</b></div>",
"hideInAnswer": true
},
{ {
"if": "addr:street:={_closest_street:0:name}", "if": "addr:street:={_closest_street:0:name}",
"then": "<b>{_closest_street:0:name}</b>", "then": "<b>{_closest_street:0:name}</b>",
@ -468,17 +537,24 @@
}, },
{ {
"id": "uk_addresses_parentstreet", "id": "uk_addresses_parentstreet",
"render": "<b>{addr:parentstreet}</b>", "render": "<div class='subtle'>Parent street name</div><div><b>{addr:parentstreet}</b></div>",
"question": { "question": {
"en": "What is the parent street name for this address?<div class='subtle'>This street name will appear after the place name or first street name in the address</div>" "en": "What is the parent street name for this address?<div class='subtle'>This street name will appear after the place name or first street name in the address</div>"
}, },
"freeform": { "freeform": {
"key": "addr:parentstreet", "key": "addr:parentstreet",
"addExtraTags": [ "placeholder": "Other (please specify)",
"not:addr:parentstreet=" "addExtraTags": ["not:addr:parentstreet="]
]
}, },
"mappings": [ "mappings": [
{
"if": "not:addr:parentstreet=yes",
"then": "<div class='subtle'>Parent street name</div><div>No parent street name is needed within this address</div>",
"addExtraTags": [
"addr:parentstreet="
],
"hideInAnswer": true
},
{ {
"if": "not:addr:parentstreet=yes", "if": "not:addr:parentstreet=yes",
"then": "No parent street name is needed within this address", "then": "No parent street name is needed within this address",
@ -486,6 +562,21 @@
"addr:parentstreet=" "addr:parentstreet="
] ]
}, },
{
"if": "addr:parentstreet:={_closest_street:0:name}",
"then": "<div class='subtle'>Parent street name</div><div><b>{_closest_street:0:name}</b></div>",
"hideInAnswer": true
},
{
"if": "addr:parentstreet:={_closest_street:1:name}",
"then": "<div class='subtle'>Parent street name</div><div><b>{_closest_street:1:name}</b></div>",
"hideInAnswer": true
},
{
"if": "addr:parentstreet:={_closest_street:2:name}",
"then": "<div class='subtle'>Parent street name</div><div><b>{_closest_street:2:name}</b></div>",
"hideInAnswer": true
},
{ {
"if": "addr:parentstreet:={_closest_street:0:name}", "if": "addr:parentstreet:={_closest_street:0:name}",
"then": "<b>{_closest_street:0:name}</b>", "then": "<b>{_closest_street:0:name}</b>",
@ -523,7 +614,8 @@
"en": "Please explain what the address is so that someone else can look at it" "en": "Please explain what the address is so that someone else can look at it"
}, },
"freeform": { "freeform": {
"key": "fixme:addr" "key": "fixme:addr",
"placeholder": "Type here..."
}, },
"mappings": [ "mappings": [
{ {