Skip to content

Commit

Permalink
use a proper i18n string for section title validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Jun 6, 2024
1 parent 9836fff commit c5ae963
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
const {
sectionSettings$,
sectionTitle$,
sectionTitleUniqueWarning$,
numberOfQuestionsLabel$,
optionalDescriptionLabel$,
quizResourceSelection$,
Expand Down Expand Up @@ -370,7 +371,7 @@
return section.section_title !== section_title.value;
});
if (!titleIsUnique) {
return 'Section title must be unique';
return sectionTitleUniqueWarning$();
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export const enhancedQuizManagementStrings = createTranslator('EnhancedQuizManag
sectionTitle: {
message: 'Section title',
},
sectionTitleUniqueWarning: {
message: 'Section titles must be unique within the quiz',
context: 'Informs the user that they must use a unique title for each section',
},
numberOfQuestionsLabel: {
message: 'Number of questions',
},
Expand Down

0 comments on commit c5ae963

Please sign in to comment.