diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:01:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:02:27 +0200 |
commit | e309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch) | |
tree | 41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts | |
parent | d4d5853e65e584ca51c718f8df590b987f981047 (diff) | |
download | PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.gz PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.zst PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.zip |
Add form validator translations
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 | 13 |
1 files changed, 5 insertions, 8 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 e38eaae9c..c0eaa4763 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,15 +3,11 @@ import { Router } from '@angular/router' | |||
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' | 4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' |
5 | import { VideoChannelCreate } from '../../../../../shared/models/videos' | 5 | import { VideoChannelCreate } from '../../../../../shared/models/videos' |
6 | import { | ||
7 | VIDEO_CHANNEL_DESCRIPTION, | ||
8 | VIDEO_CHANNEL_DISPLAY_NAME, | ||
9 | VIDEO_CHANNEL_SUPPORT | ||
10 | } from '@app/shared/forms/form-validators/video-channel' | ||
11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 6 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
12 | import { AuthService } from '@app/core' | 7 | import { AuthService } from '@app/core' |
13 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
14 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 9 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
10 | import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' | ||
15 | 11 | ||
16 | @Component({ | 12 | @Component({ |
17 | selector: 'my-account-video-channel-create', | 13 | selector: 'my-account-video-channel-create', |
@@ -24,6 +20,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
24 | constructor ( | 20 | constructor ( |
25 | protected formValidatorService: FormValidatorService, | 21 | protected formValidatorService: FormValidatorService, |
26 | private authService: AuthService, | 22 | private authService: AuthService, |
23 | private videoChannelValidatorsService: VideoChannelValidatorsService, | ||
27 | private notificationsService: NotificationsService, | 24 | private notificationsService: NotificationsService, |
28 | private router: Router, | 25 | private router: Router, |
29 | private videoChannelService: VideoChannelService, | 26 | private videoChannelService: VideoChannelService, |
@@ -34,9 +31,9 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
34 | 31 | ||
35 | ngOnInit () { | 32 | ngOnInit () { |
36 | this.buildForm({ | 33 | this.buildForm({ |
37 | 'display-name': VIDEO_CHANNEL_DISPLAY_NAME, | 34 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
38 | description: VIDEO_CHANNEL_DESCRIPTION, | 35 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
39 | support: VIDEO_CHANNEL_SUPPORT | 36 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT |
40 | }) | 37 | }) |
41 | } | 38 | } |
42 | 39 | ||