diff --git a/frontend/src/components/dialog/move-dirent-dialog.js b/frontend/src/components/dialog/move-dirent-dialog.js index a22e590a98..d5545c83a4 100644 --- a/frontend/src/components/dialog/move-dirent-dialog.js +++ b/frontend/src/components/dialog/move-dirent-dialog.js @@ -95,7 +95,7 @@ class MoveDirent extends React.Component { moveItems = () => { let { repoID } = this.props; let { selectedRepo, selectedPath } = this.state; - let message = 'Invalid destination path'; + let message = gettext('Invalid destination path'); if (!selectedRepo || selectedPath === '') { this.setErrMessage(message); @@ -132,7 +132,7 @@ class MoveDirent extends React.Component { }); if (isChildPath) { - message = 'Can not move folder %(src)s to its subfolder %(des)s'; + message = gettext('Can not move folder %(src)s to its subfolder %(des)s'); message = message.replace('%(src)s', moveDirentPath); message = message.replace('%(des)s', selectedPath); this.setErrMessage(message); @@ -147,7 +147,7 @@ class MoveDirent extends React.Component { let { repoID } = this.props; let { selectedRepo, selectedPath } = this.state; let direntPath = Utils.joinPath(this.props.path, this.props.dirent.name); - let message = 'Invalid destination path'; + let message = gettext('Invalid destination path'); if (!selectedRepo || (selectedRepo.repo_id === repoID && selectedPath === '')) { this.setErrMessage(message); @@ -196,7 +196,7 @@ class MoveDirent extends React.Component { }; setErrMessage = (message) => { - this.setState({ errMessage: gettext(message) }); + this.setState({ errMessage: message }); }; clearErrMessage = () => { diff --git a/frontend/src/components/dialog/select-dirent-body.js b/frontend/src/components/dialog/select-dirent-body.js index 5bbabce3f9..5991560ecb 100644 --- a/frontend/src/components/dialog/select-dirent-body.js +++ b/frontend/src/components/dialog/select-dirent-body.js @@ -71,7 +71,7 @@ class SelectDirentBody extends React.Component { createFolder = (fullPath) => { if (!this.props.selectedRepo) { - this.props.setErrMessage('Please select a library or folder first.'); + this.props.setErrMessage(gettext('Please select a library or folder first.')); return; } this.newFolderName = fullPath.split('/').pop();