Skip to content

Commit

Permalink
fix: adding files count in toast (openedx#960)
Browse files Browse the repository at this point in the history
* fix: adding files count in toast

* fix: toast to use plural function
  • Loading branch information
KristinAoki authored Apr 23, 2024
1 parent 907ce50 commit 3410449
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/files-and-videos/generic/FileInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useFileInput = ({
const click = () => ref.current.click();
const addFile = (e) => {
const { files } = e.target;
setSelectedRows(files);
setSelectedRows([...files]);
onAddFile(Object.values(files));
setAddOpen();
e.target.value = '';
Expand Down
2 changes: 1 addition & 1 deletion src/files-and-videos/generic/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const messages = defineMessages({
},
apiStatusToastMessage: {
id: 'course-authoring.files-and-upload.apiStatus.message',
defaultMessage: '{actionType} {selectedRowCount} {fileType}(s)',
defaultMessage: '{actionType} {selectedRowCount} {selectedRowCount, plural, one {{fileType}} other {{fileType}s}}',
description: 'This message is showed in the toast when action is applied to files',
},
apiStatusAddingAction: {
Expand Down

0 comments on commit 3410449

Please sign in to comment.