From a359bc6cb8a1fe3c270e7e698eb2a9f1c5dbeb6b Mon Sep 17 00:00:00 2001 From: konstantin krivlenia Date: Wed, 19 Feb 2020 15:50:24 +0300 Subject: [PATCH] #10 use messages value for translate reference --- frontend/app/components/comment-form/comment-form.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/app/components/comment-form/comment-form.tsx b/frontend/app/components/comment-form/comment-form.tsx index 7b3e784ff0..379406c00b 100644 --- a/frontend/app/components/comment-form/comment-form.tsx +++ b/frontend/app/components/comment-form/comment-form.tsx @@ -55,8 +55,8 @@ interface State { const ImageMimeRegex = /image\//i; -defineMessages({ - 'commentForm.input-placeholder': { +const messages = defineMessages({ + placeholder: { id: 'commentForm.input-placeholder', defaultMessage: 'Your comment here', }, @@ -352,10 +352,7 @@ export class CommentForm extends Component { reply: , }; const label = buttonText || Labels[props.mode || 'main']; - const placeholderMessage = this.props.intl.formatMessage({ - id: 'commentForm.input-placeholder', - defaultMessage: 'commentForm.input-placeholder', - }); + const placeholderMessage = this.props.intl.formatMessage(messages.placeholder); return (