Skip to content

Commit

Permalink
Adding unit field to USA
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesKingdom committed Aug 13, 2017
1 parent d1cfc02 commit f352783
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion data/address-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{
"countryCodes": ["us"],
"format": [
["housenumber", "street"],
["housenumber", "street", "unit"],
["city", "state", "postcode"]
]
},
Expand Down
4 changes: 3 additions & 1 deletion data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ en:
# access=*
label: Access
address:
# 'addr:block_number=*, addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:county=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*'
# 'addr:block_number=*, addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:county=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*, addr:unit=*'
label: Address
placeholders:
block_number: Block Number
Expand Down Expand Up @@ -117,6 +117,7 @@ en:
subdistrict!vn: Ward/Commune/Townlet
suburb: Suburb
suburb!jp: Ward
unit: Unit
admin_level:
# admin_level=*
label: Admin Level
Expand Down Expand Up @@ -3556,6 +3557,7 @@ en:
natural/wetland:
# natural=wetland
name: Wetland
# 'terms: bog,marsh,reedbed,swamp,tidalflat'
terms: '<translate with synonyms or related terms for ''Wetland'', separated by commas>'
natural/wood:
# natural=wood
Expand Down
6 changes: 4 additions & 2 deletions data/presets/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
"addr:state",
"addr:street",
"addr:subdistrict",
"addr:suburb"
"addr:suburb",
"addr:unit"
],
"reference": {
"key": "addr"
Expand Down Expand Up @@ -138,7 +139,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions data/presets/fields/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"addr:state",
"addr:street",
"addr:subdistrict",
"addr:suburb"
"addr:suburb",
"addr:unit"
],
"reference": {"key": "addr"},
"icon": "address",
Expand Down Expand Up @@ -58,7 +59,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
}
}
8 changes: 7 additions & 1 deletion data/presets/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -9694,7 +9694,13 @@
"tags": {
"natural": "wetland"
},
"terms": [],
"terms": [
"bog",
"marsh",
"reedbed",
"swamp",
"tidalflat"
],
"name": "Wetland"
},
"natural/wood": {
Expand Down
5 changes: 3 additions & 2 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,8 @@
"subdistrict": "Subdistrict",
"subdistrict!vn": "Ward/Commune/Townlet",
"suburb": "Suburb",
"suburb!jp": "Ward"
"suburb!jp": "Ward",
"unit": "Unit"
}
},
"admin_level": {
Expand Down Expand Up @@ -4211,7 +4212,7 @@
},
"natural/wetland": {
"name": "Wetland",
"terms": ""
"terms": "bog,marsh,reedbed,swamp,tidalflat"
},
"natural/wood": {
"name": "Wood",
Expand Down

4 comments on commit f352783

@tohaklim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is addr:unit widely used/understood at all?

@bhousel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is addr:unit widely used/understood at all?

Yes, these are very common, at least in US addresses..

@1ec5
Copy link
Collaborator

@1ec5 1ec5 commented on f352783 Nov 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A later commit in #4235 ended up adding addr:unit to each country’s address format. If addr:unit was incorrectly applied to a country other than the U.S., please open an issue about removing it from that country’s format. Thanks!

@tohaklim
Copy link
Contributor

@tohaklim tohaklim commented on f352783 Nov 19, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.