diff options
author | Dessalines <tyhou13@gmx.com> | 2020-02-02 14:22:35 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-02-02 14:22:35 -0500 |
commit | 6124133e8517165a97aa87af5485857a000951a2 (patch) | |
tree | fe0d919f0e54235f3bb051381e7e3bd089843226 /ui/src/components/comment-node.tsx | |
parent | ccda4d8453f796d3929dbda21c0b2e19099d8b74 (diff) |
Doing comment-node, comment-form and private-message.
Diffstat (limited to 'ui/src/components/comment-node.tsx')
-rw-r--r-- | ui/src/components/comment-node.tsx | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 76a4c30e..3296a5c8 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -30,7 +30,6 @@ import { MomentTime } from './moment-time'; import { CommentForm } from './comment-form'; import { CommentNodes } from './comment-nodes'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; interface CommentNodeState { showReply: boolean; @@ -180,22 +179,22 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { </li> {this.isMod && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="mod">#</T> + {i18n.t('mod')} </li> )} {this.isAdmin && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="admin">#</T> + {i18n.t('admin')} </li> )} {this.isPostCreator && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="creator">#</T> + {i18n.t('creator')} </li> )} {(node.comment.banned_from_community || node.comment.banned) && ( <li className="list-inline-item badge badge-danger"> - <T i18nKey="banned">#</T> + {i18n.t('banned')} </li> )} <li className="list-inline-item"> @@ -258,7 +257,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleReplyClick)} > - <T i18nKey="reply">#</T> + {i18n.t('reply')} </span> </li> <li className="list-inline-item mr-2"> @@ -276,7 +275,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - <T i18nKey="edit">#</T> + {i18n.t('edit')} </span> </li> <li className="list-inline-item"> @@ -307,7 +306,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { className="pointer" onClick={linkEvent(this, this.handleViewSource)} > - <T i18nKey="view_source">#</T> + {i18n.t('view_source')} </span> </li> <li className="list-inline-item"> @@ -315,7 +314,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { className="text-muted" to={`/post/${node.comment.post_id}/comment/${node.comment.id}`} > - <T i18nKey="link">#</T> + {i18n.t('link')} </Link> </li> {/* Admins and mods can remove comments */} @@ -331,7 +330,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModRemoveShow )} > - <T i18nKey="remove">#</T> + {i18n.t('remove')} </span> ) : ( <span @@ -341,7 +340,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModRemoveSubmit )} > - <T i18nKey="restore">#</T> + {i18n.t('restore')} </span> )} </li> @@ -360,7 +359,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanFromCommunityShow )} > - <T i18nKey="ban">#</T> + {i18n.t('ban')} </span> ) : ( <span @@ -370,7 +369,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanFromCommunitySubmit )} > - <T i18nKey="unban">#</T> + {i18n.t('unban')} </span> )} </li> @@ -392,7 +391,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" @@ -401,7 +400,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleAddModToCommunity )} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -410,7 +409,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelConfirmAppointAsMod )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -429,12 +428,12 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleShowConfirmTransferCommunity )} > - <T i18nKey="transfer_community">#</T> + {i18n.t('transfer_community')} </span> ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" @@ -443,7 +442,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleTransferCommunity )} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -452,7 +451,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelShowConfirmTransferCommunity )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -468,7 +467,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleModBanShow)} > - <T i18nKey="ban_from_site">#</T> + {i18n.t('ban_from_site')} </span> ) : ( <span @@ -478,7 +477,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanSubmit )} > - <T i18nKey="unban_from_site">#</T> + {i18n.t('unban_from_site')} </span> )} </li> @@ -500,13 +499,13 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" onClick={linkEvent(this, this.handleAddAdmin)} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -515,7 +514,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelConfirmAppointAsAdmin )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -534,18 +533,18 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleShowConfirmTransferSite )} > - <T i18nKey="transfer_site">#</T> + {i18n.t('transfer_site')} </span> ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" onClick={linkEvent(this, this.handleTransferSite)} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -554,7 +553,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelShowConfirmTransferSite )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -579,16 +578,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { onInput={linkEvent(this, this.handleModRemoveReasonChange)} /> <button type="submit" class="btn btn-secondary"> - <T i18nKey="remove_comment">#</T> + {i18n.t('remove_comment')} </button> </form> )} {this.state.showBanDialog && ( <form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}> <div class="form-group row"> - <label class="col-form-label"> - <T i18nKey="reason">#</T> - </label> + <label class="col-form-label">{i18n.t('reason')}</label> <input type="text" class="form-control mr-2" |