Skip to content

Commit ddb8947

Browse files
committed
W-21354832: resolving merge conflicts
Made-with: Cursor
2 parents 40e8d37 + 1c27be3 commit ddb8947

File tree

10 files changed

+225
-15
lines changed

10 files changed

+225
-15
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Bugfix] Fix error toast for no applicable shipping methods in one-click checkout [#3673](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3673)
66
- [Feature] Subscribe to marketing communications. Email capture component updated in footer section to use Shopper Consents API. [#3674](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3674)
77
- [Bugfix] Fix for custom billing address as returning shoppers in 1CC [#3693](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3693)
8+
- [Feature] Add translations for text in 1CC [#3703](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3703)
89

910
## v9.0.0 (Feb 12, 2026)
1011
- [Feature] One Click Checkout (in Developer Preview) [#3552](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3552)

packages/template-retail-react-app/app/components/order-summary/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ const OrderSummary = ({
259259
</Text>
260260
) : (
261261
<Text fontSize={fontSize} color="gray.700">
262-
TBD
262+
<FormattedMessage
263+
defaultMessage="TBD"
264+
id="order_summary.label.tax_tbd"
265+
/>
263266
</Text>
264267
)}
265268
</Flex>

packages/template-retail-react-app/app/pages/account/partials/account-payment-form.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import React from 'react'
99
import PropTypes from 'prop-types'
10+
import {FormattedMessage} from 'react-intl'
1011
import {Box, Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
1112
import CreditCardFields from '@salesforce/retail-react-app/app/components/forms/credit-card-fields'
1213
import Field from '@salesforce/retail-react-app/app/components/field'
@@ -25,7 +26,12 @@ const AccountPaymentForm = ({form, onSubmit, children}) => {
2526
<CreditCardFields form={form} />
2627
<Field
2728
name="default"
28-
label="Set as default"
29+
label={
30+
<FormattedMessage
31+
defaultMessage="Set as default"
32+
id="account.payments.checkbox.make_default"
33+
/>
34+
}
2935
type="checkbox"
3036
defaultValue={false}
3137
control={form.control}

packages/template-retail-react-app/app/pages/account/payments.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,14 @@ const AccountPayments = () => {
443443
</Text>
444444
<Text color="gray.600">{payment.paymentCard?.holder}</Text>
445445
<Text color="gray.600">
446-
Expires {payment.paymentCard?.expirationMonth}/
447-
{payment.paymentCard?.expirationYear}
446+
<FormattedMessage
447+
defaultMessage="Expires {month}/{year}"
448+
id="account.payments.label.expires"
449+
values={{
450+
month: payment.paymentCard?.expirationMonth,
451+
year: payment.paymentCard?.expirationYear
452+
}}
453+
/>
448454
</Text>
449455
</Stack>
450456
</Stack>

packages/template-retail-react-app/app/pages/checkout-one-click/partials/one-click-contact-info.jsx

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,22 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG
169169

170170
// Validate email format
171171
if (!email) {
172-
setEmailError('Please enter your email address.')
172+
setEmailError(
173+
formatMessage({
174+
defaultMessage: 'Please enter your email address.',
175+
id: 'use_login_fields.error.required_email'
176+
})
177+
)
173178
return
174179
}
175180

176181
if (!isValidEmail(email)) {
177-
setEmailError('Please enter a valid email address.')
182+
setEmailError(
183+
formatMessage({
184+
defaultMessage: 'Please enter a valid email address.',
185+
id: 'use_login_fields.error.invalid_email'
186+
})
187+
)
178188
return
179189
}
180190

@@ -424,13 +434,23 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG
424434

425435
// Validate email before proceeding
426436
if (!formData.email) {
427-
setError('Please enter your email address.')
437+
setError(
438+
formatMessage({
439+
defaultMessage: 'Please enter your email address.',
440+
id: 'use_login_fields.error.required_email'
441+
})
442+
)
428443
setIsSubmitting(false) // Reset submitting state on validation error
429444
return
430445
}
431446

432447
if (!isValidEmail(formData.email)) {
433-
setError('Please enter a valid email address.')
448+
setError(
449+
formatMessage({
450+
defaultMessage: 'Please enter a valid email address.',
451+
id: 'use_login_fields.error.invalid_email'
452+
})
453+
)
434454
setIsSubmitting(false) // Reset submitting state on validation error
435455
return
436456
}
@@ -502,7 +522,12 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG
502522

503523
return
504524
} catch (error) {
505-
setError('An error occurred. Please try again.')
525+
setError(
526+
formatMessage({
527+
defaultMessage: 'An error occurred. Please try again.',
528+
id: 'contact_info.error.generic_try_again'
529+
})
530+
)
506531
// Show continue button again if there's an error
507532
setShowContinueButton(true)
508533
setIsSubmitting(false)
@@ -511,7 +536,12 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG
511536
}
512537
// If user is registered, OTP modal should be open, don't proceed to next step
513538
} catch (error) {
514-
setError('An error occurred. Please try again.')
539+
setError(
540+
formatMessage({
541+
defaultMessage: 'An error occurred. Please try again.',
542+
id: 'contact_info.error.generic_try_again'
543+
})
544+
)
515545
} finally {
516546
// Only reset submitting state for registered users (when OTP modal is open)
517547
// Guest users will have already returned above

packages/template-retail-react-app/app/static/translations/compiled/en-GB.json

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"account.payments.checkbox.make_default": [
3333
{
3434
"type": 0,
35-
"value": "Make default"
35+
"value": "Set as default"
3636
}
3737
],
3838
"account.payments.error.payment_method_remove_failed": [
@@ -77,6 +77,24 @@
7777
"value": "New payment method was saved."
7878
}
7979
],
80+
"account.payments.label.expires": [
81+
{
82+
"type": 0,
83+
"value": "Expires "
84+
},
85+
{
86+
"type": 1,
87+
"value": "month"
88+
},
89+
{
90+
"type": 0,
91+
"value": "/"
92+
},
93+
{
94+
"type": 1,
95+
"value": "year"
96+
}
97+
],
8098
"account.payments.message.error": [
8199
{
82100
"type": 0,
@@ -1637,6 +1655,12 @@
16371655
"value": "Secure Link"
16381656
}
16391657
],
1658+
"contact_info.error.generic_try_again": [
1659+
{
1660+
"type": 0,
1661+
"value": "An error occurred. Please try again."
1662+
}
1663+
],
16401664
"contact_info.error.incorrect_username_or_password": [
16411665
{
16421666
"type": 0,
@@ -3185,6 +3209,12 @@
31853209
"value": "Tax"
31863210
}
31873211
],
3212+
"order_summary.label.tax_tbd": [
3213+
{
3214+
"type": 0,
3215+
"value": "TBD"
3216+
}
3217+
],
31883218
"otp.button.cancel_guest_registration": [
31893219
{
31903220
"type": 0,
@@ -5183,6 +5213,12 @@
51835213
"value": "Security Code"
51845214
}
51855215
],
5216+
"use_login_fields.error.invalid_email": [
5217+
{
5218+
"type": 0,
5219+
"value": "Please enter a valid email address."
5220+
}
5221+
],
51865222
"use_login_fields.error.required_email": [
51875223
{
51885224
"type": 0,

packages/template-retail-react-app/app/static/translations/compiled/en-US.json

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"account.payments.checkbox.make_default": [
3333
{
3434
"type": 0,
35-
"value": "Make default"
35+
"value": "Set as default"
3636
}
3737
],
3838
"account.payments.error.payment_method_remove_failed": [
@@ -77,6 +77,24 @@
7777
"value": "New payment method was saved."
7878
}
7979
],
80+
"account.payments.label.expires": [
81+
{
82+
"type": 0,
83+
"value": "Expires "
84+
},
85+
{
86+
"type": 1,
87+
"value": "month"
88+
},
89+
{
90+
"type": 0,
91+
"value": "/"
92+
},
93+
{
94+
"type": 1,
95+
"value": "year"
96+
}
97+
],
8098
"account.payments.message.error": [
8199
{
82100
"type": 0,
@@ -1637,6 +1655,12 @@
16371655
"value": "Secure Link"
16381656
}
16391657
],
1658+
"contact_info.error.generic_try_again": [
1659+
{
1660+
"type": 0,
1661+
"value": "An error occurred. Please try again."
1662+
}
1663+
],
16401664
"contact_info.error.incorrect_username_or_password": [
16411665
{
16421666
"type": 0,
@@ -3185,6 +3209,12 @@
31853209
"value": "Tax"
31863210
}
31873211
],
3212+
"order_summary.label.tax_tbd": [
3213+
{
3214+
"type": 0,
3215+
"value": "TBD"
3216+
}
3217+
],
31883218
"otp.button.cancel_guest_registration": [
31893219
{
31903220
"type": 0,
@@ -5183,6 +5213,12 @@
51835213
"value": "Security Code"
51845214
}
51855215
],
5216+
"use_login_fields.error.invalid_email": [
5217+
{
5218+
"type": 0,
5219+
"value": "Please enter a valid email address."
5220+
}
5221+
],
51865222
"use_login_fields.error.required_email": [
51875223
{
51885224
"type": 0,

packages/template-retail-react-app/app/static/translations/compiled/en-XA.json

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
},
7777
{
7878
"type": 0,
79-
"value": "Ḿȧȧķḗḗ ḓḗḗƒȧȧŭŭŀŧ"
79+
"value": "Şḗḗŧ ȧȧş ḓḗḗƒȧȧŭŭŀŧ"
8080
},
8181
{
8282
"type": 0,
@@ -181,6 +181,32 @@
181181
"value": "]"
182182
}
183183
],
184+
"account.payments.label.expires": [
185+
{
186+
"type": 0,
187+
"value": "["
188+
},
189+
{
190+
"type": 0,
191+
"value": "Ḗẋƥīřḗḗş "
192+
},
193+
{
194+
"type": 1,
195+
"value": "month"
196+
},
197+
{
198+
"type": 0,
199+
"value": "/"
200+
},
201+
{
202+
"type": 1,
203+
"value": "year"
204+
},
205+
{
206+
"type": 0,
207+
"value": "]"
208+
}
209+
],
184210
"account.payments.message.error": [
185211
{
186212
"type": 0,
@@ -3357,6 +3383,20 @@
33573383
"value": "]"
33583384
}
33593385
],
3386+
"contact_info.error.generic_try_again": [
3387+
{
3388+
"type": 0,
3389+
"value": "["
3390+
},
3391+
{
3392+
"type": 0,
3393+
"value": "Ȧƞ ḗḗřřǿǿř ǿǿƈƈŭŭřřḗḗḓ. Ƥŀḗḗȧȧşḗḗ ŧřẏ ȧȧɠȧȧīƞ."
3394+
},
3395+
{
3396+
"type": 0,
3397+
"value": "]"
3398+
}
3399+
],
33603400
"contact_info.error.incorrect_username_or_password": [
33613401
{
33623402
"type": 0,
@@ -6721,6 +6761,20 @@
67216761
"value": "]"
67226762
}
67236763
],
6764+
"order_summary.label.tax_tbd": [
6765+
{
6766+
"type": 0,
6767+
"value": "["
6768+
},
6769+
{
6770+
"type": 0,
6771+
"value": "ŦƁḒ"
6772+
},
6773+
{
6774+
"type": 0,
6775+
"value": "]"
6776+
}
6777+
],
67246778
"otp.button.cancel_guest_registration": [
67256779
{
67266780
"type": 0,
@@ -10975,6 +11029,20 @@
1097511029
"value": "]"
1097611030
}
1097711031
],
11032+
"use_login_fields.error.invalid_email": [
11033+
{
11034+
"type": 0,
11035+
"value": "["
11036+
},
11037+
{
11038+
"type": 0,
11039+
"value": "Ƥŀḗḗȧȧşḗḗ ḗḗƞŧḗḗř ȧȧ ṽȧȧŀīḓ ḗḗḿȧȧīŀ ȧȧḓḓřḗḗşş."
11040+
},
11041+
{
11042+
"type": 0,
11043+
"value": "]"
11044+
}
11045+
],
1097811046
"use_login_fields.error.required_email": [
1097911047
{
1098011048
"type": 0,

0 commit comments

Comments
 (0)