From 93fee2ba01f80885fea6e000c99dae7d6726b5a1 Mon Sep 17 00:00:00 2001 From: Rob DiVincenzo Date: Tue, 23 Apr 2024 11:01:10 -0400 Subject: [PATCH] More refactoring of newsletter-signup localization --- .../organisms/default-layout-signup.jsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/js/components/newsletter-signup/organisms/default-layout-signup.jsx b/source/js/components/newsletter-signup/organisms/default-layout-signup.jsx index c879282f027..40fe630b5a6 100644 --- a/source/js/components/newsletter-signup/organisms/default-layout-signup.jsx +++ b/source/js/components/newsletter-signup/organisms/default-layout-signup.jsx @@ -12,7 +12,7 @@ import APIErrorMessage from "../atoms/api-error-message.jsx"; import withSubmissionLogic from "./with-submission-logic.jsx"; import utility from "../../../utility.js"; import { ReactGA } from "../../../common"; -import { getText, getCurrentLanguage } from "../../petition/locales"; +import { getCurrentLanguage } from "../../petition/locales"; import { COUNTRY_OPTIONS } from "../data/country-options.js"; import { LANGUAGE_OPTIONS } from "../data/language-options.js"; import { FORM_STYLE } from "./form-specific-style.js"; @@ -33,7 +33,7 @@ class DefaultSignupForm extends Component { "privacy", ]); this.style = FORM_STYLE[props.formStyle]; - this.buttonText = props.buttonText || getText("Sign up"); + this.buttonText = props.buttonText || gettext("Sign up"); } getInitialState() { @@ -169,9 +169,9 @@ class DefaultSignupForm extends Component { this.handleInputFocus()} onChange={(event) => this.handleFirstNameChange(event)} required={false} @@ -189,9 +189,9 @@ class DefaultSignupForm extends Component { this.handleInputFocus()} onChange={(event) => this.handleLastNameChange(event)} required={false} @@ -210,9 +210,9 @@ class DefaultSignupForm extends Component { id={this.ids[name]} type="email" name={name} - ariaLabel={getText(`Email address`)} + ariaLabel={gettext("Email address")} value={this.getFormFieldValue(name)} - placeholder={getText(`Please enter your email`)} + placeholder={gettext("Please enter your email")} onFocus={() => this.handleEmailFocusAndInput()} onInput={() => this.handleEmailFocusAndInput()} onChange={(event) => this.handleEmailChange(event)} @@ -265,8 +265,8 @@ class DefaultSignupForm extends Component { - {getText(`No thanks`)} + {gettext("No thanks")} );