aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-update.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-edit/video-update.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-edit/video-update.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts
index 310285f92..e37dd526f 100644
--- a/client/src/app/videos/+video-edit/video-update.component.ts
+++ b/client/src/app/videos/+video-edit/video-update.component.ts
@@ -12,6 +12,7 @@ import { ValidatorMessage } from '../../shared/forms/form-validators/validator-m
12import { VideoEdit } from '../../shared/video/video-edit.model' 12import { VideoEdit } from '../../shared/video/video-edit.model'
13import { VideoService } from '../../shared/video/video.service' 13import { VideoService } from '../../shared/video/video.service'
14import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 14import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
15import { I18n } from '@ngx-translate/i18n-polyfill'
15 16
16@Component({ 17@Component({
17 selector: 'my-videos-update', 18 selector: 'my-videos-update',
@@ -37,7 +38,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
37 private videoService: VideoService, 38 private videoService: VideoService,
38 private authService: AuthService, 39 private authService: AuthService,
39 private loadingBar: LoadingBarService, 40 private loadingBar: LoadingBarService,
40 private videoChannelService: VideoChannelService 41 private videoChannelService: VideoChannelService,
42 private i18n: I18n
41 ) { 43 ) {
42 super() 44 super()
43 } 45 }
@@ -91,7 +93,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
91 93
92 err => { 94 err => {
93 console.error(err) 95 console.error(err)
94 this.notificationsService.error('Error', err.message) 96 this.notificationsService.error(this.i18n('Error'), err.message)
95 } 97 }
96 ) 98 )
97 } 99 }
@@ -116,13 +118,13 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
116 () => { 118 () => {
117 this.isUpdatingVideo = false 119 this.isUpdatingVideo = false
118 this.loadingBar.complete() 120 this.loadingBar.complete()
119 this.notificationsService.success('Success', 'Video updated.') 121 this.notificationsService.success(this.i18n('Success'), this.i18n('Video updated.'))
120 this.router.navigate([ '/videos/watch', this.video.uuid ]) 122 this.router.navigate([ '/videos/watch', this.video.uuid ])
121 }, 123 },
122 124
123 err => { 125 err => {
124 this.isUpdatingVideo = false 126 this.isUpdatingVideo = false
125 this.notificationsService.error('Error', err.message) 127 this.notificationsService.error(this.i18n('Error'), err.message)
126 console.error(err) 128 console.error(err)
127 } 129 }
128 ) 130 )