Skip to content

Commit

Permalink
refactor and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Mar 9, 2022
1 parent 301e605 commit e70019e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Composer/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Composer extends React.Component {
}
}

Composer.displayName = 'TextInputFocusable';
Composer.displayName = 'Composer';
Composer.propTypes = propTypes;
Composer.defaultProps = defaultProps;

Expand Down
6 changes: 2 additions & 4 deletions src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class Composer extends React.Component {
* Handles all types of drag-N-drop events on the composer
*
* @param {Object} e native Event
* @memberof TextInputFocusable
*/
dragNDropListener(e) {
let isOriginComposer = false;
Expand Down Expand Up @@ -238,7 +237,6 @@ class Composer extends React.Component {
* Manually place the pasted HTML into Composer
*
* @param {String} html - pasted HTML
* @memberof TextInputFocusable
*/
handlePastedHTML(html) {
const parser = new ExpensiMark();
Expand Down Expand Up @@ -286,14 +284,14 @@ class Composer extends React.Component {
.then((x) => {
const extension = IMAGE_EXTENSIONS[x.type];
if (!extension) {
throw new Error(this.props.translate('textInputFocusable.noExtentionFoundForMimeType'));
throw new Error(this.props.translate('composer.noExtentionFoundForMimeType'));
}

return new File([x], `pasted_image.${extension}`, {});
})
.then(this.props.onPasteFile)
.catch(() => {
const errorDesc = this.props.translate('textInputFocusable.problemGettingImageYouPasted');
const errorDesc = this.props.translate('composer.problemGettingImageYouPasted');
Growl.error(errorDesc);

/*
Expand Down
2 changes: 1 addition & 1 deletion src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
attachmentTooLarge: 'Attachment too large',
sizeExceeded: 'Attachment size is larger than 50 MB limit.',
},
textInputFocusable: {
composer: {
noExtentionFoundForMimeType: 'No extension found for mime type',
problemGettingImageYouPasted: 'There was a problem getting the image you pasted',
},
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
attachmentTooLarge: 'Archivo adjunto demasiado grande',
sizeExceeded: 'El archivo adjunto supera el límite de 50 MB.',
},
textInputFocusable: {
composer: {
noExtentionFoundForMimeType: 'No se encontró una extension para este tipo de contenido',
problemGettingImageYouPasted: 'Ha ocurrido un problema al obtener la imagen que has pegado',
},
Expand Down

0 comments on commit e70019e

Please sign in to comment.