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, 4 insertions, 6 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 abd08f05c..2e1d0f89d 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -5,7 +5,6 @@ import { Notifier } from '@app/core' | |||
5 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' | 5 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' |
6 | import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' | 6 | import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' |
7 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { VideoPrivacy } from '@shared/models' | 8 | import { VideoPrivacy } from '@shared/models' |
10 | 9 | ||
11 | @Component({ | 10 | @Component({ |
@@ -31,9 +30,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
31 | private notifier: Notifier, | 30 | private notifier: Notifier, |
32 | private videoService: VideoService, | 31 | private videoService: VideoService, |
33 | private loadingBar: LoadingBarService, | 32 | private loadingBar: LoadingBarService, |
34 | private videoCaptionService: VideoCaptionService, | 33 | private videoCaptionService: VideoCaptionService |
35 | private i18n: I18n | 34 | ) { |
36 | ) { | ||
37 | super() | 35 | super() |
38 | } | 36 | } |
39 | 37 | ||
@@ -78,7 +76,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
78 | canDeactivate (): { canDeactivate: boolean, text?: string } { | 76 | canDeactivate (): { canDeactivate: boolean, text?: string } { |
79 | if (this.updateDone === true) return { canDeactivate: true } | 77 | if (this.updateDone === true) return { canDeactivate: true } |
80 | 78 | ||
81 | const text = this.i18n('You have unsaved changes! If you leave, your changes will be lost.') | 79 | const text = $localize`You have unsaved changes! If you leave, your changes will be lost.` |
82 | 80 | ||
83 | for (const caption of this.videoCaptions) { | 81 | for (const caption of this.videoCaptions) { |
84 | if (caption.action) return { canDeactivate: false, text } | 82 | if (caption.action) return { canDeactivate: false, text } |
@@ -115,7 +113,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
115 | this.updateDone = true | 113 | this.updateDone = true |
116 | this.isUpdatingVideo = false | 114 | this.isUpdatingVideo = false |
117 | this.loadingBar.useRef().complete() | 115 | this.loadingBar.useRef().complete() |
118 | this.notifier.success(this.i18n('Video updated.')) | 116 | this.notifier.success($localize`Video updated.`) |
119 | this.router.navigate([ '/videos/watch', this.video.uuid ]) | 117 | this.router.navigate([ '/videos/watch', this.video.uuid ]) |
120 | }, | 118 | }, |
121 | 119 | ||