diff options
author | Chocobozzz <me@florianbigard.com> | 2022-05-24 16:29:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-08 13:40:40 +0200 |
commit | eaa529528cafcfb291009f9f99d296c81e792899 (patch) | |
tree | c8e3562f73312fb331a363e1daeaeb4949cc8448 /client/src/app/+accounts | |
parent | e435cf44c00aba359bf0f265d06bff4841b3f7fe (diff) | |
download | PeerTube-eaa529528cafcfb291009f9f99d296c81e792899.tar.gz PeerTube-eaa529528cafcfb291009f9f99d296c81e792899.tar.zst PeerTube-eaa529528cafcfb291009f9f99d296c81e792899.zip |
Support ICU in TS components
Diffstat (limited to 'client/src/app/+accounts')
3 files changed, 4 insertions, 14 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html index 379c0443e..34dc52029 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html | |||
@@ -23,10 +23,10 @@ | |||
23 | </h2> | 23 | </h2> |
24 | 24 | ||
25 | <div class="actor-counters"> | 25 | <div class="actor-counters"> |
26 | <div class="followers" i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div> | 26 | <div class="followers" i18n>{videoChannel.followersCount, plural, =0 {No subscribers} =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div> |
27 | 27 | ||
28 | <span class="videos-count" *ngIf="getTotalVideosOf(videoChannel) !== undefined" i18n> | 28 | <span class="videos-count" *ngIf="getTotalVideosOf(videoChannel) !== undefined" i18n> |
29 | {getTotalVideosOf(videoChannel), plural, =1 {1 videos} other {{{ getTotalVideosOf(videoChannel) }} videos}} | 29 | {getTotalVideosOf(videoChannel), plural, =0 {No videos} =1 {1 video} other {{{ getTotalVideosOf(videoChannel) }} videos}} |
30 | </span> | 30 | </span> |
31 | </div> | 31 | </div> |
32 | 32 | ||
diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index 8362e6b7e..e235d9689 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html | |||
@@ -33,10 +33,10 @@ | |||
33 | </div> | 33 | </div> |
34 | 34 | ||
35 | <div class="actor-counters"> | 35 | <div class="actor-counters"> |
36 | <span i18n>{naiveAggregatedSubscribers(), plural, =1 {1 subscriber} other {{{ naiveAggregatedSubscribers() }} subscribers}}</span> | 36 | <span i18n>{naiveAggregatedSubscribers(), plural, =0 {No subscribers} =1 {1 subscriber} other {{{ naiveAggregatedSubscribers() }} subscribers}}</span> |
37 | 37 | ||
38 | <span class="videos-count" *ngIf="accountVideosCount !== undefined" i18n> | 38 | <span class="videos-count" *ngIf="accountVideosCount !== undefined" i18n> |
39 | {accountVideosCount, plural, =1 {1 videos} other {{{ accountVideosCount }} videos}} | 39 | {accountVideosCount, plural, =0 {No videos} =1 {1 video} other {{{ accountVideosCount }} videos}} |
40 | </span> | 40 | </span> |
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 898325492..cf66b817a 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts | |||
@@ -30,8 +30,6 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
30 | links: ListOverflowItem[] = [] | 30 | links: ListOverflowItem[] = [] |
31 | hideMenu = false | 31 | hideMenu = false |
32 | 32 | ||
33 | accountFollowerTitle = '' | ||
34 | |||
35 | accountVideosCount: number | 33 | accountVideosCount: number |
36 | accountDescriptionHTML = '' | 34 | accountDescriptionHTML = '' |
37 | accountDescriptionExpanded = false | 35 | accountDescriptionExpanded = false |
@@ -121,12 +119,6 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
121 | this.notifier.success($localize`Username copied`) | 119 | this.notifier.success($localize`Username copied`) |
122 | } | 120 | } |
123 | 121 | ||
124 | subscribersDisplayFor (count: number) { | ||
125 | if (count === 1) return $localize`1 subscriber` | ||
126 | |||
127 | return $localize`${count} subscribers` | ||
128 | } | ||
129 | |||
130 | searchChanged (search: string) { | 122 | searchChanged (search: string) { |
131 | const queryParams = { search } | 123 | const queryParams = { search } |
132 | 124 | ||
@@ -150,8 +142,6 @@ export class AccountsComponent implements OnInit, OnDestroy { | |||
150 | } | 142 | } |
151 | 143 | ||
152 | private async onAccount (account: Account) { | 144 | private async onAccount (account: Account) { |
153 | this.accountFollowerTitle = $localize`${account.followersCount} direct account followers` | ||
154 | |||
155 | this.accountDescriptionHTML = await this.markdown.textMarkdownToHTML(account.description) | 145 | this.accountDescriptionHTML = await this.markdown.textMarkdownToHTML(account.description) |
156 | 146 | ||
157 | // After the markdown renderer to avoid layout changes | 147 | // After the markdown renderer to avoid layout changes |