do not localize registration strings which cannot be easily made

begin your session
ensuring peace of mind
and terms and conditions
are all static english code because otherwise we would need to use
dangerouslySetHtml
pull/691/head
Audric Ackermann 5 years ago
parent 291e3b48a0
commit d6913c4819

@ -2290,13 +2290,6 @@
}
}
},
"beginYourSession": {
"message": "Begin<br/>your<br/>Session."
},
"ensuringPeaceOfMind": {
"message":
"Ensuring <span class='redacted'>peace of</span> mind, one <span class='redacted'>session</span> at a time."
},
"createAccount": {
"message": "Create Account"
},
@ -2353,10 +2346,6 @@
"linkDeviceToExistingAccount": {
"message": "Link Device To Existing Account"
},
"byUsingThisService...": {
"message":
"By using this service, you agree to our <a>Terms and Conditions</a> and <a>Privacy Statement</a>"
},
"or": {
"message": "or"
}

@ -6,30 +6,29 @@ interface Props {
i18n: LocalizerType;
showSubtitle?: boolean;
}
export class AccentText extends React.PureComponent<Props> {
constructor(props: any) {
super(props);
}
public render() {
const { showSubtitle, i18n } = this.props;
const title = i18n('beginYourSession');
const subtitle = i18n('ensuringPeaceOfMind');
const { showSubtitle } = this.props;
// FIXME find a better way than dangerouslySetInnerHTML to set those two strings in a localized way
return (
<div className="session-content-accent-text">
<div
className="session-content-accent-text title"
dangerouslySetInnerHTML={{ __html: title }}
/>
<div className="session-content-accent-text title">
Begin
<br />
your
<br />
Session.
</div>
{showSubtitle ? (
<div
className="session-content-accent-text subtitle"
dangerouslySetInnerHTML={{ __html: subtitle }}
/>
<div className="session-content-accent-text subtitle">
Ensuring <span className="redacted">peace of</span> mind, one{' '}
<span className="redacted">session</span> at a time.
</div>
) : (
''
)}

@ -351,14 +351,13 @@ export class RegistrationTabs extends React.Component<Props, State> {
private renderTermsConditionAgreement() {
// FIXME link to our Terms and Conditions and privacy statement
const { i18n } = this.props;
const byUsingThisService = i18n('byUsingThisService...');
// FIXME find a better way than dangerouslySetInnerHTML to set this in a localized way
return (
<div
className="session-terms-conditions-agreement"
dangerouslySetInnerHTML={{ __html: byUsingThisService }}
/>
<div className="session-terms-conditions-agreement">
By using this service, you agree to our <a>Terms and Conditions</a> and{' '}
<a>Privacy Statement</a>
</div>
);
}
}

Loading…
Cancel
Save