diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-report.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-report.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-report.component.ts b/client/src/app/videos/+video-watch/modal/video-report.component.ts index 050e827e7..1bbd30226 100644 --- a/client/src/app/videos/+video-watch/modal/video-report.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-report.component.ts | |||
@@ -4,6 +4,7 @@ import { NotificationsService } from 'angular2-notifications' | |||
4 | import { ModalDirective } from 'ngx-bootstrap/modal' | 4 | import { ModalDirective } from 'ngx-bootstrap/modal' |
5 | import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' | 5 | import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' |
6 | import { VideoDetails } from '../../../shared/video/video-details.model' | 6 | import { VideoDetails } from '../../../shared/video/video-details.model' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | 8 | ||
8 | @Component({ | 9 | @Component({ |
9 | selector: 'my-video-report', | 10 | selector: 'my-video-report', |
@@ -27,8 +28,9 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
27 | constructor ( | 28 | constructor ( |
28 | private formBuilder: FormBuilder, | 29 | private formBuilder: FormBuilder, |
29 | private videoAbuseService: VideoAbuseService, | 30 | private videoAbuseService: VideoAbuseService, |
30 | private notificationsService: NotificationsService | 31 | private notificationsService: NotificationsService, |
31 | ) { | 32 | private i18n: I18n |
33 | ) { | ||
32 | super() | 34 | super() |
33 | } | 35 | } |
34 | 36 | ||
@@ -58,11 +60,11 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
58 | this.videoAbuseService.reportVideo(this.video.id, reason) | 60 | this.videoAbuseService.reportVideo(this.video.id, reason) |
59 | .subscribe( | 61 | .subscribe( |
60 | () => { | 62 | () => { |
61 | this.notificationsService.success('Success', 'Video reported.') | 63 | this.notificationsService.success(this.i18n('Success'), this.i18n('Video reported.')) |
62 | this.hide() | 64 | this.hide() |
63 | }, | 65 | }, |
64 | 66 | ||
65 | err => this.notificationsService.error('Error', err.message) | 67 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
66 | ) | 68 | ) |
67 | } | 69 | } |
68 | } | 70 | } |