Skip to content

Commit

Permalink
NP-48135 Change NVI apprive/reject text in action panel (#6866)
Browse files Browse the repository at this point in the history
* NP-48135 Change NVI apprive/reject text in action panel

* Reorder import, remove i18n keys, fix typo

---------

Co-authored-by: Joachim Jørgensen <joachim.jorgensen@Joachims-MacBook-Pro.local>
  • Loading branch information
joachimjorgensen and Joachim Jørgensen authored Jan 13, 2025
1 parent 9c46c19 commit 0e7c445
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions src/pages/messages/components/NviCandidateActions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import CheckIcon from '@mui/icons-material/Check';
import ClearIcon from '@mui/icons-material/Clear';
import LaunchIcon from '@mui/icons-material/Launch';
import { LoadingButton } from '@mui/lab';
import { Box, Button, Divider, Typography } from '@mui/material';
import { Box, Button, Divider, Link as MuiLink, Typography } from '@mui/material';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { ReactNode, useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -161,7 +162,18 @@ export const NviCandidateActions = ({ nviCandidate, nviCandidateQueryKey }: NviC
<>
<Trans
i18nKey="tasks.nvi.approve_nvi_candidate_description"
components={[<Typography sx={{ mb: '1rem' }} key="1" />]}
components={{
p: <Typography sx={{ mb: '1rem' }} />,
hyperlink: (
<MuiLink
href={'https://sikt.no/tjenester/nasjonalt-vitenarkiv-nva/hjelpeside-nva/NVI-rapporteringsinstruks'}
sx={{ fontStyle: 'italic' }}
target="_blank"
rel="noopener noreferrer"
/>
),
launchIcon: <LaunchIcon fontSize="small" sx={{ ml: '0.2rem', verticalAlign: 'bottom' }} />,
}}
values={{ buttonText: t('tasks.nvi.approve_nvi_candidate') }}
/>
<LoadingButton
Expand Down
4 changes: 2 additions & 2 deletions src/translations/nbTranslations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@
"new_tasks": "Innmeldte oppgaver: {{count}}",
"nvi": {
"approve_nvi_candidate": "Godkjenn resultat",
"approve_nvi_candidate_description": "<0>Kontroll av forskningsresultat for NVI-rapportering.</0><0>Klikkknappen \"{{buttonText}}\" for å rapportere forskningsresultatet.</0>",
"approve_nvi_candidate_description": "<p>Kontroll av forskningsresultat for NVI-rapportering.</p><p>Trykk\"{{buttonText}}\" om publikasjonen kan rapporteres. Se <hyperlink>Rapporteringsinstruksen<launchIcon/></hyperlink> for mer informasjon.</p>",
"completed_count": "Ferdig kontrollert ({{completed}} av {{total}})",
"correction_list_type": {
"anthology_with_applicable_chapter": "Antologier med tellende kapittel",
Expand All @@ -2101,7 +2101,7 @@
"previous_candidate": "Gå til forrige kandidat",
"publication_points": "Publiseringspoeng",
"reject_nvi_candidate": "Avvis resultat",
"reject_nvi_candidate_description": "Klikkknappen \"{{buttonText}}\" dersom forskningsresultatet ikke skal rapporteres. Du må oppgi en grunn for avvisningen.",
"reject_nvi_candidate_description": "Trykk\"{{buttonText}}\" om publikasjonen ikke kan rapporteres. Du må begrunne avvisningen.",
"reject_nvi_candidate_form_label": "Begrunnelse for avvisning",
"reject_nvi_candidate_modal_text": "Vennligst oppgi en detaljert begrunnelse på hvorfor du avviser. Begrunnelsen må inneholde minst 10 tegn.",
"reporting_period_closed": "Rapporteringsperioden for dette resultatet er lukket.",
Expand Down

0 comments on commit 0e7c445

Please sign in to comment.