address_composer 0.1.4.pre → 0.1.7.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/main.yml +25 -0
  3. data/.gitignore +2 -0
  4. data/.gitmodules +1 -1
  5. data/Gemfile.lock +1 -1
  6. data/README.md +3 -1
  7. data/address-formatting/.travis.yml +8 -6
  8. data/address-formatting/README.md +4 -1
  9. data/address-formatting/SECURITY.md +5 -0
  10. data/address-formatting/conf/abbreviations/{dk.yaml → da.yaml} +0 -3
  11. data/address-formatting/conf/abbreviations/de.yaml +0 -2
  12. data/address-formatting/conf/abbreviations/en.yaml +1 -1
  13. data/address-formatting/conf/abbreviations/fr.yaml +1 -1
  14. data/address-formatting/conf/abbreviations/hu.yaml +1 -2
  15. data/address-formatting/conf/abbreviations/nl.yaml +14 -1
  16. data/address-formatting/conf/abbreviations/no.yaml +16 -0
  17. data/address-formatting/conf/abbreviations/pl.yaml +24 -0
  18. data/address-formatting/conf/abbreviations/pt.yaml +0 -1
  19. data/address-formatting/conf/abbreviations/ru.yaml +2 -2
  20. data/address-formatting/conf/abbreviations/uk.yaml +0 -3
  21. data/address-formatting/conf/abbreviations/vn.yaml +7 -0
  22. data/address-formatting/conf/components.yaml +20 -4
  23. data/address-formatting/conf/countries/worldwide.yaml +147 -120
  24. data/address-formatting/conf/country2lang.yaml +3 -3
  25. data/address-formatting/conf/county_codes.yaml +359 -12
  26. data/address-formatting/conf/state_codes.yaml +1297 -139
  27. data/address-formatting/testcases/countries/be.yaml +35 -0
  28. data/address-formatting/testcases/countries/bf.yaml +15 -1
  29. data/address-formatting/testcases/countries/ca.yaml +29 -5
  30. data/address-formatting/testcases/countries/cn.yaml +9 -0
  31. data/address-formatting/testcases/countries/de.yaml +1 -1
  32. data/address-formatting/testcases/countries/fr.yaml +81 -1
  33. data/address-formatting/testcases/countries/gb.yaml +75 -9
  34. data/address-formatting/testcases/countries/gg.yaml +2 -1
  35. data/address-formatting/testcases/countries/hk.yaml +18 -8
  36. data/address-formatting/testcases/countries/ie.yaml +45 -3
  37. data/address-formatting/testcases/countries/im.yaml +2 -1
  38. data/address-formatting/testcases/countries/je.yaml +2 -1
  39. data/address-formatting/testcases/countries/no.yaml +17 -0
  40. data/address-formatting/testcases/countries/pt.yaml +22 -0
  41. data/address-formatting/testcases/countries/sh.yaml +2 -1
  42. data/address-formatting/testcases/countries/ug.yaml +13 -0
  43. data/address-formatting/testcases/countries/um.yaml +1 -1
  44. data/address-formatting/testcases/countries/us.yaml +38 -2
  45. data/address-formatting/testcases/other/xx.yaml +28 -0
  46. data/lib/address_composer/version.rb +1 -1
  47. data/lib/address_composer.rb +1 -1
  48. metadata +10 -6
  49. data/.ruby-version +0 -1
@@ -6,15 +6,16 @@ generic1: &generic1 |
6
6
  {{{attention}}}
7
7
  {{{house}}}
8
8
  {{{road}}} {{{house_number}}}
