diff --git a/src/definitions/location.ts b/src/definitions/location.ts index 5b4a4bc33d1..da86bc8e72d 100644 --- a/src/definitions/location.ts +++ b/src/definitions/location.ts @@ -14,7 +14,7 @@ export type LocationDefinition = LocaleEntry<{ /** * Postcodes patterns. */ - postcode: string | string[]; + postcode_pattern: string[]; /** * The patterns to generate city names. diff --git a/src/locales/af_ZA/location/index.ts b/src/locales/af_ZA/location/index.ts index 8085ed10f27..b68af4caf81 100644 --- a/src/locales/af_ZA/location/index.ts +++ b/src/locales/af_ZA/location/index.ts @@ -5,14 +5,14 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/af_ZA/location/postcode.ts b/src/locales/af_ZA/location/postcode.ts deleted file mode 100644 index c97754f0d4f..00000000000 --- a/src/locales/af_ZA/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '####']; diff --git a/src/locales/af_ZA/location/postcode_pattern.ts b/src/locales/af_ZA/location/postcode_pattern.ts new file mode 100644 index 00000000000..6b9540dab91 --- /dev/null +++ b/src/locales/af_ZA/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}', '{{string.numeric(4)}}']; diff --git a/src/locales/ar/location/index.ts b/src/locales/ar/location/index.ts index 8d92c4f9812..2471efad573 100644 --- a/src/locales/ar/location/index.ts +++ b/src/locales/ar/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -19,7 +19,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/ar/location/postcode.ts b/src/locales/ar/location/postcode.ts deleted file mode 100644 index 4433f068b5e..00000000000 --- a/src/locales/ar/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '#####-####']; diff --git a/src/locales/ar/location/postcode_pattern.ts b/src/locales/ar/location/postcode_pattern.ts new file mode 100644 index 00000000000..8e7f53d1b27 --- /dev/null +++ b/src/locales/ar/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.numeric(5)}}', + '{{string.numeric(5)}}-{{string.numeric(4)}}', +]; diff --git a/src/locales/az/location/index.ts b/src/locales/az/location/index.ts index dae11a6d1fe..c47b8afbd3f 100644 --- a/src/locales/az/location/index.ts +++ b/src/locales/az/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/az/location/postcode.ts b/src/locales/az/location/postcode.ts deleted file mode 100644 index 23911060c44..00000000000 --- a/src/locales/az/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['AZ####']; diff --git a/src/locales/az/location/postcode_pattern.ts b/src/locales/az/location/postcode_pattern.ts new file mode 100644 index 00000000000..8d42526f6d7 --- /dev/null +++ b/src/locales/az/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['AZ{{string.numeric(4)}}']; diff --git a/src/locales/cs_CZ/location/index.ts b/src/locales/cs_CZ/location/index.ts index 194cc3e7777..ee1ca095c52 100644 --- a/src/locales/cs_CZ/location/index.ts +++ b/src/locales/cs_CZ/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/cs_CZ/location/postcode.ts b/src/locales/cs_CZ/location/postcode.ts deleted file mode 100644 index 1b75ed6a7d8..00000000000 --- a/src/locales/cs_CZ/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '### ##']; diff --git a/src/locales/cs_CZ/location/postcode_pattern.ts b/src/locales/cs_CZ/location/postcode_pattern.ts new file mode 100644 index 00000000000..982f7e5ad3b --- /dev/null +++ b/src/locales/cs_CZ/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.numeric(5)}}', + '{{string.numeric(3)}} {{string.numeric(2)}}', +]; diff --git a/src/locales/da/location/index.ts b/src/locales/da/location/index.ts index d0fe278c249..d34b89406ed 100644 --- a/src/locales/da/location/index.ts +++ b/src/locales/da/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import street_address from './street_address'; import street_name from './street_name'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_pattern, country, direction, - postcode, + postcode_pattern, secondary_address, street_address, street_name, diff --git a/src/locales/da/location/postcode.ts b/src/locales/da/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/da/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/da/location/postcode_pattern.ts b/src/locales/da/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/da/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/de/location/index.ts b/src/locales/de/location/index.ts index cf29e47e629..244a7e1ae8f 100644 --- a/src/locales/de/location/index.ts +++ b/src/locales/de/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -24,7 +24,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/de/location/postcode.ts b/src/locales/de/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/de/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/de/location/postcode_pattern.ts b/src/locales/de/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/de/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/de_AT/location/index.ts b/src/locales/de_AT/location/index.ts index 194cc3e7777..ee1ca095c52 100644 --- a/src/locales/de_AT/location/index.ts +++ b/src/locales/de_AT/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/de_AT/location/postcode.ts b/src/locales/de_AT/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/de_AT/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/de_AT/location/postcode_pattern.ts b/src/locales/de_AT/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/de_AT/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/de_CH/location/index.ts b/src/locales/de_CH/location/index.ts index 52cefeb4d65..9c64007df35 100644 --- a/src/locales/de_CH/location/index.ts +++ b/src/locales/de_CH/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country_code from './country_code'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_name from './street_name'; @@ -16,7 +16,7 @@ const location: LocationDefinition = { city_name, city_pattern, country_code, - postcode, + postcode_pattern, state, state_abbr, street_name, diff --git a/src/locales/de_CH/location/postcode.ts b/src/locales/de_CH/location/postcode.ts deleted file mode 100644 index ca8a62b02b7..00000000000 --- a/src/locales/de_CH/location/postcode.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default [ - '1###', - '2###', - '3###', - '4###', - '5###', - '6###', - '7###', - '8###', - '9###', -]; diff --git a/src/locales/de_CH/location/postcode_pattern.ts b/src/locales/de_CH/location/postcode_pattern.ts new file mode 100644 index 00000000000..fe42a3d1029 --- /dev/null +++ b/src/locales/de_CH/location/postcode_pattern.ts @@ -0,0 +1,11 @@ +export default [ + '1{{string.numeric(3)}}', + '2{{string.numeric(3)}}', + '3{{string.numeric(3)}}', + '4{{string.numeric(3)}}', + '5{{string.numeric(3)}}', + '6{{string.numeric(3)}}', + '7{{string.numeric(3)}}', + '8{{string.numeric(3)}}', + '9{{string.numeric(3)}}', +]; diff --git a/src/locales/dv/location/index.ts b/src/locales/dv/location/index.ts index cb99bfe4f55..8c021c8f7ed 100644 --- a/src/locales/dv/location/index.ts +++ b/src/locales/dv/location/index.ts @@ -7,7 +7,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import street_pattern from './street_pattern'; import street_suffix from './street_suffix'; @@ -16,7 +16,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, city_suffix, - postcode, + postcode_pattern, street_pattern, street_suffix, }; diff --git a/src/locales/dv/location/postcode.ts b/src/locales/dv/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/dv/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/dv/location/postcode_pattern.ts b/src/locales/dv/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/dv/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/en/location/index.ts b/src/locales/en/location/index.ts index 64ca3268f7d..2ed80b03543 100644 --- a/src/locales/en/location/index.ts +++ b/src/locales/en/location/index.ts @@ -12,7 +12,7 @@ import continent from './continent'; import country from './country'; import county from './county'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -31,7 +31,7 @@ const location: LocationDefinition = { country, county, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/en/location/postcode.ts b/src/locales/en/location/postcode.ts deleted file mode 100644 index 4433f068b5e..00000000000 --- a/src/locales/en/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '#####-####']; diff --git a/src/locales/en/location/postcode_pattern.ts b/src/locales/en/location/postcode_pattern.ts new file mode 100644 index 00000000000..8e7f53d1b27 --- /dev/null +++ b/src/locales/en/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.numeric(5)}}', + '{{string.numeric(5)}}-{{string.numeric(4)}}', +]; diff --git a/src/locales/en_AU/location/index.ts b/src/locales/en_AU/location/index.ts index 82cd9a18cfa..c2433ead745 100644 --- a/src/locales/en_AU/location/index.ts +++ b/src/locales/en_AU/location/index.ts @@ -5,7 +5,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_pattern from './street_pattern'; @@ -14,7 +14,7 @@ import street_suffix from './street_suffix'; const location: LocationDefinition = { building_number, city_pattern, - postcode, + postcode_pattern, state, state_abbr, street_pattern, diff --git a/src/locales/en_AU/location/postcode.ts b/src/locales/en_AU/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/en_AU/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/en_AU/location/postcode_pattern.ts b/src/locales/en_AU/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/en_AU/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/en_AU_ocker/location/index.ts b/src/locales/en_AU_ocker/location/index.ts index aab8e797209..9a733c55d83 100644 --- a/src/locales/en_AU_ocker/location/index.ts +++ b/src/locales/en_AU_ocker/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_name from './street_name'; @@ -17,7 +17,7 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, + postcode_pattern, state, state_abbr, street_name, diff --git a/src/locales/en_AU_ocker/location/postcode.ts b/src/locales/en_AU_ocker/location/postcode.ts deleted file mode 100644 index 16b30103214..00000000000 --- a/src/locales/en_AU_ocker/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['0###', '2###', '3###', '4###', '5###', '6###', '7###']; diff --git a/src/locales/en_AU_ocker/location/postcode_pattern.ts b/src/locales/en_AU_ocker/location/postcode_pattern.ts new file mode 100644 index 00000000000..23434848c6d --- /dev/null +++ b/src/locales/en_AU_ocker/location/postcode_pattern.ts @@ -0,0 +1,9 @@ +export default [ + '0{{string.numeric(3)}}', + '2{{string.numeric(3)}}', + '3{{string.numeric(3)}}', + '4{{string.numeric(3)}}', + '5{{string.numeric(3)}}', + '6{{string.numeric(3)}}', + '7{{string.numeric(3)}}', +]; diff --git a/src/locales/en_CA/location/index.ts b/src/locales/en_CA/location/index.ts index 8103ffb4e93..c2beb5fcbe9 100644 --- a/src/locales/en_CA/location/index.ts +++ b/src/locales/en_CA/location/index.ts @@ -5,8 +5,8 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; import postcode_by_state from './postcode_by_state'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_pattern from './street_pattern'; @@ -14,8 +14,8 @@ import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, postcode_by_state, + postcode_pattern, state, state_abbr, street_pattern, diff --git a/src/locales/en_CA/location/postcode.ts b/src/locales/en_CA/location/postcode.ts deleted file mode 100644 index 5d4f9f27c6d..00000000000 --- a/src/locales/en_CA/location/postcode.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default [ - 'A#? #?#', - 'B#? #?#', - 'C#? #?#', - 'E#? #?#', - 'G#? #?#', - 'H#? #?#', - 'J#? #?#', - 'K#? #?#', - 'L#? #?#', - 'M#? #?#', - 'N#? #?#', - 'P#? #?#', - 'R#? #?#', - 'S#? #?#', - 'T#? #?#', - 'V#? #?#', - 'X#? #?#', - 'Y#? #?#', -]; diff --git a/src/locales/en_CA/location/postcode_pattern.ts b/src/locales/en_CA/location/postcode_pattern.ts new file mode 100644 index 00000000000..bf8906a79c9 --- /dev/null +++ b/src/locales/en_CA/location/postcode_pattern.ts @@ -0,0 +1,20 @@ +export default [ + 'A{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'B{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'C{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'E{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'G{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'H{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'J{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'K{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'L{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'M{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'N{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'P{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'R{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'S{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'T{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'V{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'X{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'Y{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', +]; diff --git a/src/locales/en_GB/location/index.ts b/src/locales/en_GB/location/index.ts index 0f9fe8f64e8..a984aca8310 100644 --- a/src/locales/en_GB/location/index.ts +++ b/src/locales/en_GB/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_name from './street_name'; @@ -23,7 +23,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, county, - postcode, + postcode_pattern, state, state_abbr, street_name, diff --git a/src/locales/en_GB/location/postcode.ts b/src/locales/en_GB/location/postcode.ts deleted file mode 100644 index f3bc7fa7f01..00000000000 --- a/src/locales/en_GB/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['??# #??', '??## #??']; diff --git a/src/locales/en_GB/location/postcode_pattern.ts b/src/locales/en_GB/location/postcode_pattern.ts new file mode 100644 index 00000000000..8516baf5632 --- /dev/null +++ b/src/locales/en_GB/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.alpha({ "casing": "upper" , "length": 2})}}{{string.numeric}} {{string.numeric}}{{string.alpha({ "casing": "upper" , "length": 2})}}', + '{{string.alpha({ "casing": "upper" , "length": 2})}}{{string.numeric(2)}} {{string.numeric}}{{string.alpha({ "casing": "upper" , "length": 2})}}', +]; diff --git a/src/locales/en_GH/location/index.ts b/src/locales/en_GH/location/index.ts index db92da63235..8cace01316e 100644 --- a/src/locales/en_GH/location/index.ts +++ b/src/locales/en_GH/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_address from './street_address'; import street_pattern from './street_pattern'; @@ -17,7 +17,7 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, + postcode_pattern, state, street_address, street_pattern, diff --git a/src/locales/en_GH/location/postcode.ts b/src/locales/en_GH/location/postcode.ts deleted file mode 100644 index 0e099220160..00000000000 --- a/src/locales/en_GH/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['??-###-####', '??-####-####']; diff --git a/src/locales/en_GH/location/postcode_pattern.ts b/src/locales/en_GH/location/postcode_pattern.ts new file mode 100644 index 00000000000..fbeb6a3b0af --- /dev/null +++ b/src/locales/en_GH/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.alpha({ "casing": "upper" , "length": 2})}}-{{string.numeric(3)}}-{{string.numeric(4)}}', + '{{string.alpha({ "casing": "upper" , "length": 2})}}-{{string.numeric(4)}}-{{string.numeric(4)}}', +]; diff --git a/src/locales/en_HK/location/index.ts b/src/locales/en_HK/location/index.ts index 1f3602da0c3..b0b4457ac5c 100644 --- a/src/locales/en_HK/location/index.ts +++ b/src/locales/en_HK/location/index.ts @@ -6,8 +6,8 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; import postcode_by_state from './postcode_by_state'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_cantonese_part from './street_cantonese_part'; @@ -20,8 +20,8 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, postcode_by_state, + postcode_pattern, state, state_abbr, street_cantonese_part, diff --git a/src/locales/en_HK/location/postcode.ts b/src/locales/en_HK/location/postcode.ts deleted file mode 100644 index 5384027f605..00000000000 --- a/src/locales/en_HK/location/postcode.ts +++ /dev/null @@ -1,2 +0,0 @@ -// https://www.hongkongpost.hk/en/about_us/tips/postcode/index.html -export default null; diff --git a/src/locales/en_HK/location/postcode_pattern.ts b/src/locales/en_HK/location/postcode_pattern.ts new file mode 100644 index 00000000000..7646bbd17d0 --- /dev/null +++ b/src/locales/en_HK/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default null; diff --git a/src/locales/en_IE/location/index.ts b/src/locales/en_IE/location/index.ts index de013f22ca6..d4e5e014dcb 100644 --- a/src/locales/en_IE/location/index.ts +++ b/src/locales/en_IE/location/index.ts @@ -5,13 +5,13 @@ import type { LocationDefinition } from '../../..'; import city_pattern from './city_pattern'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_pattern, county, - postcode, + postcode_pattern, street_pattern, }; diff --git a/src/locales/en_IE/location/postcode.ts b/src/locales/en_IE/location/postcode.ts deleted file mode 100644 index cd0aa2c1f77..00000000000 --- a/src/locales/en_IE/location/postcode.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default [ - 'A## ****', - 'D## ****', - 'E## ****', - 'F## ****', - 'H## ****', - 'K## ****', - 'N## ****', - 'P## ****', - 'R## ****', - 'T## ****', - 'V## ****', - 'W## ****', - 'X## ****', - 'Y## ****', -]; diff --git a/src/locales/en_IE/location/postcode_pattern.ts b/src/locales/en_IE/location/postcode_pattern.ts new file mode 100644 index 00000000000..032f94538d4 --- /dev/null +++ b/src/locales/en_IE/location/postcode_pattern.ts @@ -0,0 +1,16 @@ +export default [ + 'A{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'D{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'E{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'F{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'H{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'K{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'N{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'P{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'R{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'T{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'V{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'W{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'X{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', + 'Y{{string.numeric(2)}} {{string.alphanumeric({ "casing": "upper" , "length": 4})}}', +]; diff --git a/src/locales/en_IN/location/index.ts b/src/locales/en_IN/location/index.ts index 9f6d2f7dc65..8824564ed85 100644 --- a/src/locales/en_IN/location/index.ts +++ b/src/locales/en_IN/location/index.ts @@ -5,7 +5,7 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_pattern from './street_pattern'; @@ -13,7 +13,7 @@ import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, state_abbr, street_pattern, diff --git a/src/locales/en_IN/location/postcode.ts b/src/locales/en_IN/location/postcode.ts deleted file mode 100644 index e9ac838bf12..00000000000 --- a/src/locales/en_IN/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['### ###']; diff --git a/src/locales/en_IN/location/postcode_pattern.ts b/src/locales/en_IN/location/postcode_pattern.ts new file mode 100644 index 00000000000..f6a552a71c1 --- /dev/null +++ b/src/locales/en_IN/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(3)}} {{string.numeric(3)}}']; diff --git a/src/locales/en_NG/location/index.ts b/src/locales/en_NG/location/index.ts index 8085ed10f27..b68af4caf81 100644 --- a/src/locales/en_NG/location/index.ts +++ b/src/locales/en_NG/location/index.ts @@ -5,14 +5,14 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/en_NG/location/postcode.ts b/src/locales/en_NG/location/postcode.ts deleted file mode 100644 index c97754f0d4f..00000000000 --- a/src/locales/en_NG/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '####']; diff --git a/src/locales/en_NG/location/postcode_pattern.ts b/src/locales/en_NG/location/postcode_pattern.ts new file mode 100644 index 00000000000..6b9540dab91 --- /dev/null +++ b/src/locales/en_NG/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}', '{{string.numeric(4)}}']; diff --git a/src/locales/en_ZA/location/index.ts b/src/locales/en_ZA/location/index.ts index 8085ed10f27..b68af4caf81 100644 --- a/src/locales/en_ZA/location/index.ts +++ b/src/locales/en_ZA/location/index.ts @@ -5,14 +5,14 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/en_ZA/location/postcode.ts b/src/locales/en_ZA/location/postcode.ts deleted file mode 100644 index c97754f0d4f..00000000000 --- a/src/locales/en_ZA/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '####']; diff --git a/src/locales/en_ZA/location/postcode_pattern.ts b/src/locales/en_ZA/location/postcode_pattern.ts new file mode 100644 index 00000000000..6b9540dab91 --- /dev/null +++ b/src/locales/en_ZA/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}', '{{string.numeric(4)}}']; diff --git a/src/locales/es/location/index.ts b/src/locales/es/location/index.ts index 8f5b5d0b8c7..1d3db785d19 100644 --- a/src/locales/es/location/index.ts +++ b/src/locales/es/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -22,7 +22,7 @@ const location: LocationDefinition = { city_pattern, country, county, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/es/location/postcode.ts b/src/locales/es/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/es/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/es/location/postcode_pattern.ts b/src/locales/es/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/es/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/es_MX/location/index.ts b/src/locales/es_MX/location/index.ts index 83d77eaf278..b0253ef0afb 100644 --- a/src/locales/es_MX/location/index.ts +++ b/src/locales/es_MX/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/es_MX/location/postcode.ts b/src/locales/es_MX/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/es_MX/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/es_MX/location/postcode_pattern.ts b/src/locales/es_MX/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/es_MX/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/fa/location/index.ts b/src/locales/fa/location/index.ts index e861d95677f..85f2de76904 100644 --- a/src/locales/fa/location/index.ts +++ b/src/locales/fa/location/index.ts @@ -10,7 +10,7 @@ import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -26,7 +26,7 @@ const location: LocationDefinition = { city_suffix, country, direction, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/fa/location/postcode.ts b/src/locales/fa/location/postcode.ts deleted file mode 100644 index baa3f8b8ded..00000000000 --- a/src/locales/fa/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####-#####']; diff --git a/src/locales/fa/location/postcode_pattern.ts b/src/locales/fa/location/postcode_pattern.ts new file mode 100644 index 00000000000..c3296eb5524 --- /dev/null +++ b/src/locales/fa/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}-{{string.numeric(5)}}']; diff --git a/src/locales/fi/location/index.ts b/src/locales/fi/location/index.ts index 6b0acaf364a..9d5259baf94 100644 --- a/src/locales/fi/location/index.ts +++ b/src/locales/fi/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -17,7 +17,7 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/fi/location/postcode.ts b/src/locales/fi/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/fi/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/fi/location/postcode_pattern.ts b/src/locales/fi/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/fi/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/fr/location/index.ts b/src/locales/fr/location/index.ts index 69b352fd038..3511cdeca27 100644 --- a/src/locales/fr/location/index.ts +++ b/src/locales/fr/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -22,7 +22,7 @@ const location: LocationDefinition = { city_pattern, country, direction, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/fr/location/postcode.ts b/src/locales/fr/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/fr/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/fr/location/postcode_pattern.ts b/src/locales/fr/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/fr/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/fr_BE/location/index.ts b/src/locales/fr_BE/location/index.ts index 4f6c28659f1..d4b81ea8657 100644 --- a/src/locales/fr_BE/location/index.ts +++ b/src/locales/fr_BE/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_address from './street_address'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, city_suffix, - postcode, + postcode_pattern, state, state_abbr, street_address, diff --git a/src/locales/fr_BE/location/postcode.ts b/src/locales/fr_BE/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/fr_BE/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/fr_BE/location/postcode_pattern.ts b/src/locales/fr_BE/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/fr_BE/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/fr_CA/location/index.ts b/src/locales/fr_CA/location/index.ts index 4567ecde2cf..947b346f6e9 100644 --- a/src/locales/fr_CA/location/index.ts +++ b/src/locales/fr_CA/location/index.ts @@ -4,14 +4,14 @@ */ import type { LocationDefinition } from '../../..'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_pattern, - postcode, + postcode_pattern, state, state_abbr, street_pattern, diff --git a/src/locales/fr_CA/location/postcode.ts b/src/locales/fr_CA/location/postcode.ts deleted file mode 100644 index 5d4f9f27c6d..00000000000 --- a/src/locales/fr_CA/location/postcode.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default [ - 'A#? #?#', - 'B#? #?#', - 'C#? #?#', - 'E#? #?#', - 'G#? #?#', - 'H#? #?#', - 'J#? #?#', - 'K#? #?#', - 'L#? #?#', - 'M#? #?#', - 'N#? #?#', - 'P#? #?#', - 'R#? #?#', - 'S#? #?#', - 'T#? #?#', - 'V#? #?#', - 'X#? #?#', - 'Y#? #?#', -]; diff --git a/src/locales/fr_CA/location/postcode_pattern.ts b/src/locales/fr_CA/location/postcode_pattern.ts new file mode 100644 index 00000000000..bf8906a79c9 --- /dev/null +++ b/src/locales/fr_CA/location/postcode_pattern.ts @@ -0,0 +1,20 @@ +export default [ + 'A{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'B{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'C{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'E{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'G{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'H{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'J{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'K{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'L{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'M{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'N{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'P{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'R{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'S{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'T{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'V{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'X{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', + 'Y{{string.numeric}}{{string.alpha({ "casing": "upper" })}} {{string.numeric}}{{string.alpha({ "casing": "upper" })}}{{string.numeric}}', +]; diff --git a/src/locales/fr_CH/location/index.ts b/src/locales/fr_CH/location/index.ts index de2e14eee14..d75296c7ce3 100644 --- a/src/locales/fr_CH/location/index.ts +++ b/src/locales/fr_CH/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import country from './country'; import country_code from './country_code'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -25,7 +25,7 @@ const location: LocationDefinition = { country, country_code, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/fr_CH/location/postcode.ts b/src/locales/fr_CH/location/postcode.ts deleted file mode 100644 index ca8a62b02b7..00000000000 --- a/src/locales/fr_CH/location/postcode.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default [ - '1###', - '2###', - '3###', - '4###', - '5###', - '6###', - '7###', - '8###', - '9###', -]; diff --git a/src/locales/fr_CH/location/postcode_pattern.ts b/src/locales/fr_CH/location/postcode_pattern.ts new file mode 100644 index 00000000000..fe42a3d1029 --- /dev/null +++ b/src/locales/fr_CH/location/postcode_pattern.ts @@ -0,0 +1,11 @@ +export default [ + '1{{string.numeric(3)}}', + '2{{string.numeric(3)}}', + '3{{string.numeric(3)}}', + '4{{string.numeric(3)}}', + '5{{string.numeric(3)}}', + '6{{string.numeric(3)}}', + '7{{string.numeric(3)}}', + '8{{string.numeric(3)}}', + '9{{string.numeric(3)}}', +]; diff --git a/src/locales/fr_LU/location/index.ts b/src/locales/fr_LU/location/index.ts index a899ac98d30..cc8e0eff59b 100644 --- a/src/locales/fr_LU/location/index.ts +++ b/src/locales/fr_LU/location/index.ts @@ -5,13 +5,13 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, }; diff --git a/src/locales/fr_LU/location/postcode.ts b/src/locales/fr_LU/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/fr_LU/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/fr_LU/location/postcode_pattern.ts b/src/locales/fr_LU/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/fr_LU/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/fr_SN/location/index.ts b/src/locales/fr_SN/location/index.ts index c6a86528dd8..6961678f577 100644 --- a/src/locales/fr_SN/location/index.ts +++ b/src/locales/fr_SN/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -18,7 +18,7 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/fr_SN/location/postcode.ts b/src/locales/fr_SN/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/fr_SN/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/fr_SN/location/postcode_pattern.ts b/src/locales/fr_SN/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/fr_SN/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/he/location/index.ts b/src/locales/he/location/index.ts index 7cb8eab925d..f46545dff33 100644 --- a/src/locales/he/location/index.ts +++ b/src/locales/he/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import country from './country'; import county from './county'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -25,7 +25,7 @@ const location: LocationDefinition = { country, county, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/he/location/postcode.ts b/src/locales/he/location/postcode.ts deleted file mode 100644 index 2850dba4057..00000000000 --- a/src/locales/he/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '#######']; diff --git a/src/locales/he/location/postcode_pattern.ts b/src/locales/he/location/postcode_pattern.ts new file mode 100644 index 00000000000..7cccdcc01d2 --- /dev/null +++ b/src/locales/he/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}', '{{string.numeric(7)}}']; diff --git a/src/locales/hr/location/index.ts b/src/locales/hr/location/index.ts index e8db35f63d2..70bb2f0aff6 100644 --- a/src/locales/hr/location/index.ts +++ b/src/locales/hr/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_pattern, country, county, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/hr/location/postcode.ts b/src/locales/hr/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/hr/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/hr/location/postcode_pattern.ts b/src/locales/hr/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/hr/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/id_ID/location/index.ts b/src/locales/id_ID/location/index.ts index e2c5f4012d7..7c07a74d511 100644 --- a/src/locales/id_ID/location/index.ts +++ b/src/locales/id_ID/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_address from './street_address'; import street_pattern from './street_pattern'; @@ -16,7 +16,7 @@ const location: LocationDefinition = { building_number, city_name, city_pattern, - postcode, + postcode_pattern, state, street_address, street_pattern, diff --git a/src/locales/id_ID/location/postcode.ts b/src/locales/id_ID/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/id_ID/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/id_ID/location/postcode_pattern.ts b/src/locales/id_ID/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/id_ID/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/it/location/index.ts b/src/locales/it/location/index.ts index 639ced2da0b..a5f9860279c 100644 --- a/src/locales/it/location/index.ts +++ b/src/locales/it/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -24,7 +24,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/it/location/postcode.ts b/src/locales/it/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/it/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/it/location/postcode_pattern.ts b/src/locales/it/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/it/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/ja/location/index.ts b/src/locales/ja/location/index.ts index 1d9b9aae501..417ef8a1c58 100644 --- a/src/locales/ja/location/index.ts +++ b/src/locales/ja/location/index.ts @@ -8,7 +8,7 @@ import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_suffix, country, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/ja/location/postcode.ts b/src/locales/ja/location/postcode.ts deleted file mode 100644 index 2dacfca1e9a..00000000000 --- a/src/locales/ja/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['###-####']; diff --git a/src/locales/ja/location/postcode_pattern.ts b/src/locales/ja/location/postcode_pattern.ts new file mode 100644 index 00000000000..5a8b6ca0c7c --- /dev/null +++ b/src/locales/ja/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(3)}}-{{string.numeric(4)}}']; diff --git a/src/locales/ka_GE/location/index.ts b/src/locales/ka_GE/location/index.ts index 01e7bd477d8..0f4ab8d4c0d 100644 --- a/src/locales/ka_GE/location/index.ts +++ b/src/locales/ka_GE/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import street_address from './street_address'; import street_name from './street_name'; @@ -23,7 +23,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, street_address, street_name, diff --git a/src/locales/ka_GE/location/postcode.ts b/src/locales/ka_GE/location/postcode.ts deleted file mode 100644 index 695bc36891f..00000000000 --- a/src/locales/ka_GE/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['01##']; diff --git a/src/locales/ka_GE/location/postcode_pattern.ts b/src/locales/ka_GE/location/postcode_pattern.ts new file mode 100644 index 00000000000..ff29291c69f --- /dev/null +++ b/src/locales/ka_GE/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['01{{string.numeric(2)}}']; diff --git a/src/locales/ko/location/index.ts b/src/locales/ko/location/index.ts index b7c2f060330..a7e703b8f94 100644 --- a/src/locales/ko/location/index.ts +++ b/src/locales/ko/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -18,7 +18,7 @@ const location: LocationDefinition = { city_name, city_pattern, city_suffix, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/ko/location/postcode.ts b/src/locales/ko/location/postcode.ts deleted file mode 100644 index 4d7ada5f211..00000000000 --- a/src/locales/ko/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['###-###', '#####']; diff --git a/src/locales/ko/location/postcode_pattern.ts b/src/locales/ko/location/postcode_pattern.ts new file mode 100644 index 00000000000..c51e09794a4 --- /dev/null +++ b/src/locales/ko/location/postcode_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{string.numeric(3)}}-{{string.numeric(3)}}', + '{{string.numeric(5)}}', +]; diff --git a/src/locales/lv/location/index.ts b/src/locales/lv/location/index.ts index dae11a6d1fe..c47b8afbd3f 100644 --- a/src/locales/lv/location/index.ts +++ b/src/locales/lv/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/lv/location/postcode.ts b/src/locales/lv/location/postcode.ts deleted file mode 100644 index 49fde7daabe..00000000000 --- a/src/locales/lv/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['LV####', 'LV-####']; diff --git a/src/locales/lv/location/postcode_pattern.ts b/src/locales/lv/location/postcode_pattern.ts new file mode 100644 index 00000000000..fdbadfa6d4b --- /dev/null +++ b/src/locales/lv/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['LV{{string.numeric(4)}}', 'LV-{{string.numeric(4)}}']; diff --git a/src/locales/mk/location/index.ts b/src/locales/mk/location/index.ts index 0156f2efd3b..01c7c2163a4 100644 --- a/src/locales/mk/location/index.ts +++ b/src/locales/mk/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -19,7 +19,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/mk/location/postcode.ts b/src/locales/mk/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/mk/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/mk/location/postcode_pattern.ts b/src/locales/mk/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/mk/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/nb_NO/location/index.ts b/src/locales/nb_NO/location/index.ts index 5c738b99856..78f6bebbf82 100644 --- a/src/locales/nb_NO/location/index.ts +++ b/src/locales/nb_NO/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import city_suffix from './city_suffix'; import common_street_suffix from './common_street_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -23,7 +23,7 @@ const location: LocationDefinition = { city_pattern, city_suffix, common_street_suffix, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/nb_NO/location/postcode.ts b/src/locales/nb_NO/location/postcode.ts deleted file mode 100644 index 90004f9292d..00000000000 --- a/src/locales/nb_NO/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####', '0###']; diff --git a/src/locales/nb_NO/location/postcode_pattern.ts b/src/locales/nb_NO/location/postcode_pattern.ts new file mode 100644 index 00000000000..f25eb4a7ff7 --- /dev/null +++ b/src/locales/nb_NO/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}', '0{{string.numeric(3)}}']; diff --git a/src/locales/ne/location/index.ts b/src/locales/ne/location/index.ts index 8085ed10f27..b68af4caf81 100644 --- a/src/locales/ne/location/index.ts +++ b/src/locales/ne/location/index.ts @@ -5,14 +5,14 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/ne/location/postcode.ts b/src/locales/ne/location/postcode.ts deleted file mode 100644 index b05a8a69846..00000000000 --- a/src/locales/ne/location/postcode.ts +++ /dev/null @@ -1,2 +0,0 @@ -// https://www.gpo.gov.np/Home/Postalcode -export default ['1####', '2####', '3####', '4####', '5####']; diff --git a/src/locales/ne/location/postcode_pattern.ts b/src/locales/ne/location/postcode_pattern.ts new file mode 100644 index 00000000000..62197577210 --- /dev/null +++ b/src/locales/ne/location/postcode_pattern.ts @@ -0,0 +1,7 @@ +export default [ + '1{{string.numeric(4)}}', + '2{{string.numeric(4)}}', + '3{{string.numeric(4)}}', + '4{{string.numeric(4)}}', + '5{{string.numeric(4)}}', +]; diff --git a/src/locales/nl/location/index.ts b/src/locales/nl/location/index.ts index f4fec48e740..42a75ee1e36 100644 --- a/src/locales/nl/location/index.ts +++ b/src/locales/nl/location/index.ts @@ -8,7 +8,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -22,7 +22,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/nl/location/postcode.ts b/src/locales/nl/location/postcode.ts deleted file mode 100644 index 9dbd36918ac..00000000000 --- a/src/locales/nl/location/postcode.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default [ - '1### ??', - '2### ??', - '3### ??', - '4### ??', - '5### ??', - '6### ??', - '7### ??', - '8### ??', - '9### ??', -]; diff --git a/src/locales/nl/location/postcode_pattern.ts b/src/locales/nl/location/postcode_pattern.ts new file mode 100644 index 00000000000..de744fa3a61 --- /dev/null +++ b/src/locales/nl/location/postcode_pattern.ts @@ -0,0 +1,11 @@ +export default [ + '1{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '2{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '3{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '4{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '5{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '6{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '7{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '8{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', + '9{{string.numeric(3)}} {{string.alpha({ "casing": "upper" , "length": 2})}}', +]; diff --git a/src/locales/nl_BE/location/index.ts b/src/locales/nl_BE/location/index.ts index 0da19bab332..5d16f5ca956 100644 --- a/src/locales/nl_BE/location/index.ts +++ b/src/locales/nl_BE/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, city_suffix, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/nl_BE/location/postcode.ts b/src/locales/nl_BE/location/postcode.ts deleted file mode 100644 index a8235678f7b..00000000000 --- a/src/locales/nl_BE/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####']; diff --git a/src/locales/nl_BE/location/postcode_pattern.ts b/src/locales/nl_BE/location/postcode_pattern.ts new file mode 100644 index 00000000000..f37d1220747 --- /dev/null +++ b/src/locales/nl_BE/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}']; diff --git a/src/locales/pl/location/index.ts b/src/locales/pl/location/index.ts index 50cd118841e..4e18ad98dcc 100644 --- a/src/locales/pl/location/index.ts +++ b/src/locales/pl/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -22,7 +22,7 @@ const location: LocationDefinition = { city_pattern, country, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/pl/location/postcode.ts b/src/locales/pl/location/postcode.ts deleted file mode 100644 index 31cf56d45b1..00000000000 --- a/src/locales/pl/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['##-###']; diff --git a/src/locales/pl/location/postcode_pattern.ts b/src/locales/pl/location/postcode_pattern.ts new file mode 100644 index 00000000000..6e9e30e4137 --- /dev/null +++ b/src/locales/pl/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(2)}}-{{string.numeric(3)}}']; diff --git a/src/locales/pt_BR/location/index.ts b/src/locales/pt_BR/location/index.ts index 76748468ccf..f556ba83930 100644 --- a/src/locales/pt_BR/location/index.ts +++ b/src/locales/pt_BR/location/index.ts @@ -8,7 +8,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/pt_BR/location/postcode.ts b/src/locales/pt_BR/location/postcode.ts deleted file mode 100644 index 1f8b8fb4cd4..00000000000 --- a/src/locales/pt_BR/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####-###']; diff --git a/src/locales/pt_BR/location/postcode_pattern.ts b/src/locales/pt_BR/location/postcode_pattern.ts new file mode 100644 index 00000000000..7141daa8926 --- /dev/null +++ b/src/locales/pt_BR/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}-{{string.numeric(3)}}']; diff --git a/src/locales/pt_PT/location/index.ts b/src/locales/pt_PT/location/index.ts index 7ac8d3a1726..1645141a543 100644 --- a/src/locales/pt_PT/location/index.ts +++ b/src/locales/pt_PT/location/index.ts @@ -10,7 +10,7 @@ import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -25,7 +25,7 @@ const location: LocationDefinition = { city_suffix, country, direction, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/pt_PT/location/postcode.ts b/src/locales/pt_PT/location/postcode.ts deleted file mode 100644 index 7af79d49df1..00000000000 --- a/src/locales/pt_PT/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####-###']; diff --git a/src/locales/pt_PT/location/postcode_pattern.ts b/src/locales/pt_PT/location/postcode_pattern.ts new file mode 100644 index 00000000000..b0db5ab3b48 --- /dev/null +++ b/src/locales/pt_PT/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}-{{string.numeric(3)}}']; diff --git a/src/locales/ro/location/index.ts b/src/locales/ro/location/index.ts index e470f51bb5b..0495fe99f36 100644 --- a/src/locales/ro/location/index.ts +++ b/src/locales/ro/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_name, city_pattern, county, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/ro/location/postcode.ts b/src/locales/ro/location/postcode.ts deleted file mode 100644 index 519dcdecffa..00000000000 --- a/src/locales/ro/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['######']; diff --git a/src/locales/ro/location/postcode_pattern.ts b/src/locales/ro/location/postcode_pattern.ts new file mode 100644 index 00000000000..7b097f5044b --- /dev/null +++ b/src/locales/ro/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(6)}}']; diff --git a/src/locales/ro_MD/location/index.ts b/src/locales/ro_MD/location/index.ts index 40c4e066315..6ff19cdb051 100644 --- a/src/locales/ro_MD/location/index.ts +++ b/src/locales/ro_MD/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -23,7 +23,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, county, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/ro_MD/location/postcode.ts b/src/locales/ro_MD/location/postcode.ts deleted file mode 100644 index 7c343c25847..00000000000 --- a/src/locales/ro_MD/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['MD-####']; diff --git a/src/locales/ro_MD/location/postcode_pattern.ts b/src/locales/ro_MD/location/postcode_pattern.ts new file mode 100644 index 00000000000..4251268458c --- /dev/null +++ b/src/locales/ro_MD/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['MD-{{string.numeric(4)}}']; diff --git a/src/locales/ru/location/index.ts b/src/locales/ru/location/index.ts index dae11a6d1fe..c47b8afbd3f 100644 --- a/src/locales/ru/location/index.ts +++ b/src/locales/ru/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -20,7 +20,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/ru/location/postcode.ts b/src/locales/ru/location/postcode.ts deleted file mode 100644 index 519dcdecffa..00000000000 --- a/src/locales/ru/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['######']; diff --git a/src/locales/ru/location/postcode_pattern.ts b/src/locales/ru/location/postcode_pattern.ts new file mode 100644 index 00000000000..7b097f5044b --- /dev/null +++ b/src/locales/ru/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(6)}}']; diff --git a/src/locales/sk/location/index.ts b/src/locales/sk/location/index.ts index cf29e47e629..244a7e1ae8f 100644 --- a/src/locales/sk/location/index.ts +++ b/src/locales/sk/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -24,7 +24,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/sk/location/postcode.ts b/src/locales/sk/location/postcode.ts deleted file mode 100644 index 32bd4a79997..00000000000 --- a/src/locales/sk/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '### ##', '## ###']; diff --git a/src/locales/sk/location/postcode_pattern.ts b/src/locales/sk/location/postcode_pattern.ts new file mode 100644 index 00000000000..b40a1a7548e --- /dev/null +++ b/src/locales/sk/location/postcode_pattern.ts @@ -0,0 +1,5 @@ +export default [ + '{{string.numeric(5)}}', + '{{string.numeric(3)}} {{string.numeric(2)}}', + '{{string.numeric(2)}} {{string.numeric(3)}}', +]; diff --git a/src/locales/sr_RS_latin/location/index.ts b/src/locales/sr_RS_latin/location/index.ts index 0156f2efd3b..01c7c2163a4 100644 --- a/src/locales/sr_RS_latin/location/index.ts +++ b/src/locales/sr_RS_latin/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -19,7 +19,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/sr_RS_latin/location/postcode.ts b/src/locales/sr_RS_latin/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/sr_RS_latin/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/sr_RS_latin/location/postcode_pattern.ts b/src/locales/sr_RS_latin/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/sr_RS_latin/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/sv/location/index.ts b/src/locales/sv/location/index.ts index 612dd30230c..58d4dba2684 100644 --- a/src/locales/sv/location/index.ts +++ b/src/locales/sv/location/index.ts @@ -10,7 +10,7 @@ import city_suffix from './city_suffix'; import common_street_suffix from './common_street_suffix'; import country from './country'; import county from './county'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -27,7 +27,7 @@ const location: LocationDefinition = { common_street_suffix, country, county, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/sv/location/postcode.ts b/src/locales/sv/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/sv/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/sv/location/postcode_pattern.ts b/src/locales/sv/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/sv/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/th/location/index.ts b/src/locales/th/location/index.ts index 9d6f5359d22..adf69f9fb26 100644 --- a/src/locales/th/location/index.ts +++ b/src/locales/th/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_name from './street_name'; import street_pattern from './street_pattern'; @@ -21,7 +21,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, state, street_name, street_pattern, diff --git a/src/locales/th/location/postcode.ts b/src/locales/th/location/postcode.ts deleted file mode 100644 index d3bec08618a..00000000000 --- a/src/locales/th/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['####0']; diff --git a/src/locales/th/location/postcode_pattern.ts b/src/locales/th/location/postcode_pattern.ts new file mode 100644 index 00000000000..20028ebd260 --- /dev/null +++ b/src/locales/th/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(4)}}0']; diff --git a/src/locales/tr/location/index.ts b/src/locales/tr/location/index.ts index 8f9f219a356..c6d0ad14dc8 100644 --- a/src/locales/tr/location/index.ts +++ b/src/locales/tr/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_address from './street_address'; import street_name from './street_name'; @@ -18,7 +18,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, state, street_address, street_name, diff --git a/src/locales/tr/location/postcode.ts b/src/locales/tr/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/tr/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/tr/location/postcode_pattern.ts b/src/locales/tr/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/tr/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/uk/location/index.ts b/src/locales/uk/location/index.ts index f306ec1e3c9..2ab3c3ef18d 100644 --- a/src/locales/uk/location/index.ts +++ b/src/locales/uk/location/index.ts @@ -9,7 +9,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -25,7 +25,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/uk/location/postcode.ts b/src/locales/uk/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/uk/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/uk/location/postcode_pattern.ts b/src/locales/uk/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/uk/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/ur/location/index.ts b/src/locales/ur/location/index.ts index ea213fcab40..e2d31f2bf1f 100644 --- a/src/locales/ur/location/index.ts +++ b/src/locales/ur/location/index.ts @@ -10,7 +10,7 @@ import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; @@ -26,7 +26,7 @@ const location: LocationDefinition = { city_suffix, country, direction, - postcode, + postcode_pattern, secondary_address, state, state_abbr, diff --git a/src/locales/ur/location/postcode.ts b/src/locales/ur/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/ur/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/ur/location/postcode_pattern.ts b/src/locales/ur/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/ur/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/uz_UZ_latin/location/index.ts b/src/locales/uz_UZ_latin/location/index.ts index 5016e321dc6..7bd1bbf2a69 100644 --- a/src/locales/uz_UZ_latin/location/index.ts +++ b/src/locales/uz_UZ_latin/location/index.ts @@ -8,7 +8,7 @@ import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; import direction from './direction'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import secondary_address from './secondary_address'; import state from './state'; import street_address from './street_address'; @@ -22,7 +22,7 @@ const location: LocationDefinition = { city_pattern, country, direction, - postcode, + postcode_pattern, secondary_address, state, street_address, diff --git a/src/locales/uz_UZ_latin/location/postcode.ts b/src/locales/uz_UZ_latin/location/postcode.ts deleted file mode 100644 index 519dcdecffa..00000000000 --- a/src/locales/uz_UZ_latin/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['######']; diff --git a/src/locales/uz_UZ_latin/location/postcode_pattern.ts b/src/locales/uz_UZ_latin/location/postcode_pattern.ts new file mode 100644 index 00000000000..7b097f5044b --- /dev/null +++ b/src/locales/uz_UZ_latin/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(6)}}']; diff --git a/src/locales/vi/location/index.ts b/src/locales/vi/location/index.ts index 908d4754fad..208fc480adf 100644 --- a/src/locales/vi/location/index.ts +++ b/src/locales/vi/location/index.ts @@ -6,7 +6,7 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; import country from './country'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; @@ -14,7 +14,7 @@ const location: LocationDefinition = { city_name, city_pattern, country, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/vi/location/postcode.ts b/src/locales/vi/location/postcode.ts deleted file mode 100644 index db2bcfedae5..00000000000 --- a/src/locales/vi/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####']; diff --git a/src/locales/vi/location/postcode_pattern.ts b/src/locales/vi/location/postcode_pattern.ts new file mode 100644 index 00000000000..0c59c7ab049 --- /dev/null +++ b/src/locales/vi/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}']; diff --git a/src/locales/zh_CN/location/index.ts b/src/locales/zh_CN/location/index.ts index 5cc09a9d4b3..b1a45458ccc 100644 --- a/src/locales/zh_CN/location/index.ts +++ b/src/locales/zh_CN/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_address from './street_address'; @@ -19,7 +19,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, city_suffix, - postcode, + postcode_pattern, state, state_abbr, street_address, diff --git a/src/locales/zh_CN/location/postcode.ts b/src/locales/zh_CN/location/postcode.ts deleted file mode 100644 index 519dcdecffa..00000000000 --- a/src/locales/zh_CN/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['######']; diff --git a/src/locales/zh_CN/location/postcode_pattern.ts b/src/locales/zh_CN/location/postcode_pattern.ts new file mode 100644 index 00000000000..7b097f5044b --- /dev/null +++ b/src/locales/zh_CN/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(6)}}']; diff --git a/src/locales/zh_TW/location/index.ts b/src/locales/zh_TW/location/index.ts index 5cc09a9d4b3..b1a45458ccc 100644 --- a/src/locales/zh_TW/location/index.ts +++ b/src/locales/zh_TW/location/index.ts @@ -7,7 +7,7 @@ import building_number from './building_number'; import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import state_abbr from './state_abbr'; import street_address from './street_address'; @@ -19,7 +19,7 @@ const location: LocationDefinition = { city_pattern, city_prefix, city_suffix, - postcode, + postcode_pattern, state, state_abbr, street_address, diff --git a/src/locales/zh_TW/location/postcode.ts b/src/locales/zh_TW/location/postcode.ts deleted file mode 100644 index 519dcdecffa..00000000000 --- a/src/locales/zh_TW/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['######']; diff --git a/src/locales/zh_TW/location/postcode_pattern.ts b/src/locales/zh_TW/location/postcode_pattern.ts new file mode 100644 index 00000000000..7b097f5044b --- /dev/null +++ b/src/locales/zh_TW/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(6)}}']; diff --git a/src/locales/zu_ZA/location/index.ts b/src/locales/zu_ZA/location/index.ts index 8085ed10f27..b68af4caf81 100644 --- a/src/locales/zu_ZA/location/index.ts +++ b/src/locales/zu_ZA/location/index.ts @@ -5,14 +5,14 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; -import postcode from './postcode'; +import postcode_pattern from './postcode_pattern'; import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { city_name, city_pattern, - postcode, + postcode_pattern, state, street_pattern, }; diff --git a/src/locales/zu_ZA/location/postcode.ts b/src/locales/zu_ZA/location/postcode.ts deleted file mode 100644 index c97754f0d4f..00000000000 --- a/src/locales/zu_ZA/location/postcode.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['#####', '####']; diff --git a/src/locales/zu_ZA/location/postcode_pattern.ts b/src/locales/zu_ZA/location/postcode_pattern.ts new file mode 100644 index 00000000000..6b9540dab91 --- /dev/null +++ b/src/locales/zu_ZA/location/postcode_pattern.ts @@ -0,0 +1 @@ +export default ['{{string.numeric(5)}}', '{{string.numeric(4)}}']; diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index 88f4a9cb711..9f506200e8b 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -179,15 +179,9 @@ export class LocationModule extends ModuleBase { return this.faker.helpers.replaceSymbols(format); } - let zipPattern = this.faker.definitions.location.postcode; - - if (typeof zipPattern === 'string') { - zipPattern = [zipPattern]; - } - - zipPattern = this.faker.helpers.arrayElement(zipPattern); - - return this.faker.helpers.replaceSymbols(zipPattern); + return this.faker.helpers.fake( + this.faker.definitions.location.postcode_pattern + ); } /**