Skip to content

Commit

Permalink
better fallback template for TC, and test
Browse files Browse the repository at this point in the history
  • Loading branch information
freyfogle committed Nov 9, 2023
1 parent 0e4c2ae commit 2ce078b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
22 changes: 19 additions & 3 deletions conf/countries/worldwide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ generic23: &generic23 |
{{{postcode}}}
{{#first}} {{{country}}} || {{{state}}} {{/first}}


fallback1: &fallback1 |
{{{attention}}}
{{{house}}}
Expand Down Expand Up @@ -1881,9 +1880,26 @@ SZ:
{{{postcode}}}
{{{country}}}
# Turks and Caicos Islands - same as UK
# Turks and Caicos Islands
TC:
use_country: GB
address_template: *generic23
fallback_template: |
{{{attention}}}
{{{house_number}}} {{{road}}}
{{quarter}}
{{#first}} {{{village}}} || {{{town}}} || {{{city}}} || {{{municipality}}} || {{{hamlet}}} || {{{county}}} {{/first}}
{{{island}}}
{{#first}} {{{country}}} {{/first}}
{{{attention}}}
{{{house}}}
{{{road}}} {{{house_number}}}
{{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
{{#first}} {{{town}}} || {{{city}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{county}}} {{/first}}
{{#first}} {{{state}}} || {{{state_district}}} {{/first}}
{{{country}}}
# Chad
TD:
Expand Down
12 changes: 12 additions & 0 deletions testcases/countries/tc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ expected: |
Daffodil Close
Providenciales
Turks and Caicos Islands
---
description: hamlet on Middle Caicos
components:
country: Turks and Caicos Islands
country_code: tc
island: Middle Caicos
hamlet: Bambarra
expected: |
Bambarra
Middle Caicos
Turks and Caicos Islands
Expand Down

0 comments on commit 2ce078b

Please sign in to comment.