fix: various i18n issues

* fix: adding messages for i18n issues related to placeholders

* fix: adding messages for i18n issues related to import tag wizard stepper titles

* fix: changing name to duplicated id on i18n message

* fix: replacing hardcoded string with constants to solve i18n issue

* fix: typo on title prop

* fix: adding components prop name correctly

* test: adding ut for select video modal

* chore: adding description to placeholder, changing extension to constant file and adding uts for code coverage

* chore: removing outdated comment lines
This commit is contained in:
jacobo-dominguez-wgu
2025-05-12 10:49:03 -06:00
committed by GitHub
parent 26c6a71624
commit db07092880
13 changed files with 257 additions and 63 deletions

View File

@@ -5,7 +5,7 @@ import { Alert, Form, Hyperlink } from '@openedx/paragon';
import {
Warning as WarningIcon,
} from '@openedx/paragon/icons';
import { FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n';
import { FormattedMessage, injectIntl, useIntl } from '@edx/frontend-platform/i18n';
import messages from './messages';
import PrereqSettings from './PrereqSettings';
@@ -32,6 +32,8 @@ const AdvancedTab = ({
} = values;
let examTypeValue = 'none';
const intl = useIntl();
if (isTimeLimited && isProctoredExam) {
if (isOnboardingExam) {
examTypeValue = 'onboardingExam';
@@ -183,7 +185,7 @@ const AdvancedTab = ({
<Form.Control
onChange={setCurrentTimeLimit}
value={timeLimit}
placeholder="HH:MM"
placeholder={intl.formatMessage(messages.timeLimitPlaceholder)}
pattern="^[0-9][0-9]:[0-5][0-9]$"
/>
</Form.Group>

View File

@@ -239,6 +239,11 @@ const messages = defineMessages({
id: 'course-authoring.course-outline.configure-modal.advanced-tab.time-allotted',
defaultMessage: 'Time allotted (HH:MM):',
},
timeLimitPlaceholder: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.time-limit-placeholder',
defaultMessage: 'HH:MM',
description: 'The placeholder for the time limit input field, two digits for hours and two digits for minutes colons in between',
},
timeLimitDescription: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.time-limit-description',
defaultMessage: 'Select a time allotment for the exam. If it is over 24 hours, type in the amount of time. You can grant individual learners extra time to complete the exam through the Instructor Dashboard.',