Skip to content

Commit

Permalink
Merge pull request #153 from 17luke/lendingarsidur_texts
Browse files Browse the repository at this point in the history
Lendingarsidur texts
  • Loading branch information
thdg authored Sep 13, 2024
2 parents ac88a40 + 9b6d763 commit 164c19c
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 9 deletions.
6 changes: 5 additions & 1 deletion public/static/locales/eng/l2.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"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."
"sign-in-hello-link": "Click here to sign in or create an account.",
"l2-explanation-long": "Calling people who speak Icelandic as a second language! This collection aims to increase diversity in Icelandic language technology data. While language technology for Icelandic has made great strides in recent years, many speech recognition systems still struggle with Icelandic spoken by those who learned it as a second language. Everyone is encouraged to take part! Whether your Icelandic is excellent or you've recently started learning, the goal of this collection is to cover all kinds of Icelandic.",
"l2-september-prize-intro": "September gifts for volunteers:",
"l2-september-prize-300": "Those who record over 300 sentences in September will receive 1 month free subscription to Storytel and 1 Smárabíó movie voucher.",
"l2-september-prize-700": "Those who record over 300 sentences in September will receive 1 month free subscription to Storytel and a 5.000 ISK Dineout voucher."
}
7 changes: 7 additions & 0 deletions public/static/locales/eng/parallel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"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.",
"google-form-link": "Click here to fill out the Google Form.",
"to-take-part": "To take part:",
"parallel-explanation-long": "The project Samhliða safn til framburðarannsókna (e. Parallel Collection for Pronunciation Research) is a language technology project where we are collecting audio recordings from people who speak Icelandic as a second language and also from people whose native language is Icelandic. These audio recordings will be used to create a dataset for research and for the development of language technology tools. Participants read sentences under the section Samhliða safn til framburðarannsókna on Samrómur and answer a few questions about their age, gender and language knowledge in a Google Forms document. "
}
6 changes: 5 additions & 1 deletion public/static/locales/isl/l2.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"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."
"sign-in-hello-link": "Smelltu hér til að skrá þig inn eða búa til aðgang.",
"l2-explanation-long": "Þessi söfnun hefur sem markmið að auka fjölbreytni í íslenskum máltæknigögnum. Máltækni hefur náð langt á undanförnum árum en mörg talgreiningarkerfi eiga enn erfitt með að skilja íslensku innflytjenda. Við hvetjum alla sem hafa íslensku sem annað tungumál að taka þátt, jafnt byrjendur sem og þeir sem tala reiprennandi íslensku. Þetta safn ætti að ná yfir alls kyns íslensku.",
"l2-september-prize-intro": "Gjafir fyrir sjálfboðaliða í september:",
"l2-september-prize-300": "Fólk sem tekur upp meira en 300 setningar í september fær eins mánaðar ókeypis áskrift hjá Storytel og eitt almennt gjafabréf í Smárabíó.",
"l2-september-prize-700": "Fólk sem tekur upp meira en 700 setningar í september fær eins mánaðar ókeypis áskrift hjá Storytel og 5.000 kr. Dineout gjafakort."
}
7 changes: 7 additions & 0 deletions public/static/locales/isl/parallel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"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.",
"google-form-link": "Smelltu hér til að fylla út Google Forms-skjalið.",
"to-take-part": "Til að taka þátt:",
"parallel-explanation-long": "Samhliða safn til framburðarannsókna er máltækniverkefni sem snýst um að safna hljóðupptökum frá fólki sem talar íslensku sem annað mál og einnig frá fólki sem hefur íslensku sem móðurmál. Þessar hljóðupptökur verða notaðar til að búa til gagnasafn fyrir rannsóknir og þróun á máltækniforritum. Þátttakendur lesa setningar undir Samhliða safn til framburðarannsókna á Samrómi og svara nokkrum spurningum um aldur, kyn og tungumálakunnáttu í Google Forms-skjali."
}
8 changes: 8 additions & 0 deletions src/components/subpages/l2-sign-in-hello.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ export const L2SignInHello: React.FC<Props> = (props) => {
<L2Container>
{!isAuthenticated && (
<HelloContainer>
{t('l2-explanation-long')}
<br></br>
<br></br>
{t('l2-september-prize-intro')}
<ul>
<li>{t('l2-september-prize-300')}</li>
<li>{t('l2-september-prize-700')}</li>
</ul>
{t('sign-in-hello')}
<br></br>
<Link href={'/innskraning'} passHref>
Expand Down
41 changes: 34 additions & 7 deletions src/components/subpages/parallel-sign-in-hello.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import RootState from '../../store/root-state';
import Link from 'next/link';
import styled from 'styled-components';
import { StyledLink } from '../ui/links';
import { useTranslation } from 'react-i18next';

const ParallelContainer = styled.div`
padding-bottom: 2rem;
Expand All @@ -19,21 +20,47 @@ interface Props {
}

export const ParallelSignInHello: React.FC<Props> = (props) => {
const { t } = useTranslation('parallel');
const {
client: { isAuthenticated, username },
} = useSelector((state: RootState) => state.user);

// State to handle dynamic rendering
const [clientRendered, setClientRendered] = React.useState(false);

React.useEffect(() => {
// Set client-rendered state after component mounts
setClientRendered(true);
}, []);

if (!clientRendered) {
return null;
}

return (
<ParallelContainer>
<SignInContainer>
Vinsamlegast skráðu þig inn til að taka þátt.
{t('parallel-explanation-long')}
<br></br>
<br></br>
{t('to-take-part')}
<br></br>
<Link href={'/innskraning'} passHref>
<StyledLink>
Smelltu hér til að skrá þig inn eða búa til aðgang.
</StyledLink>
</Link>
<ol>
<li>
<Link href={'/innskraning'} passHref>
<StyledLink>{t('sign-in-hello-link')}</StyledLink>
</Link>
</li>
<li>
<Link
href={'https://forms.gle/bwHyc332vbmJa1VT7'}
passHref
>
<StyledLink>{t('google-form-link')}</StyledLink>
</Link>
</li>
</ol>
</SignInContainer>
</ParallelContainer>
);
};
};

0 comments on commit 164c19c

Please sign in to comment.