aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-history/my-account-history.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-history/my-account-history.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-history/my-account-history.component.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.ts b/client/src/app/+my-account/my-account-history/my-account-history.component.ts
index dc78b3d6e..3298c56c7 100644
--- a/client/src/app/+my-account/my-account-history/my-account-history.component.ts
+++ b/client/src/app/+my-account/my-account-history/my-account-history.component.ts
@@ -13,7 +13,6 @@ import {
13import { immutableAssign } from '@app/helpers' 13import { immutableAssign } from '@app/helpers'
14import { UserHistoryService } from '@app/shared/shared-main' 14import { UserHistoryService } from '@app/shared/shared-main'
15import { AbstractVideoList } from '@app/shared/shared-video-miniature' 15import { AbstractVideoList } from '@app/shared/shared-video-miniature'
16import { I18n } from '@ngx-translate/i18n-polyfill'
17 16
18@Component({ 17@Component({
19 selector: 'my-account-history', 18 selector: 'my-account-history',
@@ -30,7 +29,6 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
30 videosHistoryEnabled: boolean 29 videosHistoryEnabled: boolean
31 30
32 constructor ( 31 constructor (
33 protected i18n: I18n,
34 protected router: Router, 32 protected router: Router,
35 protected serverService: ServerService, 33 protected serverService: ServerService,
36 protected route: ActivatedRoute, 34 protected route: ActivatedRoute,
@@ -44,7 +42,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
44 ) { 42 ) {
45 super() 43 super()
46 44
47 this.titlePage = this.i18n('My videos history') 45 this.titlePage = $localize`My videos history`
48 } 46 }
49 47
50 ngOnInit () { 48 ngOnInit () {
@@ -72,8 +70,8 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
72 .subscribe( 70 .subscribe(
73 () => { 71 () => {
74 const message = this.videosHistoryEnabled === true ? 72 const message = this.videosHistoryEnabled === true ?
75 this.i18n('Videos history is enabled') : 73 $localize`Videos history is enabled` :
76 this.i18n('Videos history is disabled') 74 $localize`Videos history is disabled`
77 75
78 this.notifier.success(message) 76 this.notifier.success(message)
79 77
@@ -85,8 +83,8 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
85 } 83 }
86 84
87 async deleteHistory () { 85 async deleteHistory () {
88 const title = this.i18n('Delete videos history') 86 const title = $localize`Delete videos history`
89 const message = this.i18n('Are you sure you want to delete all your videos history?') 87 const message = $localize`Are you sure you want to delete all your videos history?`
90 88
91 const res = await this.confirmService.confirm(message, title) 89 const res = await this.confirmService.confirm(message, title)
92 if (res !== true) return 90 if (res !== true) return
@@ -94,7 +92,7 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
94 this.userHistoryService.deleteUserVideosHistory() 92 this.userHistoryService.deleteUserVideosHistory()
95 .subscribe( 93 .subscribe(
96 () => { 94 () => {
97 this.notifier.success(this.i18n('Videos history deleted')) 95 this.notifier.success($localize`Videos history deleted`)
98 96
99 this.reloadVideos() 97 this.reloadVideos()
100 }, 98 },