aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts
diff options
context:
space:
mode:
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.ts11
1 files changed, 8 insertions, 3 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 c82bb39c8..9b5a12d18 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
@@ -11,6 +11,7 @@ import {
11} from '@app/shared/forms/form-validators/video-channel' 11} from '@app/shared/forms/form-validators/video-channel'
12import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 12import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
13import { AuthService } from '@app/core' 13import { AuthService } from '@app/core'
14import { I18n } from '@ngx-translate/i18n-polyfill'
14 15
15@Component({ 16@Component({
16 selector: 'my-account-video-channel-create', 17 selector: 'my-account-video-channel-create',
@@ -37,7 +38,8 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
37 private notificationsService: NotificationsService, 38 private notificationsService: NotificationsService,
38 private router: Router, 39 private router: Router,
39 private formBuilder: FormBuilder, 40 private formBuilder: FormBuilder,
40 private videoChannelService: VideoChannelService 41 private videoChannelService: VideoChannelService,
42 private i18n: I18n
41 ) { 43 ) {
42 super() 44 super()
43 } 45 }
@@ -69,7 +71,10 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
69 this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe( 71 this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe(
70 () => { 72 () => {
71 this.authService.refreshUserInformation() 73 this.authService.refreshUserInformation()
72 this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`) 74 this.notificationsService.success(
75 this.i18n('Success'),
76 this.i18n('Video channel {{ videoChannelName }} created.', { videoChannelName: videoChannelCreate.displayName })
77 )
73 this.router.navigate([ '/my-account', 'video-channels' ]) 78 this.router.navigate([ '/my-account', 'video-channels' ])
74 }, 79 },
75 80
@@ -82,6 +87,6 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE
82 } 87 }
83 88
84 getFormButtonTitle () { 89 getFormButtonTitle () {
85 return 'Create' 90 return this.i18n('Create')
86 } 91 }
87} 92}