diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-06 14:32:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 09:49:06 +0200 |
commit | 866c5f667da9fc09f3b093ff0a6f89d4af0ce5af (patch) | |
tree | 7a42f7974cec400f9cf09e86de00e69e36b2136d /client/src/app/+admin/overview/users | |
parent | 40346ead2b0b7afa475aef057d3673b6c7574b7a (diff) | |
download | PeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.tar.gz PeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.tar.zst PeerTube-866c5f667da9fc09f3b093ff0a6f89d4af0ce5af.zip |
Simplify ICU in components
Diffstat (limited to 'client/src/app/+admin/overview/users')
-rw-r--r-- | client/src/app/+admin/overview/users/user-list/user-list.component.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts index 19420b748..5d5abf6f4 100644 --- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts +++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts | |||
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { Component, OnInit, ViewChild } from '@angular/core' | 2 | import { Component, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { AuthService, ConfirmService, LocalStorageService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | 4 | import { AuthService, ConfirmService, LocalStorageService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
5 | import { getAPIHost, prepareIcu } from '@app/helpers' | 5 | import { formatICU, getAPIHost } from '@app/helpers' |
6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
7 | import { Actor, DropdownAction } from '@app/shared/shared-main' | 7 | import { Actor, DropdownAction } from '@app/shared/shared-main' |
8 | import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation' | 8 | import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation' |
@@ -210,9 +210,9 @@ export class UserListComponent extends RestTable <User> implements OnInit { | |||
210 | 210 | ||
211 | async unbanUsers (users: User[]) { | 211 | async unbanUsers (users: User[]) { |
212 | const res = await this.confirmService.confirm( | 212 | const res = await this.confirmService.confirm( |
213 | prepareIcu($localize`Do you really want to unban {count, plural, =1 {1 user} other {{count} users}}?`)( | 213 | formatICU( |
214 | { count: users.length }, | 214 | $localize`Do you really want to unban {count, plural, =1 {1 user} other {{count} users}}?`, |
215 | $localize`Do you really want to unban ${users.length} users?` | 215 | { count: users.length } |
216 | ), | 216 | ), |
217 | $localize`Unban` | 217 | $localize`Unban` |
218 | ) | 218 | ) |
@@ -223,9 +223,9 @@ export class UserListComponent extends RestTable <User> implements OnInit { | |||
223 | .subscribe({ | 223 | .subscribe({ |
224 | next: () => { | 224 | next: () => { |
225 | this.notifier.success( | 225 | this.notifier.success( |
226 | prepareIcu($localize`{count, plural, =1 {1 user unbanned.} other {{count} users unbanned.}}`)( | 226 | formatICU( |
227 | { count: users.length }, | 227 | $localize`{count, plural, =1 {1 user unbanned.} other {{count} users unbanned.}}`, |
228 | $localize`${users.length} users unbanned.` | 228 | { count: users.length } |
229 | ) | 229 | ) |
230 | ) | 230 | ) |
231 | this.reloadData() | 231 | this.reloadData() |
@@ -252,9 +252,9 @@ export class UserListComponent extends RestTable <User> implements OnInit { | |||
252 | .subscribe({ | 252 | .subscribe({ |
253 | next: () => { | 253 | next: () => { |
254 | this.notifier.success( | 254 | this.notifier.success( |
255 | prepareIcu($localize`{count, plural, =1 {1 user deleted.} other {{count} users deleted.}}`)( | 255 | formatICU( |
256 | { count: users.length }, | 256 | $localize`{count, plural, =1 {1 user deleted.} other {{count} users deleted.}}`, |
257 | $localize`${users.length} users deleted.` | 257 | { count: users.length } |
258 | ) | 258 | ) |
259 | ) | 259 | ) |
260 | 260 | ||
@@ -270,9 +270,9 @@ export class UserListComponent extends RestTable <User> implements OnInit { | |||
270 | .subscribe({ | 270 | .subscribe({ |
271 | next: () => { | 271 | next: () => { |
272 | this.notifier.success( | 272 | this.notifier.success( |
273 | prepareIcu($localize`{count, plural, =1 {1 user email set as verified.} other {{count} user emails set as verified.}}`)( | 273 | formatICU( |
274 | { count: users.length }, | 274 | $localize`{count, plural, =1 {1 user email set as verified.} other {{count} user emails set as verified.}}`, |
275 | $localize`${users.length} users email set as verified.` | 275 | { count: users.length } |
276 | ) | 276 | ) |
277 | ) | 277 | ) |
278 | 278 | ||