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-update.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-update.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.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-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts index eda03374a..1510c5015 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts | |||
@@ -3,17 +3,13 @@ import { ActivatedRoute, 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 { VideoChannelUpdate } from '../../../../../shared/models/videos' | 5 | import { VideoChannelUpdate } 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 { Subscription } from 'rxjs' | 7 | import { Subscription } from 'rxjs' |
13 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 8 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
14 | import { AuthService } from '@app/core' | 9 | import { AuthService } from '@app/core' |
15 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
16 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 11 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
12 | import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' | ||
17 | 13 | ||
18 | @Component({ | 14 | @Component({ |
19 | selector: 'my-account-video-channel-update', | 15 | selector: 'my-account-video-channel-update', |
@@ -29,6 +25,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
29 | constructor ( | 25 | constructor ( |
30 | protected formValidatorService: FormValidatorService, | 26 | protected formValidatorService: FormValidatorService, |
31 | private authService: AuthService, | 27 | private authService: AuthService, |
28 | private videoChannelValidatorsService: VideoChannelValidatorsService, | ||
32 | private notificationsService: NotificationsService, | 29 | private notificationsService: NotificationsService, |
33 | private router: Router, | 30 | private router: Router, |
34 | private route: ActivatedRoute, | 31 | private route: ActivatedRoute, |
@@ -40,9 +37,9 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
40 | 37 | ||
41 | ngOnInit () { | 38 | ngOnInit () { |
42 | this.buildForm({ | 39 | this.buildForm({ |
43 | 'display-name': VIDEO_CHANNEL_DISPLAY_NAME, | 40 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
44 | description: VIDEO_CHANNEL_DESCRIPTION, | 41 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
45 | support: VIDEO_CHANNEL_SUPPORT | 42 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT |
46 | }) | 43 | }) |
47 | 44 | ||
48 | this.paramsSub = this.route.params.subscribe(routeParams => { | 45 | this.paramsSub = this.route.params.subscribe(routeParams => { |