From 7b9bc8bb994f09424a29f25a5ca4aa7150452a5d Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Wed, 16 Mar 2022 01:11:31 +0300 Subject: [PATCH] fix: clean up donate-saga error (#45435) * fix: clean donate-saga error Co-authored-by: Oliver Eyton-Williams --- client/i18n/locales/english/translations.json | 1 + client/src/redux/donation-saga.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index d21e950b28..84cebf0e56 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -315,6 +315,7 @@ "additional": "You can make an additional one-time donation of any amount using this link: <0>{{url}}", "help-more": "Help us do more", "error": "Something went wrong with your donation.", + "error-2": "Something is not right. Please contact donors@freecodecamp.org", "free-tech": "Your donations will support free technology education for people all over the world.", "no-halo": "If you don't see a gold halo around your profile picture, contact donors@freecodecamp.org.", "gift-frequency": "Select gift frequency:", diff --git a/client/src/redux/donation-saga.js b/client/src/redux/donation-saga.js index 4ff0539162..c32441c019 100644 --- a/client/src/redux/donation-saga.js +++ b/client/src/redux/donation-saga.js @@ -7,6 +7,7 @@ import { call, take } from 'redux-saga/effects'; +import i18next from 'i18next'; import { fireConfetti } from '../utils/fire-confetti'; import { @@ -31,7 +32,7 @@ import { isAVariantSelector } from './'; -const defaultDonationErrorMessage = `Something is not right. Please contact donors@freecodecamp.org`; +const defaultDonationErrorMessage = i18next.t('donate.error-2'); function* showDonateModalSaga() { let shouldRequestDonation = yield select(shouldRequestDonationSelector);