Skip to content

Commit

Permalink
fix: warnings about Duplicate message id (#1061)
Browse files Browse the repository at this point in the history
Fixes warnings about "duplicate message IDs", which seem to have been made by copy-paste errors.
  • Loading branch information
pomegranited authored Jun 11, 2024
1 parent 7f5e82a commit 6760b75
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/accessibility-page/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineMessages } from '@edx/frontend-platform/i18n';

const messages = defineMessages({
pageTitle: {
id: 'course-authoring.import.page.title',
id: 'course-authoring.accessibility.page.title',
defaultMessage: 'Studio Accessibility Policy| {siteName}',
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/content-tags-drawer/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const messages = defineMessages({
defaultMessage: 'Add a tag',
},
collapsibleNoTagsAddedText: {
id: 'course-authoring.content-tags-drawer.content-tags-collapsible.custom-menu.placeholder-text',
id: 'course-authoring.content-tags-drawer.content-tags-collapsible.custom-menu.no-tags-added-text',
defaultMessage: 'No tags added yet.',
},
collapsibleAddStagedTagsButtonText: {
Expand Down
2 changes: 1 addition & 1 deletion src/course-outline/card-header/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const messages = defineMessages({
defaultMessage: 'Delete',
},
menuCopy: {
id: 'course-authoring.course-outline.card.menu.delete',
id: 'course-authoring.course-outline.card.menu.copy',
defaultMessage: 'Copy to clipboard',
},
menuProctoringLinkText: {
Expand Down
2 changes: 1 addition & 1 deletion src/course-outline/page-alerts/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const messages = defineMessages({
description: 'Learn more link in upgraded discussion notification alert',
},
discussionNotificationFeedback: {
id: 'course-authoring.course-outline.page-alerts.discussionNotificationLearnMore',
id: 'course-authoring.course-outline.page-alerts.discussionNotificationFeedback',
defaultMessage: 'Share feedback',
description: 'Share feedback link in upgraded discussion notification alert',
},
Expand Down
2 changes: 1 addition & 1 deletion src/course-outline/status-bar/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const messages = defineMessages({
defaultMessage: 'Video Sharing',
},
videoSharingLink: {
id: 'course-authoring.course-outline.status-bar.video-sharing.title',
id: 'course-authoring.course-outline.status-bar.video-sharing.link',
defaultMessage: 'Learn more',
},
videoSharingPerVideoText: {
Expand Down
2 changes: 1 addition & 1 deletion src/course-outline/subsection-card/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const messages = defineMessages({
defaultMessage: 'New unit',
},
pasteButton: {
id: 'course-authoring.course-outline.subsection.button.new-unit',
id: 'course-authoring.course-outline.subsection.button.paste-unit',
defaultMessage: 'Paste unit',
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/course-team/course-team-member/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const messages = defineMessages({
defaultMessage: 'Add admin access',
},
removeButton: {
id: 'course-authoring.course-team.member.button.remove',
id: 'course-authoring.course-team.member.button.remove-admin-access',
defaultMessage: 'Remove admin access',
},
deleteUserButton: {
Expand Down
4 changes: 2 additions & 2 deletions src/files-and-videos/files-page/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ const messages = defineMessages({
description: 'Label for lock file checkbox in info modal',
},
activeCheckboxLabel: {
id: 'course-authoring.files-and-videos.sort-and-filter.modal.filter.activeCheckbox.label',
id: 'course-authoring.files-and-videos.file-info.activeCheckbox.label',
defaultMessage: 'Active',
description: 'Label for active checkbox in filter section of sort and filter modal',
},
inactiveCheckboxLabel: {
id: 'course-authoring.files-and-videos.sort-and-filter.modal.filter.inactiveCheckbox.label',
id: 'course-authoring.files-and-videos.file-info.inactiveCheckbox.label',
defaultMessage: 'Inactive',
description: 'Label for inactive checkbox in filter section of sort and filter modal',
},
Expand Down
6 changes: 3 additions & 3 deletions src/files-and-videos/generic/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ const messages = defineMessages({
description: 'Label for delete button in card menu dropdown',
},
deleteConfirmationTitle: {
id: 'course-authoring.files-and-uploads..deleteConfirmation.title',
id: 'course-authoring.files-and-uploads.deleteConfirmation.title',
defaultMessage: 'Delete {fileNumber, plural, one {{fileName}} other {{fileNumber} {fileType}s}}',
description: 'Title for delete confirmation modal',
},
deleteConfirmationMessage: {
id: 'course-authoring.files-and-uploads..deleteConfirmation.message',
id: 'course-authoring.files-and-uploads.deleteConfirmation.message',
defaultMessage: `
Are you sure you want to delete {fileNumber, plural, one {{fileName}} other {{fileNumber} {fileType}s}}?
This action cannot be undone and may break your course if the {fileNumber, plural, one {{fileType} is} other {{fileType}s are}}
Expand All @@ -140,7 +140,7 @@ const messages = defineMessages({
description: 'Message presented to user listing the number of files they are attempting to delete in the delete confirmation modal',
},
deleteConfirmationUsageMessage: {
id: 'course-authoring.files-and-uploads..deleteConfirmation.message',
id: 'course-authoring.files-and-uploads.deleteConfirmation.usage-message',
defaultMessage: 'The following {fileNumber, plural, one {{fileType} is} other {{fileType}s are}} used in course content. Consider updating the content before deleting.',
description: 'Message listing where the files the user is attempting to delete are used in the course',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
import React from 'react';
import { PropTypes } from 'prop-types';
import { isNil } from 'lodash';
import { injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import { Icon, Spinner } from '@openedx/paragon';
import { injectIntl } from '@edx/frontend-platform/i18n';
import { Icon } from '@openedx/paragon';
import { Check } from '@openedx/paragon/icons';
import { RequestStatus } from '../../../../data/constants';
import { LoadingSpinner } from '../../../../generic/Loading';

const ActiveColumn = ({ row, pageLoadStatus }) => {
const { usageLocations } = row.original;
if (isNil(usageLocations) || pageLoadStatus !== RequestStatus.SUCCESSFUL) {
return (
<Spinner
animation="border"
role="status"
variant="primary"
size="sm"
screenReaderText={(
<FormattedMessage
id="authoring.loading"
defaultMessage="Loading..."
description="Screen-reader message for when a active column is loading."
/>
)}
/>
);
return <LoadingSpinner size="sm" />;
}
const numOfUsageLocations = usageLocations.length;
return numOfUsageLocations > 0 ? <Icon src={Check} /> : null;
Expand Down
3 changes: 1 addition & 2 deletions src/generic/ConnectionErrorAlert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import messages from '../messages';
const ConnectionErrorAlert = ({ intl }) => (
<Alert variant="danger" data-testid="connectionErrorAlert">
<FormattedMessage
id="authoring.alert.error.connection"
defaultMessage="We encountered a technical error when loading this page. This might be a temporary issue, so please try again in a few minutes. If the problem persists, please go to the {supportLink} for help."
{...messages.connectionError}
values={{
supportLink: (
<Alert.Link href={getConfig().SUPPORT_URL}>
Expand Down
6 changes: 3 additions & 3 deletions src/generic/configure-modal/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,23 @@ const messages = defineMessages({
defaultMessage: 'Proctored',
},
proctoredExamDescription: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.timed-description',
id: 'course-authoring.course-outline.configure-modal.advanced-tab.proctored-exam-description',
defaultMessage: 'Proctored exams are timed and they record video of each learner taking the exam. The videos are then reviewed to ensure that learners follow all examination rules. Please note that setting this exam as proctored will change the visibility settings to "Hide content after due date."',
},
onboardingExam: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.onboardingExam',
defaultMessage: 'Onboarding',
},
onboardingExamDescription: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.timed-description',
id: 'course-authoring.course-outline.configure-modal.advanced-tab.onboarding-exam-description',
defaultMessage: 'Use Onboarding to introduce learners to proctoring, verify their identity, and create an onboarding profile. Learners must complete the onboarding profile step prior to taking a proctored exam. Profile reviews take 2+ business days.',
},
practiceExam: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.practiceExam',
defaultMessage: 'Practice proctored',
},
practiceExamDescription: {
id: 'course-authoring.course-outline.configure-modal.advanced-tab.timed-description',
id: 'course-authoring.course-outline.configure-modal.advanced-tab.practice-exam-description',
defaultMessage: 'Use a practice proctored exam to introduce learners to the proctoring tools and processes. Results of a practice exam do not affect a learner\'s grade.',
},
advancedTabTitle: {
Expand Down
2 changes: 1 addition & 1 deletion src/import-page/import-stepper/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const messages = defineMessages({
defaultMessage: 'Error importing course',
},
stepperHeaderTitle: {
id: 'course-authoring.export.stepper.header.title',
id: 'course-authoring.import.stepper.header.title',
defaultMessage: 'Course import status',
},
});
Expand Down

0 comments on commit 6760b75

Please sign in to comment.