aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-videos')
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts17
-rw-r--r--client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts8
2 files changed, 10 insertions, 15 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'
7import { immutableAssign } from '@app/helpers' 7import { immutableAssign } from '@app/helpers'
8import { Video, VideoService } from '@app/shared/shared-main' 8import { Video, VideoService } from '@app/shared/shared-main'
9import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' 9import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
10import { I18n } from '@ngx-translate/i18n-polyfill'
11import { VideoSortField } from '@shared/models' 10import { VideoSortField } from '@shared/models'
12import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component' 11import { 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
diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
index 18e716a09..edd691694 100644
--- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
+++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
@@ -3,7 +3,6 @@ import { Notifier, UserService } from '@app/core'
3import { FormReactive, FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared/shared-forms' 3import { FormReactive, FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared/shared-forms'
4import { Video, VideoOwnershipService } from '@app/shared/shared-main' 4import { Video, VideoOwnershipService } from '@app/shared/shared-main'
5import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6import { I18n } from '@ngx-translate/i18n-polyfill'
7 6
8@Component({ 7@Component({
9 selector: 'my-video-change-ownership', 8 selector: 'my-video-change-ownership',
@@ -25,9 +24,8 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
25 private videoOwnershipService: VideoOwnershipService, 24 private videoOwnershipService: VideoOwnershipService,
26 private notifier: Notifier, 25 private notifier: Notifier,
27 private userService: UserService, 26 private userService: UserService,
28 private modalService: NgbModal, 27 private modalService: NgbModal
29 private i18n: I18n 28 ) {
30 ) {
31 super() 29 super()
32 } 30 }
33 31
@@ -63,7 +61,7 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
63 this.videoOwnershipService 61 this.videoOwnershipService
64 .changeOwnership(this.video.id, username) 62 .changeOwnership(this.video.id, username)
65 .subscribe( 63 .subscribe(
66 () => this.notifier.success(this.i18n('Ownership change request sent.')), 64 () => this.notifier.success($localize`Ownership change request sent.`),
67 65
68 err => this.notifier.error(err.message) 66 err => this.notifier.error(err.message)
69 ) 67 )