Skip to content

Commit

Permalink
More refactoring of newsletter-signup localization
Browse files Browse the repository at this point in the history
  • Loading branch information
robdivincenzo committed Apr 23, 2024
1 parent 69d252c commit 93fee2b
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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() {
Expand Down Expand Up @@ -169,9 +169,9 @@ class DefaultSignupForm extends Component {
<InputText
id={this.ids[name]}
name={name}
ariaLabel={getText(`First name`)}
ariaLabel={gettext("First name")}
value={this.getFormFieldValue(name)}
placeholder={getText(`First name`)}
placeholder={gettext("First name")}
onFocus={() => this.handleInputFocus()}
onChange={(event) => this.handleFirstNameChange(event)}
required={false}
Expand All @@ -189,9 +189,9 @@ class DefaultSignupForm extends Component {
<InputText
id={this.ids[name]}
name={name}
ariaLabel={getText(`Last name`)}
ariaLabel={gettext("Last name")}
value={this.getFormFieldValue(name)}
placeholder={getText(`Last name`)}
placeholder={gettext("Last name")}
onFocus={() => this.handleInputFocus()}
onChange={(event) => this.handleLastNameChange(event)}
required={false}
Expand All @@ -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)}
Expand Down Expand Up @@ -265,8 +265,8 @@ class DefaultSignupForm extends Component {
<InputCheckboxWithLabel
id={this.ids[name]}
name={name}
label={getText(
`I'm okay with Mozilla handling my info as explained in this Privacy Notice`
label={gettext(
"I'm okay with Mozilla handling my info as explained in this Privacy Notice"
)}
value={this.getFormFieldValue(name)}
checked={this.getFormFieldValue(name) === "true"}
Expand Down Expand Up @@ -305,7 +305,7 @@ class DefaultSignupForm extends Component {
widthClasses={this.style.buttonWidthClasses}
handleQuitButtonClick={this.props.handleQuitButtonClick}
>
{getText(`No thanks`)}
{gettext("No thanks")}
</ButtonQuit>
</div>
);
Expand Down

0 comments on commit 93fee2b

Please sign in to comment.