adding translations to the sidebar
This commit is contained in:
parent
59d1cde10c
commit
f6cf8f0a38
1 changed files with 11 additions and 10 deletions
21
ui/src/components/sidebar.tsx
vendored
21
ui/src/components/sidebar.tsx
vendored
|
@ -72,7 +72,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
<span>{community.title}</span>
|
<span>{community.title}</span>
|
||||||
{community.removed && (
|
{community.removed && (
|
||||||
<small className="ml-2 text-muted font-italic">
|
<small className="ml-2 text-muted font-italic">
|
||||||
<T i18nKey="removed">#</T>
|
{ i18n.t('removed') }
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
{community.deleted && (
|
{community.deleted && (
|
||||||
|
@ -92,7 +92,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleEditClick)}
|
onClick={linkEvent(this, this.handleEditClick)}
|
||||||
>
|
>
|
||||||
<T i18nKey="edit">#</T>
|
{ i18n.t('edit') }
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{this.amCreator && (
|
{this.amCreator && (
|
||||||
|
@ -116,14 +116,14 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveShow)}
|
onClick={linkEvent(this, this.handleModRemoveShow)}
|
||||||
>
|
>
|
||||||
<T i18nKey="remove">#</T>
|
{ i18n.t('remove') }
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
class="pointer"
|
class="pointer"
|
||||||
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
onClick={linkEvent(this, this.handleModRemoveSubmit)}
|
||||||
>
|
>
|
||||||
<T i18nKey="restore">#</T>
|
{ i18n.t('restore') }
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
|
@ -132,11 +132,12 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
{this.state.showRemoveDialog && (
|
{this.state.showRemoveDialog && (
|
||||||
<form onSubmit={linkEvent(this, this.handleModRemoveSubmit)}>
|
<form onSubmit={linkEvent(this, this.handleModRemoveSubmit)}>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-form-label">
|
<label class="col-form-label" for="remove-reason">
|
||||||
<T i18nKey="reason">#</T>
|
{ i18n.t('reason') }
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
id="remove-reason"
|
||||||
class="form-control mr-2"
|
class="form-control mr-2"
|
||||||
placeholder={i18n.t('optional')}
|
placeholder={i18n.t('optional')}
|
||||||
value={this.state.removeReason}
|
value={this.state.removeReason}
|
||||||
|
@ -150,7 +151,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
{/* </div> */}
|
{/* </div> */}
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<button type="submit" class="btn btn-secondary">
|
<button type="submit" class="btn btn-secondary">
|
||||||
<T i18nKey="remove_community">#</T>
|
{ i18n.t('remove_community') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -218,7 +219,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
'no-click'}`}
|
'no-click'}`}
|
||||||
to={`/create_post?community=${community.name}`}
|
to={`/create_post?community=${community.name}`}
|
||||||
>
|
>
|
||||||
<T i18nKey="create_a_post">#</T>
|
{ i18n.t('create_a_post') }
|
||||||
</Link>
|
</Link>
|
||||||
<div>
|
<div>
|
||||||
{community.subscribed ? (
|
{community.subscribed ? (
|
||||||
|
@ -226,14 +227,14 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
|
||||||
class="btn btn-sm btn-secondary btn-block"
|
class="btn btn-sm btn-secondary btn-block"
|
||||||
onClick={linkEvent(community.id, this.handleUnsubscribe)}
|
onClick={linkEvent(community.id, this.handleUnsubscribe)}
|
||||||
>
|
>
|
||||||
<T i18nKey="unsubscribe">#</T>
|
{ i18n.t('unsubscribe') }
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-secondary btn-block"
|
class="btn btn-sm btn-secondary btn-block"
|
||||||
onClick={linkEvent(community.id, this.handleSubscribe)}
|
onClick={linkEvent(community.id, this.handleSubscribe)}
|
||||||
>
|
>
|
||||||
<T i18nKey="subscribe">#</T>
|
{ i18n.t('subscribe') }
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue