From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../app/videos/+video-watch/modal/video-report.component.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client/src/app/videos/+video-watch/modal/video-report.component.ts') 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' import { ModalDirective } from 'ngx-bootstrap/modal' import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' import { VideoDetails } from '../../../shared/video/video-details.model' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-video-report', @@ -27,8 +28,9 @@ export class VideoReportComponent extends FormReactive implements OnInit { constructor ( private formBuilder: FormBuilder, private videoAbuseService: VideoAbuseService, - private notificationsService: NotificationsService - ) { + private notificationsService: NotificationsService, + private i18n: I18n + ) { super() } @@ -58,11 +60,11 @@ export class VideoReportComponent extends FormReactive implements OnInit { this.videoAbuseService.reportVideo(this.video.id, reason) .subscribe( () => { - this.notificationsService.success('Success', 'Video reported.') + this.notificationsService.success(this.i18n('Success'), this.i18n('Video reported.')) this.hide() }, - err => this.notificationsService.error('Error', err.message) + err => this.notificationsService.error(this.i18n('Error'), err.message) ) } } -- cgit v1.2.3