diff --git a/src/i18n/common.json b/src/i18n/common.json index 2a14dc2d24..2f57652220 100644 --- a/src/i18n/common.json +++ b/src/i18n/common.json @@ -20,7 +20,7 @@ "display_images": "Display images", "annotations": "Annotations", "last_annotations": "Last annotations", - "remaining_annotations": "Remaining:", + "remaining_annotations": "Remaining questions", "annotated_annotations": "Annotated", "filters": { "short_label": { diff --git a/src/pages/questions/UserData.jsx b/src/pages/questions/UserData.jsx index f32b22b3e6..dbfb4a43e1 100644 --- a/src/pages/questions/UserData.jsx +++ b/src/pages/questions/UserData.jsx @@ -4,15 +4,16 @@ import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; import Stack from "@mui/material/Stack"; import Link from "@mui/material/Link"; - import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline"; import CancelOutlinedIcon from "@mui/icons-material/CancelOutlined"; +import { useTranslation } from "react-i18next"; + import offService from "../../off"; const NB_DISPLAYED_QUESTIONS = 30; -const UserData = (props) => { - const { remainingQuestionNb = 0, answers = [] } = props; +const UserData = ({ remainingQuestionNb = 0, answers = [] }) => { + const { t } = useTranslation(); let displayedAnswers = answers.filter( (question) => question.validationValue !== -1 @@ -26,7 +27,7 @@ const UserData = (props) => { return ( - Remaining: {remainingQuestionNb} + {t("questions.remaining_annotations")}: {remainingQuestionNb} {displayedAnswers.map( ({ insight_id, barcode, value, insight_type, validationValue }) => (