Skip to content

Commit

Permalink
Merge pull request #150 from 17luke/english_translations_aug14
Browse files Browse the repository at this point in the history
English translations aug14
  • Loading branch information
thdg authored Aug 15, 2024
2 parents 0cc23a3 + 6316fa2 commit 6e042eb
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
3 changes: 3 additions & 0 deletions public/static/locales/eng/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand Down
4 changes: 4 additions & 0 deletions public/static/locales/eng/l2.json
Original file line number Diff line number Diff line change
@@ -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."
}
3 changes: 3 additions & 0 deletions public/static/locales/isl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
4 changes: 4 additions & 0 deletions public/static/locales/isl/l2.json
Original file line number Diff line number Diff line change
@@ -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."
}
4 changes: 2 additions & 2 deletions src/components/layout/header/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ export const Navigation: React.FunctionComponent<Props> = (props) => {
</Link>
<Link href="/l2" passHref>
<NavLink isActive={pathname == '/l2'}>
Íslenska sem annað mál
{t('common:icelandic-as-a-second-language')}
</NavLink>
</Link>
<Link href="/parallel" passHref>
<NavLink isActive={pathname == '/l2'}>
Samhliða safn
{t('common:parallel-collection')}
</NavLink>
</Link>
{/* <Link href="/grunnskolakeppni2022" passHref>
Expand Down
15 changes: 8 additions & 7 deletions src/components/subpages/l2-sign-in-hello.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ 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;
display: block;
`;

const HelloContainer = styled.div`
border: none;
border: none;
`;

interface Props {
switchUser: () => void;
}

export const L2SignInHello: React.FC<Props> = (props) => {
const { t } = useTranslation('l2');

const {
client: { isAuthenticated, username },
} = useSelector((state: RootState) => state.user);
Expand All @@ -28,15 +31,13 @@ export const L2SignInHello: React.FC<Props> = (props) => {
<L2Container>
{!isAuthenticated && (
<HelloContainer>
Þú getur fylgst með framvindu þinni með því að búa til aðgang.
{t('sign-in-hello')}
<br></br>
<Link href={'/innskraning'} passHref>
<StyledLink>
Smelltu hér til að skrá þig inn eða búa til aðgang.
</StyledLink>
<StyledLink>{t('sign-in-hello-link')}</StyledLink>
</Link>
</HelloContainer>
)}
</L2Container>
);
};
};
3 changes: 2 additions & 1 deletion src/pages/l2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ class L2Page extends React.Component<Props, State> {
};

render() {
const { t } = this.props;
return (
<div>
<L2Header>Íslenska sem annað mál</L2Header>
<L2Header>{t('icelandic-as-a-second-language')}</L2Header>
<ContributePage
sentencesSource="l2"
contributeType={ContributeType.SPEAK}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/parallel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ class ParallelPage extends React.Component<Props, State> {
};

render() {
const { t } = this.props;
return (
<div>
<ParallelHeader>Samhliða safn til framburðarrannsókna</ParallelHeader>
<ParallelHeader>
{t('parallel-collection-for-pronunciation-research')}
</ParallelHeader>
<ContributePage
sentencesSource="parallel"
contributeType={ContributeType.SPEAK}
Expand Down

0 comments on commit 6e042eb

Please sign in to comment.