Merge pull request #8682 from KDSBrowne/2.2-add-upload-err-msg
add conversion error messages / remove unused message
This commit is contained in:
commit
cd62e7f64c
@ -89,10 +89,6 @@ const intlMessages = defineMessages({
|
||||
id: 'app.presentationUploder.fileToUpload',
|
||||
description: 'message used in the file selected for upload',
|
||||
},
|
||||
genericError: {
|
||||
id: 'app.presentationUploder.genericError',
|
||||
description: 'generic error while uploading/converting',
|
||||
},
|
||||
rejectedError: {
|
||||
id: 'app.presentationUploder.rejectedError',
|
||||
description: 'some files rejected, please check the file mime types',
|
||||
@ -132,10 +128,22 @@ const intlMessages = defineMessages({
|
||||
id: 'app.presentationUploder.conversion.pageCountExceeded',
|
||||
description: 'warns the user that the conversion failed because of the page count',
|
||||
},
|
||||
PAGE_COUNT_FAILED: {
|
||||
id: 'app.presentationUploder.conversion.pageCountFailed',
|
||||
description: '',
|
||||
},
|
||||
PDF_HAS_BIG_PAGE: {
|
||||
id: 'app.presentationUploder.conversion.pdfHasBigPage',
|
||||
description: 'warns the user that the conversion failed because of the pdf page siz that exceeds the allowed limit',
|
||||
},
|
||||
OFFICE_DOC_CONVERSION_INVALID: {
|
||||
id: 'app.presentationUploder.conversion.officeDocConversionInvalid',
|
||||
description: '',
|
||||
},
|
||||
OFFICE_DOC_CONVERSION_FAILED: {
|
||||
id: 'app.presentationUploder.conversion.officeDocConversionFailed',
|
||||
description: '',
|
||||
},
|
||||
isDownloadable: {
|
||||
id: 'app.presentationUploder.isDownloadableLabel',
|
||||
description: 'presentation is available for downloading by all viewers',
|
||||
@ -249,7 +257,7 @@ class PresentationUploader extends Component {
|
||||
}
|
||||
|
||||
handleConfirm() {
|
||||
const { mountModal, intl, handleSave } = this.props;
|
||||
const { mountModal, handleSave } = this.props;
|
||||
const { disableActions, presentations, oldCurrentId } = this.state;
|
||||
const presentationsToSave = presentations
|
||||
.filter(p => !p.upload.error && !p.conversion.error);
|
||||
@ -287,7 +295,6 @@ class PresentationUploader extends Component {
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
notify(intl.formatMessage(intlMessages.genericError), 'error');
|
||||
logger.error({
|
||||
logCode: 'presentationuploader_component_save_error',
|
||||
extraInfo: { error },
|
||||
@ -483,6 +490,7 @@ class PresentationUploader extends Component {
|
||||
|
||||
renderPresentationItemStatus(item) {
|
||||
const { intl } = this.props;
|
||||
|
||||
if (!item.upload.done && item.upload.progress === 0) {
|
||||
return intl.formatMessage(intlMessages.fileToUpload);
|
||||
}
|
||||
@ -494,13 +502,11 @@ class PresentationUploader extends Component {
|
||||
}
|
||||
|
||||
if (item.upload.done && item.upload.error) {
|
||||
const errorMessage = intlMessages[item.upload.status] || intlMessages.genericError;
|
||||
return intl.formatMessage(errorMessage);
|
||||
return intl.formatMessage(intlMessages[item.upload.status]);
|
||||
}
|
||||
|
||||
if (!item.conversion.done && item.conversion.error) {
|
||||
const errorMessage = intlMessages[item.conversion.status] || intlMessages.genericError;
|
||||
return intl.formatMessage(errorMessage);
|
||||
return intl.formatMessage(intlMessages[item.conversion.status]);
|
||||
}
|
||||
|
||||
if (!item.conversion.done && !item.conversion.error) {
|
||||
|
@ -168,7 +168,6 @@
|
||||
"app.presentationUploder.browseImagesLabel": "or browse/capture for images",
|
||||
"app.presentationUploder.fileToUpload": "To be uploaded ...",
|
||||
"app.presentationUploder.currentBadge": "Current",
|
||||
"app.presentationUploder.genericError": "Ops, something went wrong",
|
||||
"app.presentationUploder.rejectedError": "The selected file(s) have been rejected. Please check the file type(s).",
|
||||
"app.presentationUploder.upload.progress": "Uploading ({0}%)",
|
||||
"app.presentationUploder.upload.413": "File is too large. Please split into multiple files.",
|
||||
@ -177,9 +176,12 @@
|
||||
"app.presentationUploder.conversion.generatingThumbnail": "Generating thumbnails ...",
|
||||
"app.presentationUploder.conversion.generatedSlides": "Slides generated ...",
|
||||
"app.presentationUploder.conversion.generatingSvg": "Generating SVG images ...",
|
||||
"app.presentationUploder.conversion.pageCountExceeded": "Ops, the page count exceeded the limit of 200 pages",
|
||||
"app.presentationUploder.conversion.pageCountExceeded": "Number of pages exceeded. Please break file into multiple files.",
|
||||
"app.presentationUploder.conversion.officeDocConversionInvalid": "Failed to process office document. Please upload a PDF instead.",
|
||||
"app.presentationUploder.conversion.officeDocConversionFailed": "Failed to process office document. Please upload a PDF instead.",
|
||||
"app.presentationUploder.conversion.pdfHasBigPage": "We could not convert the PDF file, please try optimizing it",
|
||||
"app.presentationUploder.conversion.timeout": "Ops, the conversion took too long",
|
||||
"app.presentationUploder.conversion.pageCountFailed": "Failed to determine the number of pages.",
|
||||
"app.presentationUploder.isDownloadableLabel": "Do not allow presentation to be downloaded",
|
||||
"app.presentationUploder.isNotDownloadableLabel": "Allow presentation to be downloaded",
|
||||
"app.presentationUploder.removePresentationLabel": "Remove presentation",
|
||||
|
Loading…
Reference in New Issue
Block a user