diff options
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.ts | 10 |
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 | |||
12 | import { VideoEdit } from '../../shared/video/video-edit.model' | 12 | import { VideoEdit } from '../../shared/video/video-edit.model' |
13 | import { VideoService } from '../../shared/video/video.service' | 13 | import { VideoService } from '../../shared/video/video.service' |
14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 14 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
15 | import { 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 | ) |