Update text on paypal discard dialog

This commit is contained in:
ayumi-signal
2026-02-04 14:12:01 -08:00
committed by GitHub
parent a9063ec0c3
commit 6cc517b9b9
3 changed files with 19 additions and 3 deletions

View File

@@ -10047,9 +10047,13 @@
"description": "While making a donation and after entering payment details, if you try to navigate away then a dialog shows and its primary button has this text to confirm cancellation of the donation."
},
"icu:DonateFlow__discard-paypal-dialog-body": {
"messageformat": "Leaving this page will remove your PayPal information. Do you want to proceed?",
"messageformat": "If you leave this page, you will need to start over to complete a donation. Do you want to proceed?",
"description": "While making a donation and after selecting Paypal, if you try to navigate away then a dialog shows with this body text."
},
"icu:DonateFlow__discard-paypal-dialog-discard": {
"messageformat": "Start over",
"description": "While making a donation and after entering payment details, if you try to navigate away then a dialog shows and its primary button has this text to confirm cancellation of the donation."
},
"icu:DonateFlow__continue": {
"messageformat": "Continue",
"description": "While making a donation and selecting the donation amount, this is the primary button to move to the next step."

View File

@@ -305,10 +305,22 @@ export function PreferencesDonateFlow({
return undefined;
}, [i18n, step]);
const discardModalDiscardText = useMemo(() => {
if (step === 'stripePaymentDetails') {
return i18n('icu:DonateFlow__discard-dialog-remove-info');
}
if (step === 'paypal') {
return i18n('icu:DonateFlow__discard-paypal-dialog-discard');
}
return undefined;
}, [i18n, step]);
const [confirmDiscardModal, confirmDiscardIf] = useConfirmDiscard({
i18n,
bodyText: discardModalBodyText,
discardText: i18n('icu:DonateFlow__discard-dialog-remove-info'),
discardText: discardModalDiscardText,
name: 'PreferencesDonateFlow',
tryClose,
});

View File

@@ -942,7 +942,7 @@ export async function _createPaypalIntent({
return {
type: donationStateSchema.Enum.PAYPAL_INTENT,
id: uuid(),
id,
currencyType,
paymentAmount,
paypalPaymentId,