Add Saint Kitts and Nevis localizations for address entry (#38621)

This commit is contained in:
Ron Rennick 2023-06-09 17:07:45 -03:00 committed by GitHub
commit a172941031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add Saint Kitts and Nevis parishes

View File

@ -1082,6 +1082,24 @@ return array(
'KE46' => __( 'Wajir', 'woocommerce' ),
'KE47' => __( 'West Pokot', 'woocommerce' ),
),
'KN' => array( // Saint Kitts and Nevis parishes.
'KNK' => __( 'Saint Kitts', 'woocommerce' ),
'KNN' => __( 'Nevis', 'woocommerce' ),
'KN01' => __( 'Christ Church Nichola Town', 'woocommerce' ),
'KN02' => __( 'Saint Anne Sandy Point', 'woocommerce' ),
'KN03' => __( 'Saint George Basseterre', 'woocommerce' ),
'KN04' => __( 'Saint George Gingerland', 'woocommerce' ),
'KN05' => __( 'Saint James Windward', 'woocommerce' ),
'KN06' => __( 'Saint John Capisterre', 'woocommerce' ),
'KN07' => __( 'Saint John Figtree', 'woocommerce' ),
'KN08' => __( 'Saint Mary Cayon', 'woocommerce' ),
'KN09' => __( 'Saint Paul Capisterre', 'woocommerce' ),
'KN10' => __( 'Saint Paul Charlestown', 'woocommerce' ),
'KN11' => __( 'Saint Peter Basseterre', 'woocommerce' ),
'KN12' => __( 'Saint Thomas Lowland', 'woocommerce' ),
'KN13' => __( 'Saint Thomas Middle Island', 'woocommerce' ),
'KN15' => __( 'Trinity Palmetto Point', 'woocommerce' ),
),
'KR' => array(),
'KW' => array(),
'LA' => array( // Laotian provinces.

View File

@ -1286,6 +1286,16 @@ class WC_Countries {
'priority' => 69,
),
),
'KN' => array(
'postcode' => array(
'required' => false,
'label' => __( 'Postal code', 'woocommerce' ),
),
'state' => array(
'required' => true,
'label' => __( 'Parish', 'woocommerce' ),
),
),
'KR' => array(
'state' => array(
'required' => false,

View File

@ -1616,7 +1616,22 @@ const stateOptions = {
"ST": "São Tomé and Príncipe",
"BL": "Saint Barthélemy",
"SH": "Saint Helena",
"KN": "Saint Kitts and Nevis",
"KN:KNK": "Saint Kitts and Nevis - Saint Kitts",
"KN:KNN": "Saint Kitts and Nevis - Nevis",
"KN:KN01": "Saint Kitts and Nevis - Christ Church Nichola Town",
"KN:KN02": "Saint Kitts and Nevis - Saint Anne Sandy Point",
"KN:KN03": "Saint Kitts and Nevis - Saint George Basseterre",
"KN:KN04": "Saint Kitts and Nevis - Saint George Gingerland",
"KN:KN05": "Saint Kitts and Nevis - Saint James Windward",
"KN:KN06": "Saint Kitts and Nevis - Saint John Capisterre",
"KN:KN07": "Saint Kitts and Nevis - Saint John Figtree",
"KN:KN08": "Saint Kitts and Nevis - Saint Mary Cayon",
"KN:KN09": "Saint Kitts and Nevis - Saint Paul Capisterre",
"KN:KN10": "Saint Kitts and Nevis - Saint Paul Charlestown",
"KN:KN11": "Saint Kitts and Nevis - Saint Peter Basseterre",
"KN:KN12": "Saint Kitts and Nevis - Saint Thomas Lowland",
"KN:KN13": "Saint Kitts and Nevis - Saint Thomas Middle Island",
"KN:KN15": "Saint Kitts and Nevis - Trinity Palmetto Point",
"LC": "Saint Lucia",
"SX": "Saint Martin (Dutch part)",
"MF": "Saint Martin (French part)",

View File

@ -2346,7 +2346,7 @@ test.describe('Data API tests', () => {
"num_decimals": 2,
"thousand_sep": ",",
"weight_unit": "kg",
"states": []
"states": expect.arrayContaining([])
},
{
"code": "KY",