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": { "createAccount": {
"message": "Create Account" "message": "Create Account"
}, },
@ -2353,10 +2346,6 @@
"linkDeviceToExistingAccount": { "linkDeviceToExistingAccount": {
"message": "Link Device To Existing Account" "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": { "or": {
"message": "or" "message": "or"
} }

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

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

Loading…
Cancel
Save