From bd5d94a4bac29c63f0f8f407df569cebe1a78141 Mon Sep 17 00:00:00 2001 From: Anirban Singha <143536290+SinghaAnirban005@users.noreply.github.com> Date: Tue, 17 Feb 2026 23:06:45 +0530 Subject: [PATCH] fix: localize remaining hardcoded strings in PayPal setup (#27908) * chore: add en locale key-value for paypal setup * fix: add translation function for paypal setup * chore: avoid merge conflicts --- apps/web/components/apps/paypal/Setup.tsx | 86 ++++++++++--------- apps/web/public/static/locales/en/common.json | 21 +++++ 2 files changed, 65 insertions(+), 42 deletions(-) diff --git a/apps/web/components/apps/paypal/Setup.tsx b/apps/web/components/apps/paypal/Setup.tsx index 4feb59bc10..5163464c63 100644 --- a/apps/web/components/apps/paypal/Setup.tsx +++ b/apps/web/components/apps/paypal/Setup.tsx @@ -15,10 +15,17 @@ export default function PayPalSetup() { const [newSecretKey, setNewSecretKey] = useState(""); const router = useRouter(); const { t } = useLocale(); - const integrations = trpc.viewer.apps.integrations.useQuery({ variant: "payment", appId: "paypal" }); + + const integrations = trpc.viewer.apps.integrations.useQuery({ + variant: "payment", + appId: "paypal", + }); + const [paypalPaymentAppCredentials] = integrations.data?.items || []; const [credentialId] = paypalPaymentAppCredentials?.userCredentialIds || [-1]; + const showContent = !!integrations.data && integrations.isSuccess && !!credentialId; + const saveKeysMutation = trpc.viewer.apps.updateAppCredentials.useMutation({ onSuccess: () => { showToast(t("keys_have_been_saved"), "success"); @@ -39,12 +46,13 @@ export default function PayPalSetup() {
- Paypal Payment Logo -

Paypal

+ {t("paypal_payment_logo")} +

{t("paypal")}

+
setNewSecretKey(e.target.value)} /> - {/* Button to submit */}
+
-

Getting started with Paypal APP

-

- Here in Cal.com we offer Paypal as one of our payment gateway. You can use your own Paypal - Business account to receive payments from your customers enabling and setting up price and - currency for each of your event types. -

+

{t("paypal_getting_started")}

+ +

{t("paypal_description")}

- Important requirements: + + {t("important_requirements")}

+
    -
  • Paypal Business account
  • -
  • Paypal Developer account
  • +
  • {t("paypal_business_account")}
  • +
  • {t("paypal_developer_account")}
-

Resources:

+

{t("resources")}

+ - Link to Paypal developer API REST Setup Guide: - https://developer.paypal.com/api/rest/#link-getclientidandclientsecret + {t("paypal_rest_setup_guide")} -

Setup instructions

-

- Remember to only proceed with the following steps if your account has already been upgraded to - a business account. Also keep in mind that some of the following steps might be different - since Paypal offers different experiences based on your country. -

+

{t("paypal_setup_instructions")}

+ +

{t("paypal_setup_note")}

    - {/* @TODO: translate */}
  1. - Log into your Paypal Developer account and create a new app{" "} + {t("paypal_step_1")}{" "} .
  2. -
  3. Choose a name for your application.
  4. -
  5. Click on the Create App button
  6. + +
  7. {t("paypal_step_2")}
  8. +
  9. {t("paypal_step_3")}
  10. - Go back to{" "} + {t("paypal_step_4_part_1")}{" "} - dashboard + {t("dashboard")} - , click on new app created. + , {t("paypal_step_4_part_2")}
  11. -
  12. Copy the Client ID and Secret Key using copy buttons one by one.
  13. -
  14. Paste them on the required field and save them.
  15. -
  16. You should be all setup after this.
  17. + +
  18. {t("paypal_step_5")}
  19. +
  20. {t("paypal_step_6")}
  21. +
  22. {t("paypal_step_7")}
+

- Reminder: -

-

- Our integration creates a specific webhook on your Paypal account that we use to report back - transactions to our system. If you delete this webhook, we will not be able to report back and - you should Uninstall and Install the app again for this to work again. Uninstalling the app - won't delete your current event type price/currency configuration but you would not be - able to receive bookings. + {t("reminder")}:

+ +

{t("paypal_webhook_reminder")}

) : ( )} + ); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index dda7996d16..5d96943608 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -4632,5 +4632,26 @@ "last_6_months": "Last 6 months", "last_12_months": "Last 12 months", "calendar_events_disabled_video_limitation": "When calendar events are disabled, meeting links cannot be generated for apps whose link generation is tied to calendar event creation, for example, Google Meet and Microsoft Teams. Other video apps like Cal Video will continue to work.", + "paypal": "PayPal", + "paypal_getting_started": "Getting started with Paypal APP", + "important_requirements": "Important requirements:", + "paypal_description": "Here in Cal.com we offer Paypal as one of our payment gateway. You can use your own Paypal Business account to receive payments from your customers enabling and setting up price and currency for each of your event types.", + "paypal_payment_logo": "PayPal payment logo", + "secret_key": "Secret key", + "paypal_business_account": "PayPal Business account", + "paypal_developer_account": "PayPal Developer account", + "paypal_rest_setup_guide": "Link to PayPal Developer REST API setup guide", + "paypal_setup_instructions": "Setup instructions", + "paypal_setup_note": "Remember to only proceed with the following steps if your account has already been upgraded to a business account. Also keep in mind that some of the following steps might be different since PayPal offers different experiences based on your country.", + "paypal_step_1": "Log into your PayPal Developer account and create a new app", + "paypal_step_2": "Choose a name for your application.", + "paypal_step_3": "Click on the Create App button.", + "paypal_step_4_part_1": "Go back to the", + "paypal_step_4_part_2": "and click on the newly created app.", + "paypal_step_5": "Copy the Client ID and Secret key using the copy buttons one by one.", + "paypal_step_6": "Paste them in the required fields and save them.", + "paypal_step_7": "You should be all set up after this.", + "dashboard": "dashboard", + "paypal_webhook_reminder": "Our integration creates a specific webhook on your PayPal account that we use to report back transactions to our system. If you delete this webhook, we will not be able to report back and you should uninstall and install the app again for this to work properly. Uninstalling the app won't delete your current event type price/currency configuration but you will not be able to receive bookings.", "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" }