From 6316fa26d436c515ebad5fe31be2aa29a3c5bebf Mon Sep 17 00:00:00 2001 From: Lukeness <13112460+17luke@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:17:14 +0000 Subject: [PATCH] add translations for l2 reminder about signing in --- public/static/locales/eng/l2.json | 4 ++++ public/static/locales/isl/l2.json | 4 ++++ src/components/subpages/l2-sign-in-hello.tsx | 15 ++++++++------- 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 public/static/locales/eng/l2.json create mode 100644 public/static/locales/isl/l2.json diff --git a/public/static/locales/eng/l2.json b/public/static/locales/eng/l2.json new file mode 100644 index 0000000..da4146b --- /dev/null +++ b/public/static/locales/eng/l2.json @@ -0,0 +1,4 @@ +{ + "sign-in-hello": "You can track your recordings by signing in or creating an account.", + "sign-in-hello-link": "Click here to sign in or create an account." +} \ No newline at end of file diff --git a/public/static/locales/isl/l2.json b/public/static/locales/isl/l2.json new file mode 100644 index 0000000..b52aee6 --- /dev/null +++ b/public/static/locales/isl/l2.json @@ -0,0 +1,4 @@ +{ + "sign-in-hello": "Þú getur fylgst með framvindu þinni með því að búa til aðgang.", + "sign-in-hello-link": "Smelltu hér til að skrá þig inn eða búa til aðgang." +} \ No newline at end of file diff --git a/src/components/subpages/l2-sign-in-hello.tsx b/src/components/subpages/l2-sign-in-hello.tsx index b2d41cd..01defc2 100644 --- a/src/components/subpages/l2-sign-in-hello.tsx +++ b/src/components/subpages/l2-sign-in-hello.tsx @@ -4,7 +4,8 @@ import RootState from '../../store/root-state'; import Link from 'next/link'; import styled from 'styled-components'; import { StyledLink } from '../ui/links'; -import {isCompetition} from "../../utilities/competition-helper"; +import { isCompetition } from '../../utilities/competition-helper'; +import { useTranslation } from 'react-i18next'; const L2Container = styled.div` padding-bottom: 2rem; @@ -12,7 +13,7 @@ const L2Container = styled.div` `; const HelloContainer = styled.div` - border: none; + border: none; `; interface Props { @@ -20,6 +21,8 @@ interface Props { } export const L2SignInHello: React.FC = (props) => { + const { t } = useTranslation('l2'); + const { client: { isAuthenticated, username }, } = useSelector((state: RootState) => state.user); @@ -28,15 +31,13 @@ export const L2SignInHello: React.FC = (props) => { {!isAuthenticated && ( - Þú getur fylgst með framvindu þinni með því að búa til aðgang. + {t('sign-in-hello')}

- - Smelltu hér til að skrá þig inn eða búa til aðgang. - + {t('sign-in-hello-link')}
)}
); -}; \ No newline at end of file +};