9
- {{{postcode}}} {{#first}} {{{town}}} || {{{city}}} || {{{village}}} || || {{{county}}} || {{{state}}} {{/first}}
9
+ {{{postcode}}} {{#first}} {{{postal_city}}} || {{{town}}} || {{{city}}} || {{{village}}} || {{{municipality}}} || {{{hamlet}}} || {{{county}}} || {{{state}}} {{/first}}
10
+ {{{archipelago}}}
10
11
  {{{country}}}
11
12
 
12
13
  # postcode after city
13
14
  generic2: &generic2 |
14
15
  {{{attention}}}
15
- {{{house}}}
16
+ {{#first}} {{{house}}}, {{{quarter}}} || {{{house}}} {{/first}}
16
17
  {{{house_number}}} {{{road}}}
17
- {{#first}} {{{village}}} || {{{city}}} || {{{town}}} || {{{county}}} {{/first}} {{{postcode}}}
18
+ {{#first}} {{{village}}} || {{{town}}} || {{{city}}} || {{{municipality}}} || {{{hamlet}}} || {{{county}}} {{/first}} {{{postcode}}}
18
19
  {{#first}} {{{country}}} || {{{state}}} {{/first}}
19
20
 
20
21
  # postcode before city
@@ -22,7 +23,7 @@ generic3: &generic3 |
22
23
  {{{attention}}}
23
24
  {{{house}}}
24
25
  {{{house_number}}} {{{road}}}
25
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
26
+ {{{postcode}}} {{#first}} {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{city}}} || {{{municipality}}} || {{{state}}} {{/first}}
26
27
  {{{country}}}
27
28
 
28
29
  # postcode after state
@@ -30,7 +31,7 @@ generic4: &generic4 |
30
31
  {{{attention}}}
31
32
  {{{house}}}
32
33
  {{{house_number}}} {{{road}}}
33
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{suburb}}} || {{{county}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
34
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} || {{{suburb}}} || {{{municipality}}} || {{{county}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
34
35
  {{{country}}}
35
36
 
36
37
  # no postcode
@@ -38,7 +39,7 @@ generic5: &generic5 |
38
39
  {{{attention}}}
39
40
  {{{house}}}
40
41
  {{{house_number}}} {{{road}}}
41
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
42
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
42
43
  {{#first}} {{{state_district}}} || {{{state}}} {{/first}}
43
44
  {{{country}}}
44
45
 
@@ -47,8 +48,9 @@ generic6: &generic6 |
47
48
  {{{attention}}}
48
49
  {{{house}}}
49
50
  {{{house_number}}} {{{road}}}
50
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
51
- {{{county}}}
51
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
52
+ {{{county}}}
53
+ {{{state}}}
52
54
  {{{country}}}
53
55
 
54
56
  # city, postcode
@@ -56,7 +58,7 @@ generic7: &generic7 |
56
58
  {{{attention}}}
57
59
  {{{house}}}
58
60
  {{{road}}} {{{house_number}}}
59
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{{postcode}}}
61
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{{postcode}}}
60
62
  {{{country}}}
61
63
 
62
64
  # postcode and county
@@ -64,7 +66,7 @@ generic8: &generic8 |
64
66
  {{{attention}}}
65
67
  {{{house}}}
66
68
  {{{road}}}, {{{house_number}}}
67
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{#first}} {{{county_code}}} || {{{county}}} {{/first}}
69
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}} {{#first}} {{{county_code}}} || {{{county}}} {{/first}}
68
70
  {{{country}}}
69
71
 
70
72
  generic9: &generic9 |
@@ -72,7 +74,7 @@ generic9: &generic9 |
72
74
  {{{house}}}
73
75
  {{{road}}} {{{house_number}}}
74
76
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
75
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
77
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
76
78
  {{{country}}}
77
79
 
78
80
  generic10: &generic10 |
@@ -80,7 +82,7 @@ generic10: &generic10 |
80
82
  {{{house}}}
81
83
  {{{road}}} {{{house_number}}}
82
84
  {{#first}} {{{suburb}}} || {{{city_district}}} {{/first}}
83
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
85
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
84
86
  {{{state}}}
85
87
  {{{country}}}
86
88
  {{{postcode}}}
@@ -88,7 +90,7 @@ generic10: &generic10 |
88
90
  generic11: &generic11 |
89
91
  {{{country}}}
90
92
  {{{state}}}
91
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
93
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
92
94
  {{{suburb}}}
93
95
  {{{road}}}, {{{house_number}}}
94
96
  {{{house}}}
@@ -100,7 +102,7 @@ generic12: &generic12 |
100
102
  {{{house}}}
101
103
  {{{house_number}}}, {{{road}}}
102
104
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
103
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} - {{{postcode}}}
105
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} - {{{postcode}}}
104
106
  {{{state}}}
105
107
  {{{country}}}
106
108
 
@@ -108,7 +110,7 @@ generic13: &generic13 |
108
110
  {{{attention}}}
109
111
  {{{house}}}
110
112
  {{{house_number}}} {{{road}}}
111
- {{#first}} {{{suburb}}} || {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{region}}} {{/first}} {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
113
+ {{#first}} {{{suburb}}} || {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} || {{{region}}} {{/first}} {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
112
114
  {{{country}}}
113
115
 
114
116
  # postcode and state
@@ -116,7 +118,7 @@ generic14: &generic14 |
116
118
  {{{attention}}}
117
119
  {{{house}}}
118
120
  {{{house_number}}} {{{road}}}
119
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state_district}}} {{/first}}
121
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state_district}}} {{/first}}
120
122
  {{{state}}}
121
123
  {{{country}}}
122
124
 
@@ -125,7 +127,7 @@ generic15: &generic15 |
125
127
  {{{attention}}}
126
128
  {{{house}}}
127
129
  {{{road}}}, {{{house_number}}}
128
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} || {{{county}}} {{/first}}
130
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{state}}} || {{{county}}} {{/first}}
129
131
  {{{country}}}
130
132
 
131
133
  # no postcode, no state, just city
@@ -133,7 +135,7 @@ generic16: &generic16 |
133
135
  {{{attention}}}
134
136
  {{{house}}}
135
137
  {{{house_number}}} {{{road}}}
136
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
138
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
137
139
  {{{country}}}
138
140
 
139
141
  # no postcode, no state, just city
@@ -141,7 +143,7 @@ generic17: &generic17 |
141
143
  {{{attention}}}
142
144
  {{{house}}}
143
145
  {{{road}}} {{{house_number}}}
144
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
146
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
145
147
  {{{country}}}
146
148
 
147
149
  # no postcode, just city comma after house number
@@ -149,7 +151,7 @@ generic18: &generic18 |
149
151
  {{{attention}}}
150
152
  {{{house}}}
151
153
  {{{house_number}}}, {{{road}}}
152
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{state}}} {{/first}}
154
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{state}}} {{/first}}
153
155
  {{{country}}}
154
156
 
155
157
  # suburb and postcode after city
@@ -158,7 +160,7 @@ generic19: &generic19 |
158
160
  {{{house}}}
159
161
  {{{road}}} {{{house_number}}}
160
162
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
161
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}}
163
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}
162
164
  {{{country}}}
163
165
 
164
166
  # suburb and postcode after city
@@ -167,7 +169,7 @@ generic20: &generic20 |
167
169
  {{{house}}}
168
170
  {{{house_number}}} {{{road}}}
169
171
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
170
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}}
172
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}
171
173
  {{{country}}}
172
174
 
173
175
  # suburb and city, no postcode
@@ -176,7 +178,7 @@ generic21: &generic21 |
176
178
  {{{house}}}
177
179
  {{{road}}} {{{house_number}}}
178
180
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
179
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
181
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
180
182
  {{{country}}}
181
183
 
182
184
  # comma after housenumber, postcode before city
@@ -184,24 +186,35 @@ generic22: &generic22 |
184
186
  {{{attention}}}
185
187
  {{{house}}}
186
188
  {{{house_number}}}, {{{road}}}
187
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
189
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
188
190
  {{{country}}}
189
191
 
192
+ # postcode on own line
193
+ generic23: &generic23 |
194
+ {{{attention}}}
195
+ {{house}}
196
+ {{{house_number}}} {{{road}}}
197
+ {{quarter}}
198
+ {{#first}} {{{village}}} || {{{town}}} || {{{city}}} || {{{municipality}}} || {{{hamlet}}} || {{{county}}} {{/first}}
199
+ {{{postcode}}}
200
+ {{#first}} {{{country}}} || {{{state}}} {{/first}}
201
+
202
+
190
203
  fallback1: &fallback1 |
191
204
  {{{attention}}}
192
205
  {{{house}}}
193
206
  {{{road}}} {{{house_number}}}
194
207
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{island}}} {{/first}}
195
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
196
- {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
208
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
209
+ {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} || {{{region}}} {{/first}}
197
210
  {{{country}}}
198
211
 
199
212
  fallback2: &fallback2 |
200
213
  {{{attention}}}
201
214
  {{{house}}}
202
215
  {{{road}}} {{{house_number}}}
203
- {{{suburb}}}
204
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{county}}} || {{{island}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
216
+ {{#first}} {{{suburb}}} || {{{village}}} || {{{hamlet}}} {{/first}}
217
+ {{#first}} {{{city}}} || {{{town}}} || {{{municipality}}} || {{{county}}} || {{{island}}} || {{{state_district}}} {{/first}}, {{#first}} {{{state}}} || {{{state_code}}} {{/first}}
205
218
  {{{country}}}
206
219
 
207
220
  fallback3: &fallback3 |
@@ -209,9 +222,9 @@ fallback3: &fallback3 |
209
222
  {{{house}}}
210
223
  {{{road}}} {{{house_number}}}
211
224
  {{#first}} {{{suburb}}} || {{{island}}} {{/first}}
212
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
225
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
213
226
  {{{county}}}
214
- {{{state}}}
227
+ {{#first}} {{{state}}} || {{{state_code}}} {{/first}}
215
228
  {{{country}}}
216
229
 
217
230
  fallback4: &fallback4 |
@@ -219,7 +232,7 @@ fallback4: &fallback4 |
219
232
  {{{house}}}
220
233
  {{{road}}} {{{house_number}}}
221
234
  {{{suburb}}}
222
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
235
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
223
236
  {{#first}} {{{state}}} || {{{county}}} {{/first}}
224
237
  {{{country}}}
225
238
 
@@ -243,7 +256,7 @@ AE:
243
256
  {{{house}}}
244
257
  {{{house_number}}} {{{road}}}
245
258
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
246
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
259
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
247
260
  {{#first}} {{{state_district}}} || {{{state}}} {{/first}}
248
261
  {{{country}}}
249
262
 
@@ -261,7 +274,7 @@ AI:
261
274
  {{{attention}}}
262
275
  {{{house}}}
263
276
  {{{road}}} {{{house_number}}}
264
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
277
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
265
278
  {{{postcode}}} {{{country}}}
266
279
 
267
280
  # Albania
@@ -270,7 +283,7 @@ AL:
270
283
  {{{attention}}}
271
284
  {{{house}}}
272
285
  {{{road}}} {{{house_number}}}
273
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
286
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}
274
287
  {{{country}}}
275
288
  postformat_replace:
276
289
  # fix the postcode to add - after numbers
@@ -283,7 +296,7 @@ AM:
283
296
  {{{house}}}
284
297
  {{{house_number}}} {{{road}}}
285
298
  {{{postcode}}}
286
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
299
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
287
300
  {{#first}} {{{state_district}}} || {{{state}}} {{/first}}
288
301
  {{{country}}}
289
302
 
@@ -296,7 +309,7 @@ AQ:
296
309
  address_template: |
297
310
  {{{attention}}}
298
311
  {{{house}}}
299
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
312
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
300
313
  {{#first}} {{{country}}} || {{{continent}}} {{/first}}
301
314
 
302
315
  # Argentina
@@ -350,12 +363,18 @@ BD:
350
363
  {{{house}}}
351
364
  {{{house_number}}} {{{road}}}
352
365
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
353
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} - {{{postcode}}}
366
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} - {{{postcode}}}
354
367
  {{{country}}}
355
368
 
356
369
  # Belgium
357
- BE:
358
- address_template: *generic1
370
+ BE:
371
+ address_template: |
372
+ {{{attention}}}
373
+ {{{house}}}
374
+ {{{road}}} {{{house_number}}}
375
+ {{{postcode}}} {{#first}} {{{postal_city}}} || {{{town}}} || {{{city}}} || {{{village}}} || {{{municipality}}} || {{{hamlet}}} || {{{county}}} || {{{state}}} {{/first}}
376
+ {{{archipelago}}}
377
+ {{{country}}}
359
378
 
360
379
  # Burkina Faso
361
380
  BF:
@@ -392,7 +411,7 @@ BN:
392
411
  {{{attention}}}
393
412
  {{{house}}}
394
413
  {{{house_number}}}, {{{road}}}
395
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
414
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
396
415
  {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}} {{{postcode}}}
397
416
  {{{country}}}
398
417
 
@@ -415,7 +434,7 @@ BR:
415
434
  {{{house}}}
416
435
  {{{road}}} {{{house_number}}}
417
436
  {{#first}} {{{suburb}}} || {{{city_district}}} {{/first}}
418
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}} - {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
437
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}} - {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
419
438
  {{{postcode}}}
420
439
  {{{country}}}
421
440
  postformat_replace:
@@ -427,7 +446,7 @@ BS:
427
446
  {{{attention}}}
428
447
  {{{house}}}
429
448
  {{{road}}} {{{house_number}}}
430
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
449
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
431
450
  {{{county}}}
432
451
  {{{country}}}
433
452
 
@@ -438,7 +457,7 @@ BT:
438
457
  {{{house}}}
439
458
  {{{road}}} {{{house_number}}}, {{{house}}}
440
459
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
441
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}} {{{postcode}}}
460
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}} {{{postcode}}}
442
461
  {{{country}}}
443
462
 
444
463
  # Bouvet Island
@@ -453,7 +472,7 @@ BW:
453
472
  {{{house}}}
454
473
  {{{road}}} {{{house_number}}}
455
474
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
456
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
475
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
457
476
  {{{country}}}
458
477
 
459
478
  # Belarus
@@ -470,13 +489,13 @@ CA:
470
489
  {{{attention}}}
471
490
  {{{house}}}
472
491
  {{#first}} {{{house_number}}} {{{road}}} || {{{suburb}}} {{/first}}
473
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
492
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state_district}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
474
493
  {{{country}}}
475
494
  fallback_template: |
476
495
  {{{attention}}}
477
496
  {{{house}}}
478
497
  {{#first}} {{{house_number}}} {{{road}}} || {{{suburb}}} {{/first}}
479
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
498
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{county}}} || {{{state_district}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}} {{{postcode}}}
480
499
  {{{country}}}
481
500
  postformat_replace:
482
501
  # fix the postcode to make it \w\w\w \w\w\w
@@ -531,7 +550,7 @@ CN:
531
550
  {{{house_number}}} {{{road}}}
532
551
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
533
552
  {{{county}}}
534
- {{{postcode}}} {{#first}} {{{state_code}}} || {{{state}}} || {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
553
+ {{{postcode}}} {{#first}} {{{state_code}}} || {{{state}}} || {{{city}}} || {{{town}}} || {{{municipality}}} || {{{state_district}}} || {{{region}}} || {{{village}}}|| {{{hamlet}}} {{/first}}
535
554
  {{{country}}}
536
555
 
537
556
  # China - English
@@ -542,7 +561,7 @@ CN_en:
542
561
  {{{house_number}}} {{{road}}}
543
562
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
544
563
  {{{county}}}
545
- {{{postcode}}} {{#first}} {{{state_code}}} || {{{state}}} || {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
564
+ {{{postcode}}} {{#first}} {{{state_code}}} || {{{state}}} || {{{city}}} || {{{town}}} || {{{municipality}}} || {{{state_district}}} || {{{region}}} || {{{village}}} || {{{hamlet}}} {{/first}}
546
565
  {{{country}}}
547
566
 
548
567
  # China - Chinese
@@ -550,9 +569,9 @@ CN_zh:
550
569
  address_template: |
551
570
  {{{country}}}
552
571
  {{{postcode}}}
553
- {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
572
+ {{#first}} {{{state_code}}} || {{{state}}} || {{{region}}} {{/first}}
554
573
  {{#first}} {{{state_district}}} || {{{county}}} {{/first}}
555
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
574
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
556
575
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
557
576
  {{{road}}}
558
577
  {{{house_number}}}
@@ -566,7 +585,7 @@ CO:
566
585
  {{{house}}}
567
586
  {{{road}}} {{{house_number}}}
568
587
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
569
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
588
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
570
589
  {{{country}}}
571
590
  postformat_replace:
572
591
  - ["Bogota, Bogota","Bogota"]
@@ -577,7 +596,7 @@ CR:
577
596
  {{{attention}}}
578
597
  {{{house}}}
579
598
  {{{road}}} {{{house_number}}}
580
- {{{state}}}, {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
599
+ {{{state}}}, {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
581
600
  {{{postcode}}} {{{country}}}
582
601
 
583
602
  # Cuba
@@ -620,7 +639,7 @@ DE:
620
639
  {{{house}}}
621
640
  {{{road}}} {{{house_number}}}
622
641
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
623
- {{#first}} {{{town}}} || {{{city}}} || {{{village}}} || {{{county}}} {{/first}}
642
+ {{#first}} {{{town}}} || {{{city}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{county}}} {{/first}}
624
643
  {{#first}} {{{state}}} || {{{state_district}}} {{/first}}
625
644
  {{{country}}}
626
645
 
@@ -664,7 +683,7 @@ DO:
664
683
  {{{house}}}
665
684
  {{{road}}} {{{house_number}}}
666
685
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
667
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{{state}}}
686
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{{state}}}
668
687
  {{{postcode}}}
669
688
  {{{country}}}
670
689
  postformat_replace:
@@ -683,7 +702,7 @@ EC:
683
702
  {{{house}}}
684
703
  {{{road}}} {{{house_number}}}
685
704
  {{{postcode}}}
686
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
705
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}
687
706
  {{{country}}}
688
707
 
689
708
  # Egypt
@@ -693,7 +712,7 @@ EG:
693
712
  {{{house}}}
694
713
  {{{house_number}}} {{{road}}}
695
714
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
696
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
715
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
697
716
  {{{postcode}}}
698
717
  {{{country}}}
699
718
 
@@ -753,6 +772,8 @@ FR:
753
772
  - ["Grande Terre et récifs d'Entrecasteaux",""]
754
773
  - ["France, Nouvelle-Calédonie","Nouvelle-Calédonie, France"]
755
774
  - ["\\(eaux territoriales\\)",""]
775
+ - ["Paris (\\d+)(\\w+) Arrondissement$","Paris"]
776
+
756
777
 
757
778
  # Gabon
758
779
  GA:
@@ -760,12 +781,12 @@ GA:
760
781
  {{{attention}}}
761
782
  {{{house}}}
762
783
  {{{house_number}}} {{{road}}}
763
- {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{village}}} {{/first}}
764
- {{#first}} {{{city}}} || {{{town}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
784
+ {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{village}}} || {{{hamlet}}} {{/first}}
785
+ {{#first}} {{{city}}} || {{{town}}} || {{{municipality}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
765
786
  {{{country}}}
766
787
 
767
788
  GB:
768
- address_template: *generic2
789
+ address_template: *generic23
769
790
  fallback_template: *fallback3
770
791
  replace:
771
792
  - ["^Borough of ",""]
@@ -773,7 +794,7 @@ GB:
773
794
  - ["^Parish of ",""]
774
795
  - ["^Central ",""]
775
796
  - ["^Greater London","London"]
776
- - ["^London Borough of .+","London"]
797
+ - ["^London Borough of ",""]
777
798
  - ["Royal Borough of ",""]
778
799
  - ["County Borough of ",""]
779
800
  postformat_replace:
@@ -850,7 +871,7 @@ GT:
850
871
  {{{attention}}}
851
872
  {{{house}}}
852
873
  {{{road}}} {{{house_number}}}
853
- {{{postcode}}}-{{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
874
+ {{{postcode}}}-{{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{state}}} {{/first}}
854
875
  {{{country}}}
855
876
  postformat_replace:
856
877
  - ["\n(\\d{5})- ","\n$1-"]
@@ -877,7 +898,7 @@ HK:
877
898
  {{{house}}}
878
899
  {{{house_number}}} {{{road}}}
879
900
  {{{state_district}}}
880
- {{{state}}}
901
+ {{#first}} {{{state}}} || {{{country}}} {{/first}}
881
902
 
882
903
  # Hong Kong - English
883
904
  HK_en:
@@ -926,7 +947,7 @@ HU:
926
947
  address_template: |
927
948
  {{{attention}}}
928
949
  {{{house}}}
929
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
950
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
930
951
  {{{road}}} {{{house_number}}}
931
952
  {{{postcode}}}
932
953
  {{{country}}}
@@ -939,7 +960,7 @@ ID:
939
960
  {{{house}}}
940
961
  {{{road}}} {{{house_number}}}
941
962
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
942
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}}
963
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}
943
964
  {{{state}}}
944
965
  {{{country}}}
945
966
 
@@ -951,21 +972,29 @@ IE:
951
972
  {{{house}}}
952
973
  {{{house_number}}} {{{road}}}
953
974
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
954
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
975
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
955
976
  {{{county}}}
956
977
  {{{country}}}
957
978
  replace:
958
979
  - [" City$",""]
959
980
  - ["The Municipal District of ",""]
960
981
  - ["The Metropolitan District of ",""]
982
+ - ["Municipal District",""]
983
+ - ["Electoral Division",""]
984
+ postformat_replace:
985
+ - ["Dublin\nCounty Dublin","Dublin"]
986
+ - ["Galway\nCounty Galway","Galway"]
987
+ - ["Kilkenny\nCounty Kilkenny","Kilkenny"]
988
+ - ["Limerick\nCounty Limerick","Limerick"]
989
+ - ["Tipperary\nCounty Tipperary","Tipperary"]
961
990
 
962
991
  # Israel
963
992
  IL:
964
993
  address_template: *generic1
965
994
 
966
995
  # Isle of Man
967
- IM:
968
- address_template: *generic2
996
+ IM:
997
+ use_country: GB
969
998
 
970
999
  # India
971
1000
  # http://en.wikipedia.org/wiki/Address_%28geography%29#India
@@ -984,7 +1013,7 @@ IQ:
984
1013
  {{{house}}}
985
1014
  {{{house_number}}} {{#first}} {{{city_district}}} || {{{neighbourhood}}} || {{{suburb}}} {{/first}}
986
1015
  {{{road}}}
987
- {{#first}} {{{city}}} || {{{town}}} || {{{state}}} || {{{village}}} {{/first}}
1016
+ {{#first}} {{{city}}} || {{{town}}} || {{{state}}} || {{{village}}} || {{{hamlet}}} {{/first}}
988
1017
  {{{postcode}}}
989
1018
  {{{country}}}
990
1019
 
@@ -993,7 +1022,7 @@ IR:
993
1022
  address_template: |
994
1023
  {{{attention}}}
995
1024
  {{{house}}}
996
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1025
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
997
1026
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
998
1027
  {{{road}}}
999
1028
  {{{house_number}}}
@@ -1005,7 +1034,7 @@ IR_en:
1005
1034
  address_template: |
1006
1035
  {{{attention}}}
1007
1036
  {{{house}}}
1008
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1037
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1009
1038
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1010
1039
  {{{road}}}
1011
1040
  {{{house_number}}}
@@ -1017,7 +1046,7 @@ IR_fa:
1017
1046
  address_template: |
1018
1047
  {{{country}}}
1019
1048
  {{#first}} {{{state}}} || {{{province}}} {{/first}}
1020
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1049
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1021
1050
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1022
1051
  {{{road}}}
1023
1052
  {{{house_number}}}
@@ -1059,7 +1088,7 @@ JP:
1059
1088
  {{{house}}}
1060
1089
  {{{house_number}}} {{{road}}}
1061
1090
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1062
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{#first}} {{{state}}} || {{{state_district}}} {{/first}} {{{postcode}}}
1091
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state}}} || {{{state_district}}} {{/first}} {{{postcode}}}
1063
1092
  {{{country}}}
1064
1093
  postformat_replace:
1065
1094
  # fix the postcode to make it \d\d\d-\d\d\d\d
@@ -1074,7 +1103,7 @@ JP_en:
1074
1103
  {{{house}}}
1075
1104
  {{{house_number}}} {{{road}}}
1076
1105
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1077
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{#first}} {{{state}}} || {{{state_district}}} {{/first}} {{{postcode}}}
1106
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state}}} || {{{state_district}}} {{/first}} {{{postcode}}}
1078
1107
  {{{country}}}
1079
1108
  postformat_replace:
1080
1109
  # fix the postcode to make it \d\d\d-\d\d\d\d
@@ -1087,7 +1116,7 @@ JP_ja:
1087
1116
  {{{country}}}
1088
1117
  {{{postcode}}}
1089
1118
  {{#first}} {{{state}}} || {{{state_district}}} {{/first}}
1090
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1119
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1091
1120
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1092
1121
  {{{road}}}
1093
1122
  {{{house_number}}}
@@ -1103,7 +1132,7 @@ KE:
1103
1132
  {{{attention}}}
1104
1133
  {{{house}}}
1105
1134
  {{{house_number}}} {{{road}}}
1106
- {{#first}} {{{city}}} || {{{town}}} || {{{state}}} || {{{village}}} {{/first}}
1135
+ {{#first}} {{{city}}} || {{{town}}} || {{{state}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1107
1136
  {{{postcode}}}
1108
1137
  {{{country}}}
1109
1138
 
@@ -1118,7 +1147,7 @@ KH:
1118
1147
  {{{house}}}
1119
1148
  {{{house_number}}} {{{road}}}
1120
1149
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1121
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}}
1150
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}
1122
1151
  {{{country}}}
1123
1152
 
1124
1153
  # Kiribati
@@ -1131,7 +1160,7 @@ KM:
1131
1160
  {{{attention}}}
1132
1161
  {{{house}}}
1133
1162
  {{{road}}} {{{house_number}}}
1134
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1163
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1135
1164
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1136
1165
  {{{country}}}
1137
1166
 
@@ -1141,7 +1170,7 @@ KN:
1141
1170
  {{{attention}}}
1142
1171
  {{{house}}}
1143
1172
  {{{house_number}}} {{{road}}}
1144
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{#first}} {{{state}}} || {{{island}}} {{/first}}
1173
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state}}} || {{{island}}} {{/first}}
1145
1174
  {{{country}}}
1146
1175
 
1147
1176
  # Democratic People's Republic of Korea / North Korea
@@ -1154,7 +1183,7 @@ KR:
1154
1183
  {{{attention}}}
1155
1184
  {{{house}}}
1156
1185
  {{{house_number}}} {{{road}}}
1157
- {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{#first}} {{{state}}} {{/first}} {{{postcode}}}
1186
+ {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state}}} {{/first}} {{{postcode}}}
1158
1187
  {{{country}}}
1159
1188
 
1160
1189
  # South Korea - English
@@ -1163,7 +1192,7 @@ KR_en:
1163
1192
  {{{attention}}}
1164
1193
  {{{house}}}
1165
1194
  {{{house_number}}} {{{road}}}
1166
- {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{#first}} {{{state}}} {{/first}} {{{postcode}}}
1195
+ {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state}}} {{/first}} {{{postcode}}}
1167
1196
  {{{country}}}
1168
1197
 
1169
1198
  # South Korea - Korean
@@ -1171,7 +1200,7 @@ KR_ko:
1171
1200
  address_template: |
1172
1201
  {{{country}}}
1173
1202
  {{#first}} {{{state}}} {{/first}}
1174
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1203
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1175
1204
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1176
1205
  {{{road}}}
1177
1206
  {{{house_number}}}
@@ -1188,7 +1217,7 @@ KW:
1188
1217
 
1189
1218
  {{{road}}}
1190
1219
  {{{house_number}}} {{{house}}}
1191
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1220
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1192
1221
  {{{country}}}
1193
1222
 
1194
1223
  # Cayman Islands
@@ -1209,8 +1238,6 @@ LB:
1209
1238
  postformat_replace:
1210
1239
  # fix the postcode to make it nonbreaking space
1211
1240
  - [" (\\d{4}) (\\d{4})\n"," $1 $2\n"]
1212
- # - ["\n(\\d{4}) (\\d{4}) ","\n$1 $2 "]
1213
-
1214
1241
 
1215
1242
  # Saint Lucia
1216
1243
  LC:
@@ -1262,7 +1289,7 @@ MD:
1262
1289
  {{{attention}}}
1263
1290
  {{{house}}}
1264
1291
  {{{road}}}, {{{house_number}}}
1265
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
1292
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
1266
1293
  {{{country}}}
1267
1294
 
1268
1295
  # Montenegro
@@ -1286,7 +1313,7 @@ MG:
1286
1313
  {{{house}}}
1287
1314
  {{{house_number}}} {{{road}}}
1288
1315
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1289
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1316
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1290
1317
  {{{country}}}
1291
1318
 
1292
1319
  # North Macedonia
@@ -1303,7 +1330,7 @@ MM:
1303
1330
  {{{attention}}}
1304
1331
  {{{house}}}
1305
1332
  {{{house_number}}} {{{road}}}
1306
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}, {{{postcode}}}
1333
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}, {{{postcode}}}
1307
1334
  {{{country}}}
1308
1335
 
1309
1336
 
@@ -1317,7 +1344,7 @@ MN:
1317
1344
  {{{road}}}
1318
1345
  {{{house_number}}}
1319
1346
  {{{postcode}}}
1320
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1347
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1321
1348
  {{{country}}}
1322
1349
 
1323
1350
  # Macau
@@ -1326,7 +1353,7 @@ MO:
1326
1353
  {{{attention}}}
1327
1354
  {{{house}}}
1328
1355
  {{{road}}} {{{house_number}}}
1329
- {{#first}} {{{suburb}}} || {{{village}}} || {{{state_district}}} {{/first}}
1356
+ {{#first}} {{{suburb}}} || {{{village}}} || {{{hamlet}}} || {{{state_district}}} {{/first}}
1330
1357
  {{{country}}}
1331
1358
 
1332
1359
  # Macao - Portuguese
@@ -1335,14 +1362,14 @@ MO_pt:
1335
1362
  {{{attention}}}
1336
1363
  {{{house}}}
1337
1364
  {{{road}}} {{{house_number}}}
1338
- {{#first}} {{{suburb}}} || {{{village}}} || {{{state_district}}} {{/first}}
1365
+ {{#first}} {{{suburb}}} || {{{village}}} || {{{hamlet}}} || {{{state_district}}} {{/first}}
1339
1366
  {{{country}}}
1340
1367
 
1341
1368
  # Macao - Chinese
1342
1369
  MO_zh:
1343
1370
  address_template: |
1344
1371
  {{{country}}}
1345
- {{#first}} {{{suburb}}} || {{{village}}} || {{{state_district}}} {{/first}}
1372
+ {{#first}} {{{suburb}}} || {{{village}}} || {{{hamlet}}} || {{{state_district}}} {{/first}}
1346
1373
  {{{road}}}
1347
1374
  {{{house_number}}}
1348
1375
  {{{house}}}
@@ -1364,7 +1391,7 @@ MT:
1364
1391
  {{{attention}}}
1365
1392
  {{{house}}}
1366
1393
  {{{house_number}}} {{{road}}}
1367
- {{#first}} {{{city}}} || {{{town}}} || {{{suburb}}} || {{{village}}} {{/first}}
1394
+ {{#first}} {{{city}}} || {{{town}}} || {{{suburb}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1368
1395
  {{{postcode}}}
1369
1396
  {{{country}}}
1370
1397
 
@@ -1396,7 +1423,7 @@ MX:
1396
1423
  {{{house}}}
1397
1424
  {{{road}}} {{{house_number}}}
1398
1425
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1399
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
1426
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
1400
1427
  {{{country}}}
1401
1428
 
1402
1429
  # Malaysia
@@ -1406,7 +1433,7 @@ MY:
1406
1433
  {{{house}}}
1407
1434
  {{{house_number}}} {{{road}}}
1408
1435
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1409
- {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1436
+ {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1410
1437
  {{{state}}}
1411
1438
  {{{country}}}
1412
1439
 
@@ -1431,7 +1458,7 @@ NE:
1431
1458
  {{{house}}}
1432
1459
  {{{house_number}}}
1433
1460
  {{{road}}}
1434
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1461
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1435
1462
  {{{country}}}
1436
1463
 
1437
1464
  # Norfolk Island - same as Australia
@@ -1446,7 +1473,7 @@ NG:
1446
1473
  {{{attention}}}
1447
1474
  {{{house}}}
1448
1475
  {{{house_number}}} {{{road}}}
1449
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}}
1476
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}
1450
1477
  {{{state}}}
1451
1478
  {{{country}}}
1452
1479
 
@@ -1475,7 +1502,7 @@ NP:
1475
1502
  {{{house}}}
1476
1503
  {{{road}}} {{{house_number}}}
1477
1504
  {{#first}} {{{suburb}}} || {{{neighbourhood}}} || {{{city}}} {{/first}}
1478
- {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}} {{{postcode}}}
1505
+ {{#first}} {{{municipality}}} || {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}} {{{postcode}}}
1479
1506
  {{{country}}}
1480
1507
 
1481
1508
  # Nauru
@@ -1497,7 +1524,7 @@ OM:
1497
1524
  {{{house}}}
1498
1525
  {{{house_number}}} {{{road}}}
1499
1526
  {{{postcode}}}
1500
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
1527
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1501
1528
  {{{state}}}
1502
1529
  {{{country}}}
1503
1530
 
@@ -1509,7 +1536,7 @@ PA:
1509
1536
  {{{road}}} {{{house_number}}}
1510
1537
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1511
1538
  {{{postcode}}}
1512
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
1539
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1513
1540
  {{{state}}}
1514
1541
  {{{country}}}
1515
1542
  replace:
@@ -1534,7 +1561,7 @@ PG:
1534
1561
  {{{attention}}}
1535
1562
  {{{house}}}
1536
1563
  {{{house_number}}} {{{road}}}
1537
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}} {{{postcode}}} {{{state}}}
1564
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}} {{{state}}}
1538
1565
  {{{country}}}
1539
1566
 
1540
1567
  # Philippines
@@ -1543,7 +1570,7 @@ PH:
1543
1570
  {{{attention}}}
1544
1571
  {{{house}}}
1545
1572
  {{{house_number}}} {{{road}}}
1546
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{suburb}}} || {{{state_district}}} {{/first}}
1573
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{suburb}}} || {{{state_district}}} {{/first}}
1547
1574
  {{{postcode}}} {{{state}}}
1548
1575
  {{{country}}}
1549
1576
 
@@ -1554,7 +1581,7 @@ PK:
1554
1581
  {{{house}}}
1555
1582
  {{{house_number}}} {{{road}}}
1556
1583
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1557
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}} {{{postcode}}}
1584
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}} {{{postcode}}}
1558
1585
  {{{country}}}
1559
1586
 
1560
1587
  # Poland
@@ -1625,8 +1652,8 @@ RU:
1625
1652
  {{{attention}}}
1626
1653
  {{{house}}}
1627
1654
  {{{road}}} {{{house_number}}}
1628
- {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{island}}} || {{{village}}} {{/first}}
1629
- {{#first}} {{{city}}} || {{{town}}} {{/first}}
1655
+ {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{island}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1656
+ {{#first}} {{{city}}} || {{{town}}} || {{{municipality}}} {{/first}}
1630
1657
  {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} {{/first}}
1631
1658
  {{{country}}}
1632
1659
 
@@ -1639,7 +1666,7 @@ SA:
1639
1666
  address_template: |
1640
1667
  {{{attention}}}
1641
1668
  {{{house}}}
1642
- {{{house_number}}} {{{road}}}, {{#first}} {{{village}}} || {{{city_district}}} || {{{suburb}}} || {{{neighbourhood}}} {{/first}}
1669
+ {{{house_number}}} {{{road}}}, {{#first}} {{{village}}} || {{{hamlet}}} || {{{city_district}}} || {{{suburb}}} || {{{neighbourhood}}} {{/first}}
1643
1670
  {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} {{/first}} {{{postcode}}}
1644
1671
  {{{country}}}
1645
1672
 
@@ -1653,7 +1680,7 @@ SC:
1653
1680
  {{{attention}}}
1654
1681
  {{{house}}}
1655
1682
  {{{house_number}}} {{{road}}}
1656
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{island}}} {{/first}}
1683
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{island}}} {{/first}}
1657
1684
  {{{island}}}
1658
1685
  {{{country}}}
1659
1686
 
@@ -1726,7 +1753,7 @@ SV:
1726
1753
  {{{attention}}}
1727
1754
  {{{house}}}
1728
1755
  {{{road}}} {{{house_number}}}
1729
- {{{postcode}}} - {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1756
+ {{{postcode}}} - {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1730
1757
  {{{state}}}
1731
1758
  {{{country}}}
1732
1759
  postformat_replace:
@@ -1742,7 +1769,7 @@ SY:
1742
1769
  {{{attention}}}
1743
1770
  {{{house}}}
1744
1771
  {{{road}}}, {{{house_number}}}
1745
- {{#first}} {{{village}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{suburb}}} {{/first}}
1772
+ {{#first}} {{{village}}} || {{{hamlet}}} || {{{city_district}}} || {{{neighbourhood}}} || {{{suburb}}} {{/first}}
1746
1773
  {{{postcode}}} {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{state}}} {{/first}}
1747
1774
 
1748
1775
  {{{country}}}
@@ -1754,7 +1781,7 @@ SZ:
1754
1781
  {{{attention}}}
1755
1782
  {{{house}}}
1756
1783
  {{{road}}} {{{house_number}}}
1757
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
1784
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
1758
1785
  {{{postcode}}}
1759
1786
  {{{country}}}
1760
1787
 
@@ -1780,7 +1807,7 @@ TH:
1780
1807
  address_template: |
1781
1808
  {{{attention}}}
1782
1809
  {{{house}}}
1783
- {{{house_number}}} {{{village}}}
1810
+ {{{house_number}}} {{#first}} {{{village}}} || {{{hamlet}}} {{/first}}
1784
1811
  {{{road}}}
1785
1812
  {{#first}} {{{neighbourhood}}} || {{{city}}} || {{{town}}} {{/first}}, {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
1786
1813
  {{{state}}} {{{postcode}}}
@@ -1822,7 +1849,7 @@ TT:
1822
1849
  {{{house}}}
1823
1850
  {{{house_number}}} {{{road}}}
1824
1851
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
1825
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}, {{{postcode}}}
1852
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{{postcode}}}
1826
1853
  {{{country}}}
1827
1854
 
1828
1855
  # Tuvalu
@@ -1831,7 +1858,7 @@ TV:
1831
1858
  {{{attention}}}
1832
1859
  {{{house}}}
1833
1860
  {{{house_number}}} {{{road}}}
1834
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1861
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
1835
1862
  {{#first}} {{{county}}} || {{{state_district}}} || {{{state}}} || {{{island}}} {{/first}}
1836
1863
  {{{country}}}
1837
1864
 
@@ -1846,7 +1873,7 @@ TW_zh:
1846
1873
  address_template: |
1847
1874
  {{{country}}}
1848
1875
  {{{postcode}}}
1849
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1876
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} {{/first}}
1850
1877
  {{{city_district}}}
1851
1878
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}
1852
1879
  {{{road}}}
@@ -1868,7 +1895,7 @@ UA:
1868
1895
  {{{house}}}
1869
1896
  {{{road}}}, {{{house_number}}}
1870
1897
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
1871
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
1898
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{municipality}}} || {{{state}}} {{/first}}
1872
1899
  {{{postcode}}}
1873
1900
  {{{country}}}
1874
1901
 
@@ -1878,7 +1905,7 @@ UG:
1878
1905
 
1879
1906
  # US Minor Outlying Islands, same as USA
1880
1907
  UM:
1881
- fallback_template: *fallback3
1908
+ fallback_template: *fallback2
1882
1909
  use_country: US
1883
1910
  change_country: United States of America
1884
1911
  add_component: state=US Minor Outlying Islands
@@ -1901,7 +1928,7 @@ UZ:
1901
1928
  {{{attention}}}
1902
1929
  {{{house}}}
1903
1930
  {{{road}}} {{{house_number}}}
1904
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}
1931
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1905
1932
  {{#first}} {{{state}}} || {{{state_district}}} {{/first}}
1906
1933
  {{{country}}}
1907
1934
  {{{postcode}}}
@@ -1924,7 +1951,7 @@ VE:
1924
1951
  {{{attention}}}
1925
1952
  {{{house}}}
1926
1953
  {{{road}}} {{{house_number}}}
1927
- {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}} {{{postcode}}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
1954
+ {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}} {{{postcode}}}, {{#first}} {{{state_code}}} || {{{state}}} {{/first}}
1928
1955
  {{{country}}}
1929
1956
 
1930
1957
  # British Virgin Islands
@@ -1933,7 +1960,7 @@ VG:
1933
1960
  {{{attention}}}
1934
1961
  {{{house}}}
1935
1962
  {{{house_number}}} {{{road}}}
1936
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} {{/first}}, {{{island}}}
1963
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} {{/first}}, {{{island}}}
1937
1964
  {{{country}}}, {{{postcode}}}
1938
1965
 
1939
1966
  # US Virgin Islands, same as USA
@@ -1948,7 +1975,7 @@ VN:
1948
1975
  {{{attention}}}
1949
1976
  {{{house}}}
1950
1977
  {{{house_number}}}, {{{road}}}
1951
- {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} {{/first}}
1978
+ {{#first}} {{{suburb}}} || {{{city_district}}} || {{{neighbourhood}}} {{/first}}, {{#first}} {{{city}}} || {{{town}}} || {{{state_district}}} || {{{village}}} || {{{hamlet}}} {{/first}}
1952
1979
  {{{state}}} {{{postcode}}}
1953
1980
  {{{country}}}
1954
1981
 
@@ -1981,7 +2008,7 @@ ZA:
1981
2008
  {{{house}}}
1982
2009
  {{{house_number}}} {{{road}}}
1983
2010
  {{#first}} {{{suburb}}} || {{{city_district}}} || {{{state_district}}} {{/first}}
1984
- {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{state}}} {{/first}}
2011
+ {{#first}} {{{city}}} || {{{town}}} || {{{village}}} || {{{hamlet}}} || {{{state}}} {{/first}}
1985
2012
  {{{postcode}}}
1986
2013
  {{{country}}}
1987
2014