diff options
author | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-02-01 14:44:17 -0800 |
commit | b4ec6900510077253290e361d1a706e5368a45de (patch) | |
tree | 6fc7c131fa7aa5f32e3aba8102416aa23c65963d /web/react/components/rhs_comment.jsx | |
parent | ea71731f838fc010cfc7511c09875184d1b2396b (diff) | |
parent | f28486c4553f7f4bccf7bf69153c2f12699705f9 (diff) | |
download | chat-b4ec6900510077253290e361d1a706e5368a45de.tar.gz chat-b4ec6900510077253290e361d1a706e5368a45de.tar.bz2 chat-b4ec6900510077253290e361d1a706e5368a45de.zip |
Fixing merge
Diffstat (limited to 'web/react/components/rhs_comment.jsx')
-rw-r--r-- | web/react/components/rhs_comment.jsx | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 7aae5177e..1addebbe4 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -16,7 +16,16 @@ import * as TextFormatting from '../utils/text_formatting.jsx'; import twemoji from 'twemoji'; import * as EventHelpers from '../dispatcher/event_helpers.jsx'; -export default class RhsComment extends React.Component { +import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedDate} from 'mm-intl'; + +const holders = defineMessages({ + comment: { + id: 'rhs_comment.comment', + defaultMessage: 'Comment' + } +}); + +class RhsComment extends React.Component { constructor(props) { super(props); @@ -95,12 +104,15 @@ export default class RhsComment extends React.Component { data-toggle='modal' data-target='#edit_post' data-refocusid='#reply_textbox' - data-title='Comment' + data-title={this.props.intl.formatMessage(holders.comment)} data-message={post.message} data-postid={post.id} data-channelid={post.channel_id} > - {'Edit'} + <FormattedMessage + id='rhs_comment.edit' + defaultMessage='Edit' + /> </a> </li> ); @@ -117,7 +129,10 @@ export default class RhsComment extends React.Component { role='menuitem' onClick={() => EventHelpers.showDeletePostModal(post, 0)} > - {'Delete'} + <FormattedMessage + id='rhs_comment.del' + defaultMessage='Delete' + /> </a> </li> ); @@ -165,7 +180,10 @@ export default class RhsComment extends React.Component { href='#' onClick={this.retryComment} > - {'Retry'} + <FormattedMessage + id='rhs_comment.retry' + defaultMessage='Retry' + /> </a> ); } else if (post.state === Constants.POST_LOADING) { @@ -208,7 +226,15 @@ export default class RhsComment extends React.Component { </li> <li className='col'> <time className='post__time'> - {Utils.displayCommentDateTime(post.create_at)} + <FormattedDate + value={post.create_at} + day='numeric' + month='long' + year='numeric' + hour12={true} + hour='2-digit' + minute='2-digit' + /> </time> </li> <li className='col col__reply'> @@ -237,5 +263,8 @@ RhsComment.defaultProps = { post: null }; RhsComment.propTypes = { + intl: intlShape.isRequired, post: React.PropTypes.object }; + +export default injectIntl(RhsComment);
\ No newline at end of file |