diff --git a/src/messages.js b/src/messages.js
index 1620914b5b..8a5aafd036 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -10,6 +10,14 @@ const messages = defineMessages({
id: 'authoring.alert.support.text',
defaultMessage: 'Support Page',
},
+ noResultsFoundMessage: {
+ id: 'authoring.table.noResultsFound.message',
+ defaultMessage: 'No results found',
+ },
+ actionsButtonLabel: {
+ id: 'authoring.action.button.label',
+ defaultMessage: 'Actions',
+ },
});
export default messages;
diff --git a/src/taxonomy/messages.js b/src/taxonomy/messages.js
index 24f80bf6da..8b3f2a9838 100644
--- a/src/taxonomy/messages.js
+++ b/src/taxonomy/messages.js
@@ -69,6 +69,22 @@ const messages = defineMessages({
id: 'course-authoring.taxonomy-list.modal.cancel',
defaultMessage: 'Cancel',
},
+ taxonomyDetailsHeader: {
+ id: 'course-authoring.taxonomy-detail.side-card.header',
+ defaultMessage: 'Taxonomy details',
+ },
+ taxonomyDetailsName: {
+ id: 'course-authoring.taxonomy-detail.side-card.name',
+ defaultMessage: 'Title',
+ },
+ taxonomyDetailsDescription: {
+ id: 'course-authoring.taxonomy-detail.side-card.description',
+ defaultMessage: 'Description',
+ },
+ tagListColumnValueHeader: {
+ id: 'course-authoring.tag-list.column.value.header',
+ defaultMessage: 'Value',
+ },
});
export default messages;
diff --git a/src/taxonomy/taxonomy-detail/TagListTable.jsx b/src/taxonomy/taxonomy-detail/TagListTable.jsx
index 619eac8c58..43495899a0 100644
--- a/src/taxonomy/taxonomy-detail/TagListTable.jsx
+++ b/src/taxonomy/taxonomy-detail/TagListTable.jsx
@@ -1,13 +1,16 @@
-import { useState } from 'react';
+import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import {
DataTable,
} from '@edx/paragon';
-import Proptypes from 'prop-types';
import _ from 'lodash';
+import Proptypes from 'prop-types';
+import { useState } from 'react';
+import messages from '../../messages';
+import taxonomyMessages from '../messages';
import { useTagListDataResponse, useTagListDataStatus } from '../api/hooks/selectors';
-const TagListTable = ({ taxonomyId }) => {
+const TagListTable = ({ intl, taxonomyId }) => {
const [options, setOptions] = useState({
pageIndex: 0,
});
@@ -43,21 +46,22 @@ const TagListTable = ({ taxonomyId }) => {
initialState={options}
columns={[
{
- Header: 'Value',
+ Header: intl.formatMessage(taxonomyMessages.tagListColumnValueHeader),
accessor: 'value',
},
]}
>
-
+
);
};
TagListTable.propTypes = {
+ intl: intlShape.isRequired,
taxonomyId: Proptypes.string.isRequired,
};
-export default TagListTable;
+export default injectIntl(TagListTable);
diff --git a/src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx b/src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx
index def562ffbd..c91eee0969 100644
--- a/src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx
+++ b/src/taxonomy/taxonomy-detail/TaxonomyDetailMenu.jsx
@@ -5,19 +5,20 @@ import {
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
-import messages from '../messages';
+import messages from '../../messages';
+import taxonomyMessages from '../messages';
const TaxonomyDetailMenu = ({
id, name, disabled, onClickMenuItem, intl,
}) => (
onClickMenuItem('export')}>
- {intl.formatMessage(messages.taxonomyCardExportMenu)}
+ {intl.formatMessage(taxonomyMessages.taxonomyCardExportMenu)}
);
diff --git a/src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx b/src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx
index 385a3f797b..96afdebe6b 100644
--- a/src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx
+++ b/src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
+import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import {
Breadcrumb,
Container,
@@ -9,13 +10,14 @@ import { Link, useParams } from 'react-router-dom';
import ConnectionErrorAlert from '../../generic/ConnectionErrorAlert';
import Loading from '../../generic/Loading';
import SubHeader from '../../generic/sub-header/SubHeader';
+import messages from '../messages';
import TaxonomyDetailMenu from './TaxonomyDetailMenu';
import TaxonomyDetailSideCard from './TaxonomyDetailSideCard';
import TagListTable from './TagListTable';
import ExportModal from '../modals/ExportModal';
import { useTaxonomyDetailDataResponse, useTaxonomyDetailDataStatus } from '../api/hooks/selectors';
-const TaxonomyDetailPage = () => {
+const TaxonomyDetailPage = ({ intl }) => {
const { taxonomyId } = useParams();
const useTaxonomyDetailData = () => {
@@ -86,7 +88,7 @@ const TaxonomyDetailPage = () => {
{
);
};
-export default TaxonomyDetailPage;
+TaxonomyDetailPage.propTypes = {
+ intl: intlShape.isRequired,
+};
+
+export default injectIntl(TaxonomyDetailPage);
diff --git a/src/taxonomy/taxonomy-detail/TaxonomyDetailSideCard.jsx b/src/taxonomy/taxonomy-detail/TaxonomyDetailSideCard.jsx
index cae40c9b78..a07563b9d0 100644
--- a/src/taxonomy/taxonomy-detail/TaxonomyDetailSideCard.jsx
+++ b/src/taxonomy/taxonomy-detail/TaxonomyDetailSideCard.jsx
@@ -1,26 +1,30 @@
+import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import {
Card,
} from '@edx/paragon';
import Proptypes from 'prop-types';
-const TaxonomyDetailSideCard = ({ taxonomy }) => (
+import messages from '../messages';
+
+const TaxonomyDetailSideCard = ({ intl, taxonomy }) => (
-
-
+
+
{taxonomy.name}
-
+
{taxonomy.description}
);
TaxonomyDetailSideCard.propTypes = {
+ intl: intlShape.isRequired,
taxonomy: Proptypes.shape({
name: Proptypes.string.isRequired,
description: Proptypes.string.isRequired,
}).isRequired,
};
-export default TaxonomyDetailSideCard;
+export default injectIntl(TaxonomyDetailSideCard);