Skip to content

Commit

Permalink
feat: improve the texts
Browse files Browse the repository at this point in the history
- precise in french that hints are displayed between each attempt
- use Nombre d'essais instead of Plusieurs tentatives
- translate explanations in french
- indicate that the multiple choice can have multiple good answers
  • Loading branch information
ReidyT committed Jul 12, 2024
1 parent 621c569 commit b1b3df7
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
10 changes: 4 additions & 6 deletions src/components/create/CreateView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const CreateView = () => {
title={t(QUIZ_TRANSLATIONS.MULTIPLE_ATTEMPTS_SECTION_TITLE)}
explanation={t(
QUIZ_TRANSLATIONS.MULTIPLE_ATTEMPTS_EXPLANATION,
{ count: newData.numberOfAttempts ?? 0 }
{ count: newData.numberOfAttempts ?? 1 }
)}
>
<NumberOfAttempts
Expand Down Expand Up @@ -247,15 +247,13 @@ const CreateView = () => {
</Grid>
<Grid item>
<Section
title={t('Explanation')}
explanation={t(
'Type here an explanation that will be displayed after an answer is submitted'
)}
title={t(QUIZ_TRANSLATIONS.EXPLANATIONS_TITLE)}
explanation={t(QUIZ_TRANSLATIONS.EXPLANATIONS_SUB_TITLE)}
>
<TextField
data-cy={EXPLANATION_CY}
fullWidth
label={t('Explanation')}
label={t(QUIZ_TRANSLATIONS.EXPLANATIONS_LABEL)}
value={newData.explanation}
variant="outlined"
onChange={(e) => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/create/MultipleChoices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
import AddIcon from '@mui/icons-material/Add';
import CloseIcon from '@mui/icons-material/Close';
import {
Alert,
Button,
Checkbox,
FormControl,
Expand Down Expand Up @@ -97,6 +98,9 @@ const MultipleChoices = ({
<Typography variant="h6" sx={{ pb: 2 }}>
{t('Answers')}
</Typography>
<Alert sx={{ mb: 2 }} severity="info">
{t(QUIZ_TRANSLATIONS.MULTIPLE_CORRECT_ANSWERS_AVALAIBLE_WARNING)}
</Alert>
<Stack direction="column" spacing={2}>
{choices?.map(({ value, isCorrect, explanation }, index) => {
const readableIndex = index + 1;
Expand Down
5 changes: 5 additions & 0 deletions src/langs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export const QUIZ_TRANSLATIONS = {
HINTS_SUB_TITLE: 'HINTS_SUB_TITLE',
HINTS_LABEL: 'HINTS_LABEL',
HINTS_ALERT_TITLE: 'HINTS_ALERT_TITLE',
EXPLANATIONS_TITLE: 'EXPLANATIONS_TITLE',
EXPLANATIONS_SUB_TITLE: 'EXPLANATIONS_SUB_TITLE',
EXPLANATIONS_LABEL: 'EXPLANATIONS_LABEL',
PREV_QUESTION_BTN: 'PREV_QUESTION_BTN',
NEXT_QUESTION_BTN: 'NEXT_QUESTION_BTN',
QUESTION_STEPPER_NAV_TITLE: 'QUESTION_STEPPER_NAV_TITLE',
Expand Down Expand Up @@ -47,4 +50,6 @@ export const QUIZ_TRANSLATIONS = {
'MULTIPLE_CHOICE_HINT_INPUT_DESCRIPTION',
CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING:
'CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING',
MULTIPLE_CORRECT_ANSWERS_AVALAIBLE_WARNING:
'MULTIPLE_CORRECT_ANSWERS_AVALAIBLE_WARNING',
} as const;
13 changes: 9 additions & 4 deletions src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@
"MULTIPLE_CHOICE_NOT_CORRECT": "The answer is incomplete and/or contains incorrect choices.",
"HINTS_TITLE": "Hints",
"RESPONSE_NOT_CORRECT": "The answer you provided is not correct.",
"HINTS_SUB_TITLE": "Enter here the hints to help the student. They will be displayed if the answer is incorrect.",
"HINTS_SUB_TITLE": "Enter hints here to help the user. They are displayed when an incorrect answer is given and there are still attempts to be made.",
"HINTS_LABEL": "Hints",
"HINTS_ALERT_TITLE": "Do you need some hints?",
"EXPLANATIONS_TITLE": "Explanation",
"EXPLANATIONS_SUB_TITLE": "Enter an explanation here, which will be displayed when there are no more attempts or when a correct answer is given.",
"EXPLANATIONS_LABEL": "Explanation",
"PREV_QUESTION_BTN": "Previous",
"NEXT_QUESTION_BTN": "Next",
"QUESTION_STEPPER_NAV_TITLE": "Quiz Navigation",
Expand All @@ -88,8 +91,9 @@
"QUESTION_POSITION_EXPLANATION": "You can define a new position for this question. Changes are applied directly.",
"QUESTION_POSITION_LABEL": "Position of the question in the quiz",
"BUILDER_QUIZ_NAVIGATION_TITLE": "Quiz Navigation",
"MULTIPLE_ATTEMPTS_SECTION_TITLE": "Multiple attempts",
"MULTIPLE_ATTEMPTS_EXPLANATION": "If the value is greater than 1, you allow users to retry at most {{count}} times when the given answer is incorrect.",
"MULTIPLE_ATTEMPTS_SECTION_TITLE": "Number of attempts",
"MULTIPLE_ATTEMPTS_EXPLANATION_one": "Users cannot try again after sending a response. If you wish to allow multiple attempts after giving incorrect answers, please increase this number.",
"MULTIPLE_ATTEMPTS_EXPLANATION": "You're currently allowing the users to try again at most {{count}} times when the given answer is incorrect.",
"MULTIPLE_ATTEMPTS_SHOW_CORRECTNESS_CHECKBOX": "Display response errors after each attempt",
"MULTIPLE_ATTEMPTS_SHOW_CORRECTNESS_TOOLTIP": "If the option is enabled, the user will see the corrections for each reply sent. If not, the user will only be informed that his answer is not entirely correct.",
"MULTIPLE_CHOICE_SECTION_TITLE_CORRECT": "Your correct answers",
Expand All @@ -101,5 +105,6 @@
"MULTIPLE_CHOICE_ADD_HINT_BTN": "add hint",
"MULTIPLE_CHOICE_HINT_INPUT_LABEL": "Hint",
"MULTIPLE_CHOICE_HINT_INPUT_DESCRIPTION": "Type here a hint to help the user to find the answer or to understand it",
"CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING": "Caution: Users with some informatics skills can retrieve quiz answers; consider to not use it as an exam method."
"CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING": "Caution: Users with some informatics skills can retrieve quiz answers; consider to not use it as an exam method.",
"MULTIPLE_CORRECT_ANSWERS_AVALAIBLE_WARNING": "Did you know? Our multiple choice allows you to define several correct answers. Users will have to select all the correct answers for the question to be answered correctly. Don't hesitate to try it if you haven't already."
}
13 changes: 9 additions & 4 deletions src/langs/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@
"MULTIPLE_CHOICE_NOT_CORRECT": "La réponse est incorrecte ou n'est pas entièrement correcte.",
"RESPONSE_NOT_CORRECT": "La réponse que vous avez fournie n'est pas correcte",
"HINTS_TITLE": "Indices",
"HINTS_SUB_TITLE": "Saisissez ici les indices qui s'afficheront si la réponse est incorrecte, afin d'aider l'étudiant",
"HINTS_SUB_TITLE": "Saisissez ici des indices pour aider l'utilisateur. Ils s'affichent lorsqu'une réponse incorrecte est donnée et qu'il reste encore des essais.",
"HINTS_LABEL": "Indices",
"HINTS_ALERT_TITLE": "Avez-vous besoins d'indices ?",
"EXPLANATIONS_TITLE": "Explication",
"EXPLANATIONS_SUB_TITLE": "Saisissez ici une explication qui sera affichée lorsqu'il n'y a plus d'essais ou lorsqu'une réponse correcte est donnée.",
"EXPLANATIONS_LABEL": "Explication",
"PREV_QUESTION_BTN": "Précédent",
"NEXT_QUESTION_BTN": "Suivant",
"QUESTION_STEPPER_NAV_TITLE": "Navigation du Quiz",
Expand All @@ -87,8 +90,9 @@
"QUESTION_POSITION_EXPLANATION": "Vous pouvez définir une nouvelle position pour cette question. Les changements sont appliqués directement",
"QUESTION_POSITION_LABEL": "Position de la question dans le quiz",
"BUILDER_QUIZ_NAVIGATION_TITLE": "Navigation du Quiz",
"MULTIPLE_ATTEMPTS_SECTION_TITLE": "Tentatives multiples",
"MULTIPLE_ATTEMPTS_EXPLANATION": "Si la valeur est supérieure à 1, vous autorisez les utilisateurs à réessayer au maximum {{count}} fois, lorsque la réponse donnée est incorrecte.",
"MULTIPLE_ATTEMPTS_SECTION_TITLE": "Nombre d'essais",
"MULTIPLE_ATTEMPTS_EXPLANATION_one": "Les utilisateurs ne peuvent pas réessayer après avoir envoyé une réponse. Si vous souhaitez autoriser plusieurs essais après avoir donné des réponses incorrectes, augmentez ce nombre.",
"MULTIPLE_ATTEMPTS_EXPLANATION": "Vous autorisez actuellement les utilisateurs à réessayer au maximum {{count}} fois lorsque la réponse donnée est incorrecte.",
"MULTIPLE_ATTEMPTS_SHOW_CORRECTNESS_CHECKBOX": "Afficher les erreurs dans la réponse après chaque tentative",
"MULTIPLE_ATTEMPTS_SHOW_CORRECTNESS_TOOLTIP": "Si l'option est activée, l'utilisateur verra les corrections pour chaque réponse envoyée. Dans le cas contraire, l'utilisateur sera seulement informé que sa réponse n'est pas tout à fait correcte.",
"MULTIPLE_CHOICE_SECTION_TITLE_CORRECT": "Vos réponses correctes",
Expand All @@ -100,5 +104,6 @@
"MULTIPLE_CHOICE_ADD_HINT_BTN": "ajouter un indice",
"MULTIPLE_CHOICE_HINT_INPUT_LABEL": "Indice",
"CHOIX_MULTIPLES_HINT_INPUT_DESCRIPTION": "Tapez ici un indice pour aider l'utilisateur à trouver la réponse ou à la comprendre",
"CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING": "Attention : Les utilisateurs ayant des compétences en informatique peuvent récupérer les réponses du quiz ; pensez à ne pas l'utiliser comme méthode d'examen"
"CREATE_QUIZ_NOT_EXAM_SOLUTION_WARNING": "Attention : Les utilisateurs ayant des compétences en informatique peuvent récupérer les réponses du quiz ; pensez à ne pas l'utiliser comme méthode d'examen",
"MULTIPLE_CORRECT_ANSWERS_AVALAIBLE_WARNING": "Le saviez-vous ? Notre choix multiple vous permet de définir plusieurs réponses correctes. Les utilisateurs devront sélectionner la totalité des bonnes réponses pour que la question soit considérée juste. N'hésitez pas à l'essayer si ce n'est pas déjà fait."
}

0 comments on commit b1b3df7

Please sign in to comment.