Skip to content

Commit

Permalink
VKT(Frontend): Replace fixed texts with translations [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoivisto committed Dec 27, 2024
1 parent 8d0d21d commit e42e7f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion frontend/packages/vkt/public/i18n/fi-FI/examiner.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}
},
"examinerContactRequest": {
"actions": "Toiminnot",
"contactRequest": "Yhteydenottopyyntö",
"contactFields": "Yhteystiedot",
"lastName": "Sukunimi",
Expand All @@ -32,7 +33,8 @@
"deleteContactRequestSuccess": "Yhteydenotto poistettu",
"selectExamHelp": "Huom. voit valita vain tutkintotilaisuuden, jolle on määritetty tarkka osoite ja alkamisaika",
"chooseExamAndCreate": "Valitse tutkintotilaisuus ja luo ilmoittautuminen",
"chooseExam": "Valitse tutkintotilaisuus"
"chooseExam": "Valitse tutkintotilaisuus",
"viewDetails": "Katso tiedot"
},
"examinerDetails": {
"buttons": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ import { useParams } from 'react-router';
import { CustomButtonLink, CustomTable, Text } from 'shared/components';
import { Color, Variant } from 'shared/enums';

import { useExaminerTranslation } from 'configs/i18n';
import { useAppSelector } from 'configs/redux';
import { AppRoutes } from 'enums/app';
import { ContactRequest } from 'interfaces/examinerDetails';
import { examinerDetailsSelector } from 'redux/selectors/examinerDetails';

const ExaminerExamEventListingHeader = () => {
const { t } = useExaminerTranslation({
keyPrefix: 'vkt.component.examinerContactRequest',
});

return (
<TableHead className="heading-text">
<TableRow>
<TableCell>Etunimi</TableCell>
<TableCell>Sukunimi</TableCell>
<TableCell>Toiminnot</TableCell>
<TableCell>{t('firstName')}</TableCell>
<TableCell>{t('lastName')}</TableCell>
<TableCell>{t('actions')}</TableCell>
</TableRow>
</TableHead>
);
Expand All @@ -26,6 +31,9 @@ const ExaminerContactRequestListingRow = ({
}: {
contactRequest: ContactRequest;
}) => {
const { t } = useExaminerTranslation({
keyPrefix: 'vkt.component.examinerContactRequest',
});
const params = useParams();
const oid = params.oid || '';

Expand All @@ -51,7 +59,7 @@ const ExaminerContactRequestListingRow = ({
contactRequest.id.toString(),
)}
>
Katso tiedot
{t('viewDetails')}
</CustomButtonLink>
</TableCell>
</TableRow>
Expand Down

0 comments on commit e42e7f5

Please sign in to comment.