Skip to content

Commit

Permalink
Merge pull request #247 from vtex-apps/fix/default-locale-googleAddre…
Browse files Browse the repository at this point in the history
…ssForm

Set default locale for google address form
  • Loading branch information
Mecrano authored May 7, 2024
2 parents 5ac2b9c + 68da5dd commit 35dbb71
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Set default locale for google address form as GBR

### Added

- Add IRL in locales file

## [0.18.4] - 2024-05-07

### Changed
Expand Down
2 changes: 1 addition & 1 deletion checkout-ui-custom/checkout6-custom.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion checkout-ui-custom/src/_js/_customAddressForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,8 @@ class fnsCustomAddressForm {
_this.lang = _this.orderForm.clientPreferencesData.locale

_this.locale =
_locale[_this.orderForm.storePreferencesData.countryCode]
_locale[_this.orderForm.storePreferencesData.countryCode] ||
_locale.GBR

if (_this.lang === 'es-AR') _this.lang = 'es'

Expand Down
29 changes: 28 additions & 1 deletion checkout-ui-custom/src/_js/_locale-infos.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ module.exports._locale = {
city: 'City',
state: 'State',
locale: 'en-US',
noStreetAddress: 'Your shipping information is missing a required field, please include a street or P.O. Box',
noStreetAddress:
'Your shipping information is missing a required field, please include a street or P.O. Box',
},
GBR: {
couponInactive: 'No discounts available. Check the conditions.',
Expand Down Expand Up @@ -100,6 +101,32 @@ module.exports._locale = {
postalCode: 'Postal Code',
locale: 'en-GB',
},
IRL: {
couponInactive: 'No discounts available. Check the conditions.',
editLabel: 'Edit',
paypalImg: '',
paypalPhone: '',
cartSubmitButton: 'Proceed to Payment',
deliveryDateText: 'Arrives by',
PickupDateText: 'Ready by',
eachLabel: 'each',
tomorrowLabel: 'Tomorrow',
cartNoteLabel: 'Gift Message or Comments',
identifiedUserMessage: `Thanks for coming back!\nTo expedite your transaction, we have securely populated your information for you.`,
address1Placeholder: 'Street address',
address2Placeholder: 'Apartment, suite, building, floor, etc (optional)',
checkoutStepsLabelCart: 'Cart',
checkoutStepsLabelIdentification: 'Identification',
checkoutStepsLabelShipping: 'Shipping',
checkoutStepsLabelPayment: 'Payment',
checkoutStepsLabelConfirmation: 'Confirmation',
requiredField: 'This field is required.',
city: 'Town',
state: 'County',
number: 'Number',
postalCode: 'Postal Code',
locale: 'en-IE',
},
POR: {
couponInactive: 'Nenhum desconto aplicado. Confira as regras.',
editLabel: 'Editar',
Expand Down
4 changes: 1 addition & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@
"url": "https://support.vtex.com/hc/requests"
},
"type": "free",
"availableCountries": [
"*"
]
"availableCountries": ["*"]
},
"$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema"
}
2 changes: 1 addition & 1 deletion node/templates/checkout6-custom.js

Large diffs are not rendered by default.

0 comments on commit 35dbb71

Please sign in to comment.