Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(i18n): translate files and videos table view #1591

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/files-and-videos/files-page/FilesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const FilesPage = ({

const activeColumn = {
id: 'activeStatus',
Header: 'Active',
Header: intl.formatMessage(messages.fileActiveColumn),
accessor: 'activeStatus',
Cell: ({ row }) => ActiveColumn({ row, pageLoadStatus: loadingStatus }),
Filter: CheckboxFilter,
Expand All @@ -106,7 +106,7 @@ const FilesPage = ({
};
const accessColumn = {
id: 'lockStatus',
Header: 'Access',
Header: intl.formatMessage(messages.fileAccessColumn),
accessor: 'lockStatus',
Cell: ({ row }) => AccessColumn({ row }),
Filter: CheckboxFilter,
Expand All @@ -122,7 +122,7 @@ const FilesPage = ({
};
const fileSizeColumn = {
id: 'fileSize',
Header: 'File size',
Header: intl.formatMessage(messages.fileSizeColumn),
accessor: 'fileSize',
Cell: ({ row }) => {
const { fileSize } = row.original;
Expand All @@ -133,12 +133,12 @@ const FilesPage = ({
const tableColumns = [
{ ...thumbnailColumn },
{
Header: 'File name',
Header: intl.formatMessage(messages.fileNameColumn),
accessor: 'displayName',
},
{ ...fileSizeColumn },
{
Header: 'Type',
Header: intl.formatMessage(messages.fileTypeColumn),
accessor: 'wrapperType',
Filter: CheckboxFilter,
filter: 'includesValue',
Expand Down
26 changes: 26 additions & 0 deletions src/files-and-videos/files-page/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,32 @@ const messages = defineMessages({
in your course and signed in to access the file.`,
description: 'Tooltip message for the lock icon in the table view of files',
},

fileNameColumn: {
id: 'course-authoring.files-and-uploads.file-info.fileName.column',
defaultMessage: 'File name',
description: 'Column name of the file name list view',
},
fileSizeColumn: {
id: 'course-authoring.files-and-uploads.file-info.fileSize.column',
defaultMessage: 'File size',
description: 'Column name of the file size list view',
},
fileTypeColumn: {
id: 'course-authoring.files-and-uploads.file-info.fileType.column',
defaultMessage: 'Type',
description: 'Column name of the file type list view',
},
fileActiveColumn: {
id: 'course-authoring.files-and-uploads.file-info.fileActive.column',
defaultMessage: 'Active',
description: 'Column name of the file active status list view',
},
fileAccessColumn: {
id: 'course-authoring.files-and-uploads.file-info.fileAccess.column',
defaultMessage: 'Access',
description: 'Column name of the file access status list view',
},
});

export default messages;