Skip to content

Commit

Permalink
fix hardcoded strings (mozilla#2905)
Browse files Browse the repository at this point in the history
  • Loading branch information
johngruen authored and lmorchard committed Oct 5, 2017
1 parent 0d7f565 commit d84d5a0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions frontend/src/app/components/MainInstallButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export default class MainInstallButton extends React.Component {
const { isFirefox, isMinFirefox, isMobile, hasAddon } = this.props;
const isInstalling = this.state.isInstalling && !hasAddon;
const terms = <Localized id="landingLegalNoticeTermsOfUse">
<a href="/terms">Terms of Use</a>
<a href="/terms"/>
</Localized>;
const privacy = <Localized id="landingLegalNoticePrivacyNotice">
<a href="/privacy">Privacy Notice</a>
<a href="/privacy"/>
</Localized>;

return (
Expand Down
27 changes: 14 additions & 13 deletions frontend/src/app/components/NewsletterForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ export default class NewsletterForm extends React.Component {

renderEmailField() {
return (
<input
type='email'
required
placeholder='Your email here'
value={this.props.email}
onChange={this.handleEmailChange}
/>
<Localized id="newsletterFormEmailPlaceholder">
<input
type='email'
required
value={this.props.email}
onChange={this.handleEmailChange}
/>
</Localized>
);
}

Expand All @@ -72,7 +73,10 @@ export default class NewsletterForm extends React.Component {

renderPrivacyField() {
const fieldName = 'privacy';
const url = '/privacy';
const privacy = <Localized id="newsletterFormPrivacyNoticePrivacyLink">
<a target="_blank" rel="noopener noreferrer"
href="/privacy"/>
</Localized>;

return (
<label className={this.makeRevealedClassNames()} htmlFor={fieldName}>
Expand All @@ -83,12 +87,9 @@ export default class NewsletterForm extends React.Component {
Please check this box if you want to proceed.
</span>
</Localized> : null }
<LocalizedHtml id="newsletterFormPrivacyNotice">
<LocalizedHtml id="newsletterFormPrivacyNotice" $privacy={privacy}>
<span>
I&apos;m okay with Mozilla handling my info as explained in <a target="_blank" rel="noopener noreferrer"
href={url}>
this privacy notice
</a>.
I&apos;m okay with Mozilla handling my info as explained in {privacy}.
</span>
</LocalizedHtml>
</label>
Expand Down

0 comments on commit d84d5a0

Please sign in to comment.