aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/modal/video-report.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-04 16:21:17 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 08:43:01 +0200
commitb1d40cff89f7cff565a98cdbcea9a624196a169a (patch)
treed24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/videos/+video-watch/modal/video-report.component.ts
parent989e526abf0c0dd7958deb630df009608561bb67 (diff)
downloadPeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst
PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip
Add i18n attributes
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.ts10
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'
4import { ModalDirective } from 'ngx-bootstrap/modal' 4import { ModalDirective } from 'ngx-bootstrap/modal'
5import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index' 5import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../../shared/index'
6import { VideoDetails } from '../../../shared/video/video-details.model' 6import { VideoDetails } from '../../../shared/video/video-details.model'
7import { 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}