Skip to content

Commit

Permalink
umputun#10 use messages value for translate reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Mavrin committed Feb 22, 2020
1 parent d0e0e43 commit a359bc6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions frontend/app/components/comment-form/comment-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -352,10 +352,7 @@ export class CommentForm extends Component<Props, State> {
reply: <FormattedMessage id="commentForm.replay" defaultMessage="Replay" />,
};
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 (
<form
className={b('comment-form', {
Expand Down

0 comments on commit a359bc6

Please sign in to comment.