summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post-listing.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/post-listing.tsx')
-rw-r--r--ui/src/components/post-listing.tsx49
1 files changed, 25 insertions, 24 deletions
diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx
index 2a2463a9..cb2e7316 100644
--- a/ui/src/components/post-listing.tsx
+++ b/ui/src/components/post-listing.tsx
@@ -247,27 +247,27 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
)}
{post.removed && (
<small className="ml-2 text-muted font-italic">
- <T i18nKey="removed">#</T>
+ { i18n.t('removed') }
</small>
)}
{post.deleted && (
<small className="ml-2 text-muted font-italic">
- <T i18nKey="deleted">#</T>
+ { i18n.t('deleted') }
</small>
)}
{post.locked && (
<small className="ml-2 text-muted font-italic">
- <T i18nKey="locked">#</T>
+ { i18n.t('locked') }
</small>
)}
{post.stickied && (
<small className="ml-2 text-muted font-italic">
- <T i18nKey="stickied">#</T>
+ { i18n.t('stickied') }
</small>
)}
{post.nsfw && (
<small className="ml-2 text-muted font-italic">
- <T i18nKey="nsfw">#</T>
+ { i18n.t('nsfw') }
</small>
)}
</div>
@@ -289,17 +289,17 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</Link>
{this.isMod && (
<span className="mx-1 badge badge-light">
- <T i18nKey="mod">#</T>
+ { i18n.t('mod') }
</span>
)}
{this.isAdmin && (
<span className="mx-1 badge badge-light">
- <T i18nKey="admin">#</T>
+ { i18n.t('admin') }
</span>
)}
{(post.banned_from_community || post.banned) && (
<span className="mx-1 badge badge-danger">
- <T i18nKey="banned">#</T>
+ { i18n.t('banned') }
</span>
)}
{this.props.showCommunity && (
@@ -406,14 +406,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
class="pointer"
onClick={linkEvent(this, this.handleModRemoveShow)}
>
- <T i18nKey="remove">#</T>
+ { i18n.t('remove') }
</span>
) : (
<span
class="pointer"
onClick={linkEvent(this, this.handleModRemoveSubmit)}
>
- <T i18nKey="restore">#</T>
+ { i18n.t('restore') }
</span>
)}
</li>
@@ -430,7 +430,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.handleModBanFromCommunityShow
)}
>
- <T i18nKey="ban">#</T>
+ { i18n.t('ban') }
</span>
) : (
<span
@@ -440,7 +440,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.handleModBanFromCommunitySubmit
)}
>
- <T i18nKey="unban">#</T>
+ { i18n.t('unban') }
</span>
)}
</li>
@@ -487,7 +487,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.handleTransferCommunity
)}
>
- <T i18nKey="yes">#</T>
+ { i18n.t('yes') }
</span>
<span
class="pointer d-inline-block"
@@ -496,7 +496,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.handleCancelShowConfirmTransferCommunity
)}
>
- <T i18nKey="no">#</T>
+ { i18n.t('no') }
</span>
</>
)}
@@ -512,14 +512,14 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
class="pointer"
onClick={linkEvent(this, this.handleModBanShow)}
>
- <T i18nKey="ban_from_site">#</T>
+ { i18n.t('ban_from_site') }
</span>
) : (
<span
class="pointer"
onClick={linkEvent(this, this.handleModBanSubmit)}
>
- <T i18nKey="unban_from_site">#</T>
+ { i18n.t('unban_from_site') }
</span>
)}
</li>
@@ -549,18 +549,18 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
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"
@@ -569,7 +569,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
this.handleCancelShowConfirmTransferSite
)}
>
- <T i18nKey="no">#</T>
+ { i18n.t('no') }
</span>
</>
)}
@@ -583,7 +583,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
className="pointer"
onClick={linkEvent(this, this.handleViewSource)}
>
- <T i18nKey="view_source">#</T>
+ { i18n.t('view_source') }
</span>
</li>
)}
@@ -601,18 +601,19 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
onInput={linkEvent(this, this.handleModRemoveReasonChange)}
/>
<button type="submit" class="btn btn-secondary">
- <T i18nKey="remove_post">#</T>
+ { i18n.t('remove_post') }
</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 class="col-form-label" for="post-listing-reason">
+ { i18n.t('reason') }
</label>
<input
type="text"
+ id="post-listing-reason"
class="form-control mr-2"
placeholder={i18n.t('reason')}
value={this.state.banReason}