From 6cc517b9b92f6ded86fcc85dac16d331505b64e9 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:12:01 -0800 Subject: [PATCH] Update text on paypal discard dialog --- _locales/en/messages.json | 6 +++++- ts/components/PreferencesDonateFlow.dom.tsx | 14 +++++++++++++- ts/services/donations.preload.ts | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 951b9d8292..16be50f89d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -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." diff --git a/ts/components/PreferencesDonateFlow.dom.tsx b/ts/components/PreferencesDonateFlow.dom.tsx index 3e9f72a658..072f702e47 100644 --- a/ts/components/PreferencesDonateFlow.dom.tsx +++ b/ts/components/PreferencesDonateFlow.dom.tsx @@ -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, }); diff --git a/ts/services/donations.preload.ts b/ts/services/donations.preload.ts index 076f257462..5c1d38e799 100644 --- a/ts/services/donations.preload.ts +++ b/ts/services/donations.preload.ts @@ -942,7 +942,7 @@ export async function _createPaypalIntent({ return { type: donationStateSchema.Enum.PAYPAL_INTENT, - id: uuid(), + id, currencyType, paymentAmount, paypalPaymentId,