diff --git a/source/js/components/newsletter-signup/data/country-options.js b/source/js/components/newsletter-signup/data/country-options.js index a7abe03c352..6d878b5d737 100644 --- a/source/js/components/newsletter-signup/data/country-options.js +++ b/source/js/components/newsletter-signup/data/country-options.js @@ -1,7 +1,6 @@ import SALESFORCE_COUNTRY_LIST from "../../petition/salesforce-country-list.js"; -import { getText } from "../../petition/locales"; -let countryDefault = { value: "", label: getText(`Your country`) }; +let countryDefault = { value: "", label: gettext("Your country") }; let countryOptions = Object.keys(SALESFORCE_COUNTRY_LIST).map((code) => { return { value: code, diff --git a/source/js/components/newsletter-signup/organisms/with-submission-logic.jsx b/source/js/components/newsletter-signup/organisms/with-submission-logic.jsx index ce3f31654cc..d74bce8b748 100644 --- a/source/js/components/newsletter-signup/organisms/with-submission-logic.jsx +++ b/source/js/components/newsletter-signup/organisms/with-submission-logic.jsx @@ -1,7 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; import { ReactGA } from "../../../common"; -import { getText } from "../../petition/locales"; /** * Higher-order component that handles form submission logic and validation @@ -27,20 +26,20 @@ function withSubmissionLogic(WrappedComponent) { this.validators = { email: (value) => { if (!value) { - return getText(`This is a required section.`); + return gettext("This is a required section."); } // Regex copied from join.jsx const emailRegex = new RegExp(/[^@]+@[^.@]+(\.[^.@]+)+$/); if (!emailRegex.test(value)) { - return getText(`Please enter a valid email address.`); + return gettext("Please enter a valid email address."); } return null; }, privacy: (value) => { if (value !== "true") { - return getText(`Please check this box if you want to proceed.`); + return gettext("Please check this box if you want to proceed."); } return null; }, @@ -191,16 +190,16 @@ function withSubmissionLogic(WrappedComponent) { if (res.status !== 201) { this.setState({ - apiError: getText( - `Something went wrong and your signup wasn't completed. Please try again later.` + apiError: gettext( + "Something went wrong and your signup wasn't completed. Please try again later." ), }); throw new Error(res.statusText); } } catch (error) { this.setState({ - apiError: getText( - `Something went wrong and your signup wasn't completed. Please try again later.` + apiError: gettext( + "Something went wrong and your signup wasn't completed. Please try again later." ), }); throw error; @@ -219,7 +218,7 @@ function withSubmissionLogic(WrappedComponent) { if ( this.state.apiSubmissionStatus === this.API_SUBMISSION_STATUS.SUCCESS ) { - message = getText(`Thanks!`); + message = gettext("Thanks!"); } return message; @@ -239,8 +238,8 @@ function withSubmissionLogic(WrappedComponent) { ) { message = ( <> -

{getText(`confirm your email opt-in`)}

-

{getText(`manage your subscriptions`)}

+

{gettext("confirm your email opt-in")}

+

{gettext("manage your subscriptions")}

); }