From d6913c48191df7ecca726455f488617d8a3ddc3c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 10 Dec 2019 10:01:54 +1100 Subject: [PATCH] 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 --- _locales/en/messages.json | 11 --------- ts/components/session/AccentText.tsx | 27 +++++++++++----------- ts/components/session/RegistrationTabs.tsx | 11 ++++----- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index fb1674f0e..299b3929a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2290,13 +2290,6 @@ } } }, - "beginYourSession": { - "message": "Begin
your
Session." - }, - "ensuringPeaceOfMind": { - "message": - "Ensuring peace of mind, one session 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 Terms and Conditions and Privacy Statement" - }, "or": { "message": "or" } diff --git a/ts/components/session/AccentText.tsx b/ts/components/session/AccentText.tsx index 23e32bf94..4a0ca9b02 100644 --- a/ts/components/session/AccentText.tsx +++ b/ts/components/session/AccentText.tsx @@ -6,30 +6,29 @@ interface Props { i18n: LocalizerType; showSubtitle?: boolean; } - export class AccentText extends React.PureComponent { 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 (
-
- +
+ Begin +
+ your +
+ Session. +
{showSubtitle ? ( -
+
+ Ensuring peace of mind, one{' '} + session at a time. +
) : ( '' )} diff --git a/ts/components/session/RegistrationTabs.tsx b/ts/components/session/RegistrationTabs.tsx index f942351b7..62ee99185 100644 --- a/ts/components/session/RegistrationTabs.tsx +++ b/ts/components/session/RegistrationTabs.tsx @@ -351,14 +351,13 @@ export class RegistrationTabs extends React.Component { 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 ( -
+
+ By using this service, you agree to our Terms and Conditions and{' '} + Privacy Statement +
); } }