Skip to content

Commit

Permalink
chore: update login copy
Browse files Browse the repository at this point in the history
  • Loading branch information
gweiying committed May 31, 2022
1 parent 77bc25b commit f70355d
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 28 deletions.
24 changes: 18 additions & 6 deletions public/locales/edu/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"shortUrlPrefix": "for.edu.sg/",
"appTitle": "for.edu.sg",
"officerType": "education officers",
"referralEmailDomain": "gov.sg",
"referralOfficerPhrase": "Public officers",
"referralLink": "go.gov.sg",
"appCatchphrase": {
"styled": "Trusted short links from <strong><i>education institutions</i></strong>",
"noStyle": "Trusted short links from education institutions"
Expand All @@ -18,9 +15,6 @@
"appSignInPrompt": "Are you an education officer?",
"copyright": "Open Government Products",
"copyrightTag": "Government Technology Agency of Singapore",
"placeholders": {
"email": "jane@science.edu.sg"
},
"links": {
"contribute": "https://go.gov.sg/go-opensource",
"directory": "/directory",
Expand Down Expand Up @@ -59,5 +53,23 @@
"7": "MOE",
"8": "MHA"
}
},
"login": {
"whitelistPhrase": "Only available for use by $t(general.officerType) with an email from <strong>$t(general.emailDomain)</strong>.",
"referrals": {
"1": {
"officerPhrase": "Public officers",
"emailDomain": "gov.sg",
"link": "go.gov.sg"
},
"2": {
"officerPhrase": "selected healthcare professionals",
"emailDomain": "",
"link": "for.sg"
}
},
"placeholders": {
"email": "jane@science.edu.sg"
}
}
}
24 changes: 18 additions & 6 deletions public/locales/gov/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"shortUrlPrefix": "go.gov.sg/",
"appTitle": "Go.gov.sg",
"officerType": "public officers",
"referralEmailDomain": "edu.sg",
"referralOfficerPhrase": "Staff from selected schools",
"referralLink": "for.edu.sg",
"appCatchphrase": {
"styled": "Trusted short links from <strong><i>public officers</i></strong>",
"noStyle": "Trusted short links from public officers"
Expand All @@ -18,9 +15,6 @@
"appSignInPrompt": "Are you a public officer?",
"copyright": "Open Government Products",
"copyrightTag": "Government Technology Agency of Singapore",
"placeholders": {
"email": "jane@data.gov.sg"
},
"links": {
"contribute": "https://go.gov.sg/go-opensource",
"directory": "/directory",
Expand Down Expand Up @@ -59,5 +53,23 @@
"7": "MOE",
"8": "MHA"
}
},
"login": {
"whitelistPhrase": "Only available for use by $t(general.officerType) with an email from <strong>$t(general.emailDomain)</strong>.",
"referrals": {
"1": {
"officerPhrase": "Staff from selected schools",
"emailDomain": "edu.sg",
"link": "for.edu.sg"
},
"2": {
"officerPhrase": "selected healthcare professionals",
"emailDomain": "",
"link": "for.sg"
}
},
"placeholders": {
"email": "jane@data.gov.sg"
}
}
}
24 changes: 18 additions & 6 deletions public/locales/health/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"shortUrlPrefix": "for.edu.sg/",
"appTitle": "for.edu.sg",
"officerType": "healthcare professionals",
"referralEmailDomain": "gov.sg",
"referralOfficerPhrase": "Public officers",
"referralLink": "go.gov.sg",
"appCatchphrase": {
"styled": "Trusted short links from <strong><i>education institutions</i></strong>",
"noStyle": "Trusted short links from education institutions"
Expand All @@ -18,9 +15,6 @@
"appSignInPrompt": "Are you an education officer?",
"copyright": "Open Government Products",
"copyrightTag": "Government Technology Agency of Singapore",
"placeholders": {
"email": "jane@science.edu.sg"
},
"links": {
"contribute": "https://go.gov.sg/go-opensource",
"directory": "/directory",
Expand Down Expand Up @@ -59,5 +53,23 @@
"7": "MOE",
"8": "MHA"
}
},
"login": {
"whitelistPhrase": "Only available for use by healthcare institutions listed <strong><a href='https://guide.for.sg' target='_blank' rel='noreferrer' style='color: #6D4559'>here</a></strong>.",
"referrals": {
"1": {
"officerPhrase": "Staff from selected schools",
"emailDomain": "edu.sg",
"link": "for.edu.sg"
},
"2": {
"officerPhrase": "public officers",
"emailDomain": "gov.sg",
"link": "go.gov.sg"
}
},
"placeholders": {
"email": "jane@moh.gov.sg"
}
}
}
33 changes: 23 additions & 10 deletions src/client/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const LoginPage: FunctionComponent<LoginPageProps> = ({
GAPageView('OTP LOGIN PAGE')
GAEvent('login page', 'otp', 'successful')
},
placeholder: `e.g. ${i18next.t('general.placeholders.email')}`,
placeholder: `e.g. ${i18next.t('login.placeholders.email')}`,
buttonMessage: 'Sign in',
textError: emailError,
textErrorMessage: () =>
Expand Down Expand Up @@ -235,23 +235,36 @@ const LoginPage: FunctionComponent<LoginPageProps> = ({
alt="GoGovSG logo"
/>
</Link>
<Typography className={classes.loginHeader} variant="body1">
Only available for use by{' '}
{i18next.t('general.officerType')} with an email from{' '}
<strong>{i18next.t('general.emailDomain')}</strong>.
<Typography
className={classes.loginHeader}
variant="body1"
dangerouslySetInnerHTML={{
__html: i18next.t('login.whitelistPhrase'),
}}
>
{/* <text ></text> NOTE: dangerouslySetInnerHTML is used as copy includes <a href></a> tag */}
</Typography>
<Typography
className={classes.loginReferral}
variant="body1"
>
{i18next.t('general.referralOfficerPhrase')} can use their{' '}
{i18next.t('general.referralEmailDomain')} emails at{' '}
{i18next.t('login.referrals.1.officerPhrase')} can use
their {i18next.t('login.referrals.1.emailDomain')} emails
at{' '}
<Link
href={`https://${i18next.t('login.referrals.1.link')}`}
>
{i18next.t('login.referrals.1.link')}
</Link>
, and {i18next.t('login.referrals.2.officerPhrase')} can
use their {i18next.t('login.referrals.2.emailDomain')}{' '}
emails at{' '}
<Link
href={`https://${i18next.t('general.referralLink')}`}
href={`https://${i18next.t('login.referrals.2.link')}`}
>
{i18next.t('general.referralLink')}
{i18next.t('login.referrals.2.link')}
</Link>{' '}
to shorten links instead.
to shorten links.
</Typography>
</span>
<span className={classes.textInputGroup}>
Expand Down

0 comments on commit f70355d

Please sign in to comment.