From 2f9a052f89fe8d34fedcd2219e644dd51cda5505 Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 31 Jan 2020 21:52:27 +0100 Subject: usability features This are all the commits from another PR combined into a single commit. --- ui/src/components/sidebar.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'ui/src/components/sidebar.tsx') diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index 089dd558..809ec91e 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -72,7 +72,7 @@ export class Sidebar extends Component { {community.title} {community.removed && ( - # + { i18n.t('removed') } )} {community.deleted && ( @@ -92,7 +92,7 @@ export class Sidebar extends Component { class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - # + { i18n.t('edit') } {this.amCreator && ( @@ -116,14 +116,14 @@ export class Sidebar extends Component { class="pointer" onClick={linkEvent(this, this.handleModRemoveShow)} > - # + { i18n.t('remove') } ) : ( - # + { i18n.t('restore') } )} @@ -132,11 +132,12 @@ export class Sidebar extends Component { {this.state.showRemoveDialog && (
-
*/}
@@ -218,7 +219,7 @@ export class Sidebar extends Component { 'no-click'}`} to={`/create_post?community=${community.name}`} > - # + { i18n.t('create_a_post') }
{community.subscribed ? ( @@ -226,14 +227,14 @@ export class Sidebar extends Component { class="btn btn-sm btn-secondary btn-block" onClick={linkEvent(community.id, this.handleUnsubscribe)} > - # + { i18n.t('unsubscribe') } ) : ( )}
-- cgit v1.2.3 From ac943f8951fe7da86aaa9f41ee879ab670786c86 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 2 Feb 2020 13:50:44 -0500 Subject: Finishing up interpolation rework. --- ui/src/components/sidebar.tsx | 52 +++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) (limited to 'ui/src/components/sidebar.tsx') diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index 809ec91e..fe0b28ba 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -16,7 +16,6 @@ import { } from '../utils'; import { CommunityForm } from './community-form'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; interface SidebarProps { community: Community; @@ -72,12 +71,12 @@ export class Sidebar extends Component { {community.title} {community.removed && ( - { i18n.t('removed') } + {i18n.t('removed')} )} {community.deleted && ( - # + {i18n.t('deleted')} )} @@ -92,7 +91,7 @@ export class Sidebar extends Component { class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - { i18n.t('edit') } + {i18n.t('edit')} {this.amCreator && ( @@ -116,14 +115,14 @@ export class Sidebar extends Component { class="pointer" onClick={linkEvent(this, this.handleModRemoveShow)} > - { i18n.t('remove') } + {i18n.t('remove')} ) : ( - { i18n.t('restore') } + {i18n.t('restore')} )} @@ -132,8 +131,8 @@ export class Sidebar extends Component { {this.state.showRemoveDialog && (
-
*/}
@@ -163,35 +162,26 @@ export class Sidebar extends Component {
  • - - # - + {i18n.t('number_of_subscribers', { + count: community.number_of_subscribers, + })}
  • - - # - + {i18n.t('number_of_posts', { + count: community.number_of_posts, + })}
  • - - # - + {i18n.t('number_of_comments', { + count: community.number_of_comments, + })}
  • - # + {i18n.t('modlog')}
  • @@ -219,7 +209,7 @@ export class Sidebar extends Component { 'no-click'}`} to={`/create_post?community=${community.name}`} > - { i18n.t('create_a_post') } + {i18n.t('create_a_post')}
    {community.subscribed ? ( @@ -227,14 +217,14 @@ export class Sidebar extends Component { class="btn btn-sm btn-secondary btn-block" onClick={linkEvent(community.id, this.handleUnsubscribe)} > - { i18n.t('unsubscribe') } + {i18n.t('unsubscribe')} ) : ( )}
    -- cgit v1.2.3