diff --git a/public/static/locales/eng/common.json b/public/static/locales/eng/common.json index 9550ac3..8f51f8b 100644 --- a/public/static/locales/eng/common.json +++ b/public/static/locales/eng/common.json @@ -3,6 +3,9 @@ "email": "Email", "homepage": "Front page", "take-part": "Take part", + "icelandic-as-a-second-language": "Icelandic as a Second Language", + "parallel-collection": "Parallel Collection", + "parallel-collection-for-pronunciation-research": "Parallel Collection for Pronunciation Research", "title": "Samrómur", "sign-out": "Log out", "why-demographics-title": "Hvers vegna skiptir þetta máli?", 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/common.json b/public/static/locales/isl/common.json index adf292e..d503fc0 100644 --- a/public/static/locales/isl/common.json +++ b/public/static/locales/isl/common.json @@ -4,6 +4,9 @@ "homepage": "Forsíða", "sign-out": "Útskrá", "take-part": "Taka þátt", + "icelandic-as-a-second-language": "Íslenska sem annað mál", + "parallel-collection": "Samhliða safn", + "parallel-collection-for-pronunciation-research": "Samhliða safn til framburðarannsókna", "title": "Samrómur", "why-demographics-title": "Hvers vegna skiptir þetta máli?", "why-demographics-paragraph": "Ofantaldar upplýsingar eru notaðar til að meta hversu lýðfræðilega dreift gagnasafnið Samrómur er. Því dreifðara og fjölbreyttara sem það er, því betra. Sjá skilmála og persónuverndaryfirlýsingu verkefnisins." 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/layout/header/navigation.tsx b/src/components/layout/header/navigation.tsx index e7b56d4..d61ba6a 100644 --- a/src/components/layout/header/navigation.tsx +++ b/src/components/layout/header/navigation.tsx @@ -105,12 +105,12 @@ export const Navigation: React.FunctionComponent = (props) => { - Íslenska sem annað mál + {t('common:icelandic-as-a-second-language')} - Samhliða safn + {t('common:parallel-collection')} {/* 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 +}; diff --git a/src/pages/l2.tsx b/src/pages/l2.tsx index 6ff27b3..40c8950 100644 --- a/src/pages/l2.tsx +++ b/src/pages/l2.tsx @@ -84,9 +84,10 @@ class L2Page extends React.Component { }; render() { + const { t } = this.props; return (
- Íslenska sem annað mál + {t('icelandic-as-a-second-language')} { }; render() { + const { t } = this.props; return (
- Samhliða safn til framburðarrannsókna + + {t('parallel-collection-for-pronunciation-research')} +