diff options
Diffstat (limited to 'client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts')
-rw-r--r-- | client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts index 039c389e4..5c438c3bf 100644 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts | |||
@@ -3,7 +3,6 @@ import { Router } from '@angular/router' | |||
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' | 4 | import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' |
5 | import { VideoChannelService } from '@app/shared/shared-main' | 5 | import { VideoChannelService } from '@app/shared/shared-main' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { VideoChannelCreate } from '@shared/models' | 6 | import { VideoChannelCreate } from '@shared/models' |
8 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' | 7 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' |
9 | 8 | ||
@@ -21,9 +20,8 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
21 | private videoChannelValidatorsService: VideoChannelValidatorsService, | 20 | private videoChannelValidatorsService: VideoChannelValidatorsService, |
22 | private notifier: Notifier, | 21 | private notifier: Notifier, |
23 | private router: Router, | 22 | private router: Router, |
24 | private videoChannelService: VideoChannelService, | 23 | private videoChannelService: VideoChannelService |
25 | private i18n: I18n | 24 | ) { |
26 | ) { | ||
27 | super() | 25 | super() |
28 | } | 26 | } |
29 | 27 | ||
@@ -55,15 +53,13 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
55 | () => { | 53 | () => { |
56 | this.authService.refreshUserInformation() | 54 | this.authService.refreshUserInformation() |
57 | 55 | ||
58 | this.notifier.success( | 56 | this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`) |
59 | this.i18n('Video channel {{videoChannelName}} created.', { videoChannelName: videoChannelCreate.displayName }) | ||
60 | ) | ||
61 | this.router.navigate([ '/my-account', 'video-channels' ]) | 57 | this.router.navigate([ '/my-account', 'video-channels' ]) |
62 | }, | 58 | }, |
63 | 59 | ||
64 | err => { | 60 | err => { |
65 | if (err.status === 409) { | 61 | if (err.status === 409) { |
66 | this.error = this.i18n('This name already exists on this instance.') | 62 | this.error = $localize`This name already exists on this instance.` |
67 | return | 63 | return |
68 | } | 64 | } |
69 | 65 | ||
@@ -77,6 +73,6 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
77 | } | 73 | } |
78 | 74 | ||
79 | getFormButtonTitle () { | 75 | getFormButtonTitle () { |
80 | return this.i18n('Create') | 76 | return $localize`Create` |
81 | } | 77 | } |
82 | } | 78 | } |