1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

optimized error copyright (#4374)

This commit is contained in:
杨顺强
2019-12-23 15:47:11 +08:00
committed by Daniel Pan
parent c5950058bb
commit 0cd689b971

View File

@@ -388,7 +388,16 @@ class FileUploader extends React.Component {
if (!message) {
error = gettext('Network error');
} else {
error = message;
// eg: '{"error": "Internal error" \n }'
let errorMessage = message.replace(/\n/g, '');
errorMessage = JSON.parse(errorMessage);
error = errorMessage.error;
if (error === 'File locked by others.') {
error = gettext('File Locked by others.');
}
if (error === 'Internal error.') {
error = gettext('Internal error.');
}
}
let uploadFileList = this.state.uploadFileList.map(item => {