diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-videos/my-account-videos.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 2274c6a7b..46a02a41a 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |||
@@ -7,7 +7,6 @@ import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | |||
7 | import { immutableAssign } from '@app/helpers' | 7 | import { immutableAssign } from '@app/helpers' |
8 | import { Video, VideoService } from '@app/shared/shared-main' | 8 | import { Video, VideoService } from '@app/shared/shared-main' |
9 | import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' | 9 | import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' |
10 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
11 | import { VideoSortField } from '@shared/models' | 10 | import { VideoSortField } from '@shared/models' |
12 | import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' | 11 | import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' |
13 | 12 | ||
@@ -50,11 +49,10 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { | |||
50 | protected authService: AuthService, | 49 | protected authService: AuthService, |
51 | protected notifier: Notifier, | 50 | protected notifier: Notifier, |
52 | protected screenService: ScreenService, | 51 | protected screenService: ScreenService, |
53 | private i18n: I18n, | ||
54 | private confirmService: ConfirmService, | 52 | private confirmService: ConfirmService, |
55 | private videoService: VideoService | 53 | private videoService: VideoService |
56 | ) { | 54 | ) { |
57 | this.titlePage = this.i18n('My videos') | 55 | this.titlePage = $localize`My videos` |
58 | } | 56 | } |
59 | 57 | ||
60 | ngOnInit () { | 58 | ngOnInit () { |
@@ -97,8 +95,8 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { | |||
97 | .map(k => parseInt(k, 10)) | 95 | .map(k => parseInt(k, 10)) |
98 | 96 | ||
99 | const res = await this.confirmService.confirm( | 97 | const res = await this.confirmService.confirm( |
100 | this.i18n('Do you really want to delete {{deleteLength}} videos?', { deleteLength: toDeleteVideosIds.length }), | 98 | $localize`Do you really want to delete ${toDeleteVideosIds.length} videos?`, |
101 | this.i18n('Delete') | 99 | $localize`Delete` |
102 | ) | 100 | ) |
103 | if (res === false) return | 101 | if (res === false) return |
104 | 102 | ||
@@ -114,8 +112,7 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { | |||
114 | .pipe(toArray()) | 112 | .pipe(toArray()) |
115 | .subscribe( | 113 | .subscribe( |
116 | () => { | 114 | () => { |
117 | this.notifier.success(this.i18n('{{deleteLength}} videos deleted.', { deleteLength: toDeleteVideosIds.length })) | 115 | this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`) |
118 | |||
119 | this.selection = {} | 116 | this.selection = {} |
120 | }, | 117 | }, |
121 | 118 | ||
@@ -125,15 +122,15 @@ export class MyAccountVideosComponent implements OnInit, DisableForReuseHook { | |||
125 | 122 | ||
126 | async deleteVideo (video: Video) { | 123 | async deleteVideo (video: Video) { |
127 | const res = await this.confirmService.confirm( | 124 | const res = await this.confirmService.confirm( |
128 | this.i18n('Do you really want to delete {{videoName}}?', { videoName: video.name }), | 125 | $localize`Do you really want to delete ${video.name}?`, |
129 | this.i18n('Delete') | 126 | $localize`Delete` |
130 | ) | 127 | ) |
131 | if (res === false) return | 128 | if (res === false) return |
132 | 129 | ||
133 | this.videoService.removeVideo(video.id) | 130 | this.videoService.removeVideo(video.id) |
134 | .subscribe( | 131 | .subscribe( |
135 | () => { | 132 | () => { |
136 | this.notifier.success(this.i18n('Video {{videoName}} deleted.', { videoName: video.name })) | 133 | this.notifier.success($localize`Video ${video.name} deleted.`) |
137 | this.removeVideoFromArray(video.id) | 134 | this.removeVideoFromArray(video.id) |
138 | }, | 135 | }, |
139 | 136 | ||