diff options
author | Corey Hulen <corey@hulen.com> | 2016-02-01 13:37:54 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-02-01 13:37:54 -0800 |
commit | f28486c4553f7f4bccf7bf69153c2f12699705f9 (patch) | |
tree | a75d26e483eb7feda3ee9282c09ff5dbe148f1db /web/react/components/rhs_root_post.jsx | |
parent | a772b06e87d28fd75f15c9ec58c46c2439c8e281 (diff) | |
parent | e7f409a3c7a92d50cf857b808b61f4d5aadea8c3 (diff) | |
download | chat-f28486c4553f7f4bccf7bf69153c2f12699705f9.tar.gz chat-f28486c4553f7f4bccf7bf69153c2f12699705f9.tar.bz2 chat-f28486c4553f7f4bccf7bf69153c2f12699705f9.zip |
Merge pull request #2042 from ZBoxApp/PLT-7-sidebar-right
PLT-7: Refactoring frontend (chunk 9)
Diffstat (limited to 'web/react/components/rhs_root_post.jsx')
-rw-r--r-- | web/react/components/rhs_root_post.jsx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx index cd7f6766c..f9f7f8f81 100644 --- a/web/react/components/rhs_root_post.jsx +++ b/web/react/components/rhs_root_post.jsx @@ -14,6 +14,8 @@ import * as EventHelpers from '../dispatcher/event_helpers.jsx'; import Constants from '../utils/constants.jsx'; +import {FormattedMessage, FormattedDate} from 'mm-intl'; + export default class RhsRootPost extends React.Component { constructor(props) { super(props); @@ -68,7 +70,12 @@ export default class RhsRootPost extends React.Component { var channelName; if (channel) { if (channel.type === 'D') { - channelName = 'Direct Message'; + channelName = ( + <FormattedMessage + id='rhs_root.direct' + defaultMessage='Direct Message' + /> + ); } else { channelName = channel.display_name; } @@ -93,7 +100,10 @@ export default class RhsRootPost extends React.Component { data-postid={post.id} data-channelid={post.channel_id} > - {'Edit'} + <FormattedMessage + id='rhs_root.edit' + defaultMessage='Edit' + /> </a> </li> ); @@ -110,7 +120,10 @@ export default class RhsRootPost extends React.Component { role='menuitem' onClick={() => EventHelpers.showDeletePostModal(post, this.props.commentCount)} > - {'Delete'} + <FormattedMessage + id='rhs_root.del' + defaultMessage='Delete' + /> </a> </li> ); @@ -205,7 +218,15 @@ export default class RhsRootPost extends React.Component { {botIndicator} <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'> |