diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index 81978da9e64f..4a9663afd17e 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -72,6 +72,8 @@ class AttachmentModal extends PureComponent { this.state = { isModalOpen: false, isAttachmentInvalid: false, + attachmentInvalidReasonTitle: null, + attachmentInvalidReason: null, file: null, sourceURL: props.sourceURL, modalType: CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE, @@ -139,6 +141,8 @@ class AttachmentModal extends PureComponent { if (file.size > CONST.API_MAX_ATTACHMENT_SIZE) { this.setState({ isAttachmentInvalid: true, + attachmentInvalidReasonTitle: 'attachmentPicker.attachmentTooLarge', + attachmentInvalidReason: 'attachmentPicker.sizeExceeded', }); return false; } @@ -146,6 +150,8 @@ class AttachmentModal extends PureComponent { if (file.size < CONST.API_MIN_ATTACHMENT_SIZE) { this.setState({ isAttachmentInvalid: true, + attachmentInvalidReasonTitle: 'attachmentPicker.attachmentTooSmall', + attachmentInvalidReason: 'attachmentPicker.sizeNotMet', }); return false; } @@ -238,11 +244,11 @@ class AttachmentModal extends PureComponent { diff --git a/src/languages/en.js b/src/languages/en.js index fa86c37a450d..73068c927402 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -118,7 +118,9 @@ export default { chooseFromGallery: 'Choose from gallery', chooseDocument: 'Choose document', attachmentTooLarge: 'Attachment too large', + attachmentTooSmall: 'Attachment too small', sizeExceeded: 'Attachment size is larger than 50 MB limit.', + sizeNotMet: 'Attachment size is less than the 240 byte minimum requirement', }, composer: { noExtentionFoundForMimeType: 'No extension found for mime type', diff --git a/src/languages/es.js b/src/languages/es.js index 934df4f03e1c..80456d7348b3 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -118,7 +118,9 @@ export default { chooseFromGallery: 'Elegir de la galería', chooseDocument: 'Elegir documento', attachmentTooLarge: 'Archivo adjunto demasiado grande', + attachmentTooSmall: 'Attachment too small', sizeExceeded: 'El archivo adjunto supera el límite de 50 MB.', + sizeNotMet: 'Attachment size is less than the 240 byte minimum requirement', }, composer: { noExtentionFoundForMimeType: 'No se encontró una extension para este tipo de contenido',