diff options
Diffstat (limited to 'client/src/app/+admin')
9 files changed, 74 insertions, 76 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts index 628c2d102..42c0e6dc2 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { FormGroup } from '@angular/forms' | 2 | import { FormGroup } from '@angular/forms' |
3 | import { prepareIcu } from '@app/helpers' | 3 | import { formatICU } from '@app/helpers' |
4 | 4 | ||
5 | export type ResolutionOption = { | 5 | export type ResolutionOption = { |
6 | id: string | 6 | id: string |
@@ -99,10 +99,7 @@ export class EditConfigurationService { | |||
99 | return { | 99 | return { |
100 | value, | 100 | value, |
101 | atMost: noneOnAuto, // auto switches everything to a least estimation since ffmpeg will take as many threads as possible | 101 | atMost: noneOnAuto, // auto switches everything to a least estimation since ffmpeg will take as many threads as possible |
102 | unit: prepareIcu($localize`{value, plural, =1 {thread} other {threads}}`)( | 102 | unit: formatICU($localize`{value, plural, =1 {thread} other {threads}}`, { value }) |
103 | { value }, | ||
104 | $localize`threads` | ||
105 | ) | ||
106 | } | 103 | } |
107 | } | 104 | } |
108 | } | 105 | } |
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index cebb2e1a2..618892242 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { prepareIcu } from '@app/helpers' | 4 | import { formatICU } from '@app/helpers' |
5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
6 | import { InstanceFollowService } from '@app/shared/shared-instance' | 6 | import { InstanceFollowService } from '@app/shared/shared-instance' |
7 | import { DropdownAction } from '@app/shared/shared-main' | 7 | import { DropdownAction } from '@app/shared/shared-main' |
@@ -63,9 +63,9 @@ export class FollowersListComponent extends RestTable <ActorFollow> implements O | |||
63 | .subscribe({ | 63 | .subscribe({ |
64 | next: () => { | 64 | next: () => { |
65 | // eslint-disable-next-line max-len | 65 | // eslint-disable-next-line max-len |
66 | const message = prepareIcu($localize`Accepted {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`)( | 66 | const message = formatICU( |
67 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) }, | 67 | $localize`Accepted {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`, |
68 | $localize`Follow requests accepted` | 68 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) } |
69 | ) | 69 | ) |
70 | this.notifier.success(message) | 70 | this.notifier.success(message) |
71 | 71 | ||
@@ -78,9 +78,9 @@ export class FollowersListComponent extends RestTable <ActorFollow> implements O | |||
78 | 78 | ||
79 | async rejectFollower (follows: ActorFollow[]) { | 79 | async rejectFollower (follows: ActorFollow[]) { |
80 | // eslint-disable-next-line max-len | 80 | // eslint-disable-next-line max-len |
81 | const message = prepareIcu($localize`Do you really want to reject {count, plural, =1 {{followerName} follow request?} other {{count} follow requests?}}`)( | 81 | const message = formatICU( |
82 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) }, | 82 | $localize`Do you really want to reject {count, plural, =1 {{followerName} follow request?} other {{count} follow requests?}}`, |
83 | $localize`Do you really want to reject these follow requests?` | 83 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) } |
84 | ) | 84 | ) |
85 | 85 | ||
86 | const res = await this.confirmService.confirm(message, $localize`Reject`) | 86 | const res = await this.confirmService.confirm(message, $localize`Reject`) |
@@ -90,9 +90,9 @@ export class FollowersListComponent extends RestTable <ActorFollow> implements O | |||
90 | .subscribe({ | 90 | .subscribe({ |
91 | next: () => { | 91 | next: () => { |
92 | // eslint-disable-next-line max-len | 92 | // eslint-disable-next-line max-len |
93 | const message = prepareIcu($localize`Rejected {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`)( | 93 | const message = formatICU( |
94 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) }, | 94 | $localize`Rejected {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`, |
95 | $localize`Follow requests rejected` | 95 | { count: follows.length, followerName: this.buildFollowerName(follows[0]) } |
96 | ) | 96 | ) |
97 | this.notifier.success(message) | 97 | this.notifier.success(message) |
98 | 98 | ||
@@ -110,9 +110,9 @@ export class FollowersListComponent extends RestTable <ActorFollow> implements O | |||
110 | message += '<br /><br />' | 110 | message += '<br /><br />' |
111 | 111 | ||
112 | // eslint-disable-next-line max-len | 112 | // eslint-disable-next-line max-len |
113 | message += prepareIcu($localize`Do you really want to delete {count, plural, =1 {{followerName} follow request?} other {{count} follow requests?}}`)( | 113 | message += formatICU( |
114 | icuParams, | 114 | $localize`Do you really want to delete {count, plural, =1 {{followerName} follow request?} other {{count} follow requests?}}`, |
115 | $localize`Do you really want to delete these follow requests?` | 115 | icuParams |
116 | ) | 116 | ) |
117 | 117 | ||
118 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 118 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
@@ -122,9 +122,9 @@ export class FollowersListComponent extends RestTable <ActorFollow> implements O | |||
122 | .subscribe({ | 122 | .subscribe({ |
123 | next: () => { | 123 | next: () => { |
124 | // eslint-disable-next-line max-len | 124 | // eslint-disable-next-line max-len |
125 | const message = prepareIcu($localize`Removed {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`)( | 125 | const message = formatICU( |
126 | icuParams, | 126 | $localize`Removed {count, plural, =1 {{followerName} follow request} other {{count} follow requests}}`, |
127 | $localize`Follow requests removed` | 127 | icuParams |
128 | ) | 128 | ) |
129 | 129 | ||
130 | this.notifier.success(message) | 130 | this.notifier.success(message) |
diff --git a/client/src/app/+admin/follows/following-list/follow-modal.component.ts b/client/src/app/+admin/follows/following-list/follow-modal.component.ts index 8f74e82a6..54b3cebc5 100644 --- a/client/src/app/+admin/follows/following-list/follow-modal.component.ts +++ b/client/src/app/+admin/follows/following-list/follow-modal.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { prepareIcu } from '@app/helpers' | 3 | import { formatICU } from '@app/helpers' |
4 | import { splitAndGetNotEmpty, UNIQUE_HOSTS_OR_HANDLE_VALIDATOR } from '@app/shared/form-validators/host-validators' | 4 | import { splitAndGetNotEmpty, UNIQUE_HOSTS_OR_HANDLE_VALIDATOR } from '@app/shared/form-validators/host-validators' |
5 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' | 5 | import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' |
6 | import { InstanceFollowService } from '@app/shared/shared-instance' | 6 | import { InstanceFollowService } from '@app/shared/shared-instance' |
@@ -62,9 +62,9 @@ export class FollowModalComponent extends FormReactive implements OnInit { | |||
62 | .subscribe({ | 62 | .subscribe({ |
63 | next: () => { | 63 | next: () => { |
64 | this.notifier.success( | 64 | this.notifier.success( |
65 | prepareIcu($localize`{count, plural, =1 {Follow request sent!} other {Follow requests sent!}}`)( | 65 | formatICU( |
66 | { count: hostsOrHandles.length }, | 66 | $localize`{count, plural, =1 {Follow request sent!} other {Follow requests sent!}}`, |
67 | $localize`Follow request(s) sent!` | 67 | { count: hostsOrHandles.length } |
68 | ) | 68 | ) |
69 | ) | 69 | ) |
70 | 70 | ||
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index 71f2fbe66..6c8723c16 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts | |||
@@ -6,7 +6,7 @@ import { InstanceFollowService } from '@app/shared/shared-instance' | |||
6 | import { ActorFollow } from '@shared/models' | 6 | import { ActorFollow } from '@shared/models' |
7 | import { FollowModalComponent } from './follow-modal.component' | 7 | import { FollowModalComponent } from './follow-modal.component' |
8 | import { DropdownAction } from '@app/shared/shared-main' | 8 | import { DropdownAction } from '@app/shared/shared-main' |
9 | import { prepareIcu } from '@app/helpers' | 9 | import { formatICU } from '@app/helpers' |
10 | 10 | ||
11 | @Component({ | 11 | @Component({ |
12 | templateUrl: './following-list.component.html', | 12 | templateUrl: './following-list.component.html', |
@@ -64,9 +64,9 @@ export class FollowingListComponent extends RestTable <ActorFollow> implements O | |||
64 | async removeFollowing (follows: ActorFollow[]) { | 64 | async removeFollowing (follows: ActorFollow[]) { |
65 | const icuParams = { count: follows.length, entryName: this.buildFollowingName(follows[0]) } | 65 | const icuParams = { count: follows.length, entryName: this.buildFollowingName(follows[0]) } |
66 | 66 | ||
67 | const message = prepareIcu($localize`Do you really want to unfollow {count, plural, =1 {{entryName}?} other {{count} entries?}}`)( | 67 | const message = formatICU( |
68 | icuParams, | 68 | $localize`Do you really want to unfollow {count, plural, =1 {{entryName}?} other {{count} entries?}}`, |
69 | $localize`Do you really want to unfollow these entries?` | 69 | icuParams |
70 | ) | 70 | ) |
71 | 71 | ||
72 | const res = await this.confirmService.confirm(message, $localize`Unfollow`) | 72 | const res = await this.confirmService.confirm(message, $localize`Unfollow`) |
@@ -76,9 +76,9 @@ export class FollowingListComponent extends RestTable <ActorFollow> implements O | |||
76 | .subscribe({ | 76 | .subscribe({ |
77 | next: () => { | 77 | next: () => { |
78 | // eslint-disable-next-line max-len | 78 | // eslint-disable-next-line max-len |
79 | const message = prepareIcu($localize`You are not following {count, plural, =1 {{entryName} anymore.} other {these {count} entries anymore.}}`)( | 79 | const message = formatICU( |
80 | icuParams, | 80 | $localize`You are not following {count, plural, =1 {{entryName} anymore.} other {these {count} entries anymore.}}`, |
81 | $localize`You are not following them anymore.` | 81 | icuParams |
82 | ) | 82 | ) |
83 | 83 | ||
84 | this.notifier.success(message) | 84 | this.notifier.success(message) |
diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts index 3ca1ceab8..35d9d13d7 100644 --- a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts +++ b/client/src/app/+admin/moderation/registration-list/registration-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 { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | 4 | import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' |
5 | import { prepareIcu } from '@app/helpers' | 5 | import { formatICU } from '@app/helpers' |
6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 6 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
7 | import { DropdownAction } from '@app/shared/shared-main' | 7 | import { DropdownAction } from '@app/shared/shared-main' |
8 | import { UserRegistration, UserRegistrationState } from '@shared/models' | 8 | import { UserRegistration, UserRegistrationState } from '@shared/models' |
@@ -121,9 +121,9 @@ export class RegistrationListComponent extends RestTable <UserRegistration> impl | |||
121 | const icuParams = { count: registrations.length, username: registrations[0].username } | 121 | const icuParams = { count: registrations.length, username: registrations[0].username } |
122 | 122 | ||
123 | // eslint-disable-next-line max-len | 123 | // eslint-disable-next-line max-len |
124 | const message = prepareIcu($localize`Do you really want to delete {count, plural, =1 {{username} registration request?} other {{count} registration requests?}}`)( | 124 | const message = formatICU( |
125 | icuParams, | 125 | $localize`Do you really want to delete {count, plural, =1 {{username} registration request?} other {{count} registration requests?}}`, |
126 | $localize`Do you really want to delete these registration requests?` | 126 | icuParams |
127 | ) | 127 | ) |
128 | 128 | ||
129 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 129 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
@@ -133,9 +133,9 @@ export class RegistrationListComponent extends RestTable <UserRegistration> impl | |||
133 | .subscribe({ | 133 | .subscribe({ |
134 | next: () => { | 134 | next: () => { |
135 | // eslint-disable-next-line max-len | 135 | // eslint-disable-next-line max-len |
136 | const message = prepareIcu($localize`Removed {count, plural, =1 {{username} registration request} other {{count} registration requests}}`)( | 136 | const message = formatICU( |
137 | icuParams, | 137 | $localize`Removed {count, plural, =1 {{username} registration request} other {{count} registration requests}}`, |
138 | $localize`Registration requests removed` | 138 | icuParams |
139 | ) | 139 | ) |
140 | 140 | ||
141 | this.notifier.success(message) | 141 | this.notifier.success(message) |
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts index 28efdc076..b77072665 100644 --- a/client/src/app/+admin/overview/comments/video-comment-list.component.ts +++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts | |||
@@ -7,7 +7,7 @@ import { DropdownAction } from '@app/shared/shared-main' | |||
7 | import { BulkService } from '@app/shared/shared-moderation' | 7 | import { BulkService } from '@app/shared/shared-moderation' |
8 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' | 8 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' |
9 | import { FeedFormat, UserRight } from '@shared/models' | 9 | import { FeedFormat, UserRight } from '@shared/models' |
10 | import { prepareIcu } from '@app/helpers' | 10 | import { formatICU } from '@app/helpers' |
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-video-comment-list', | 13 | selector: 'my-video-comment-list', |
@@ -146,9 +146,9 @@ export class VideoCommentListComponent extends RestTable <VideoCommentAdmin> imp | |||
146 | .subscribe({ | 146 | .subscribe({ |
147 | next: () => { | 147 | next: () => { |
148 | this.notifier.success( | 148 | this.notifier.success( |
149 | prepareIcu($localize`{count, plural, =1 {1 comment deleted.} other {{count} comments deleted.}}`)( | 149 | formatICU( |
150 | { count: commentArgs.length }, | 150 | $localize`{count, plural, =1 {1 comment deleted.} other {{count} comments deleted.}}`, |
151 | $localize`${commentArgs.length} comment(s) deleted.` | 151 | { count: commentArgs.length } |
152 | ) | 152 | ) |
153 | ) | 153 | ) |
154 | 154 | ||
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 | ||
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts index ebf82ce16..e9c526193 100644 --- a/client/src/app/+admin/overview/videos/video-list.component.ts +++ b/client/src/app/+admin/overview/videos/video-list.component.ts | |||
@@ -3,7 +3,7 @@ import { finalize } from 'rxjs/operators' | |||
3 | import { Component, OnInit, ViewChild } from '@angular/core' | 3 | import { Component, OnInit, ViewChild } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 5 | import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
6 | import { prepareIcu } from '@app/helpers' | 6 | import { formatICU } from '@app/helpers' |
7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | 7 | import { AdvancedInputFilter } from '@app/shared/shared-forms' |
8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' | 9 | import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' |
@@ -219,9 +219,9 @@ export class VideoListComponent extends RestTable <Video> implements OnInit { | |||
219 | } | 219 | } |
220 | 220 | ||
221 | private async removeVideos (videos: Video[]) { | 221 | private async removeVideos (videos: Video[]) { |
222 | const message = prepareIcu($localize`Are you sure you want to delete {count, plural, =1 {this video} other {these {count} videos}}?`)( | 222 | const message = formatICU( |
223 | { count: videos.length }, | 223 | $localize`Are you sure you want to delete {count, plural, =1 {this video} other {these {count} videos}}?`, |
224 | $localize`Are you sure you want to delete these ${videos.length} videos?` | 224 | { count: videos.length } |
225 | ) | 225 | ) |
226 | 226 | ||
227 | const res = await this.confirmService.confirm(message, $localize`Delete`) | 227 | const res = await this.confirmService.confirm(message, $localize`Delete`) |
@@ -231,9 +231,9 @@ export class VideoListComponent extends RestTable <Video> implements OnInit { | |||
231 | .subscribe({ | 231 | .subscribe({ |
232 | next: () => { | 232 | next: () => { |
233 | this.notifier.success( | 233 | this.notifier.success( |
234 | prepareIcu($localize`Deleted {count, plural, =1 {1 video} other {{count} videos}}.`)( | 234 | formatICU( |
235 | { count: videos.length }, | 235 | $localize`Deleted {count, plural, =1 {1 video} other {{count} videos}}.`, |
236 | $localize`Deleted ${videos.length} videos.` | 236 | { count: videos.length } |
237 | ) | 237 | ) |
238 | ) | 238 | ) |
239 | 239 | ||
@@ -249,9 +249,9 @@ export class VideoListComponent extends RestTable <Video> implements OnInit { | |||
249 | .subscribe({ | 249 | .subscribe({ |
250 | next: () => { | 250 | next: () => { |
251 | this.notifier.success( | 251 | this.notifier.success( |
252 | prepareIcu($localize`Unblocked {count, plural, =1 {1 video} other {{count} videos}}.`)( | 252 | formatICU( |
253 | { count: videos.length }, | 253 | $localize`Unblocked {count, plural, =1 {1 video} other {{count} videos}}.`, |
254 | $localize`Unblocked ${videos.length} videos.` | 254 | { count: videos.length } |
255 | ) | 255 | ) |
256 | ) | 256 | ) |
257 | 257 | ||
@@ -267,15 +267,15 @@ export class VideoListComponent extends RestTable <Video> implements OnInit { | |||
267 | 267 | ||
268 | if (type === 'hls') { | 268 | if (type === 'hls') { |
269 | // eslint-disable-next-line max-len | 269 | // eslint-disable-next-line max-len |
270 | message = prepareIcu($localize`Are you sure you want to delete {count, plural, =1 {1 HLS streaming playlist} other {{count} HLS streaming playlists}}?`)( | 270 | message = formatICU( |
271 | { count: videos.length }, | 271 | $localize`Are you sure you want to delete {count, plural, =1 {1 HLS streaming playlist} other {{count} HLS streaming playlists}}?`, |
272 | $localize`Are you sure you want to delete ${videos.length} HLS streaming playlists?` | 272 | { count: videos.length } |
273 | ) | 273 | ) |
274 | } else { | 274 | } else { |
275 | // eslint-disable-next-line max-len | 275 | // eslint-disable-next-line max-len |
276 | message = prepareIcu($localize`Are you sure you want to delete WebTorrent files of {count, plural, =1 {1 video} other {{count} videos}}?`)( | 276 | message = formatICU( |
277 | { count: videos.length }, | 277 | $localize`Are you sure you want to delete WebTorrent files of {count, plural, =1 {1 video} other {{count} videos}}?`, |
278 | $localize`Are you sure you want to delete WebTorrent files of ${videos.length} videos?` | 278 | { count: videos.length } |
279 | ) | 279 | ) |
280 | } | 280 | } |
281 | 281 | ||
diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts index 8ba956eb8..8994c1d00 100644 --- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts +++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { Component, OnInit } from '@angular/core' | 2 | import { Component, OnInit } from '@angular/core' |
3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { prepareIcu } from '@app/helpers' | 4 | import { formatICU } from '@app/helpers' |
5 | import { DropdownAction } from '@app/shared/shared-main' | 5 | import { DropdownAction } from '@app/shared/shared-main' |
6 | import { RunnerJob, RunnerJobState } from '@shared/models' | 6 | import { RunnerJob, RunnerJobState } from '@shared/models' |
7 | import { RunnerJobFormatted, RunnerService } from '../runner.service' | 7 | import { RunnerJobFormatted, RunnerService } from '../runner.service' |
@@ -57,9 +57,10 @@ export class RunnerJobListComponent extends RestTable <RunnerJob> implements OnI | |||
57 | } | 57 | } |
58 | 58 | ||
59 | async cancelJobs (jobs: RunnerJob[]) { | 59 | async cancelJobs (jobs: RunnerJob[]) { |
60 | const message = prepareIcu( | 60 | const message = formatICU( |
61 | $localize`Do you really want to cancel {count, plural, =1 {this job} other {{count} jobs}}? Children jobs will also be cancelled.` | 61 | $localize`Do you really want to cancel {count, plural, =1 {this job} other {{count} jobs}}? Children jobs will also be cancelled.`, |
62 | )({ count: jobs.length }, $localize`Do you really want to cancel these jobs? Children jobs will also be cancelled.`) | 62 | { count: jobs.length } |
63 | ) | ||
63 | 64 | ||
64 | const res = await this.confirmService.confirm(message, $localize`Cancel`) | 65 | const res = await this.confirmService.confirm(message, $localize`Cancel`) |
65 | 66 | ||