aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 15:01:45 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 15:02:27 +0200
commite309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch)
tree41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts
parentd4d5853e65e584ca51c718f8df590b987f981047 (diff)
downloadPeerTube-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.ts13
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'
3import { NotificationsService } from 'angular2-notifications' 3import { NotificationsService } from 'angular2-notifications'
4import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' 4import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
5import { VideoChannelUpdate } from '../../../../../shared/models/videos' 5import { VideoChannelUpdate } from '../../../../../shared/models/videos'
6import {
7 VIDEO_CHANNEL_DESCRIPTION,
8 VIDEO_CHANNEL_DISPLAY_NAME,
9 VIDEO_CHANNEL_SUPPORT
10} from '@app/shared/forms/form-validators/video-channel'
11import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 6import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
12import { Subscription } from 'rxjs' 7import { Subscription } from 'rxjs'
13import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 8import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
14import { AuthService } from '@app/core' 9import { AuthService } from '@app/core'
15import { I18n } from '@ngx-translate/i18n-polyfill' 10import { I18n } from '@ngx-translate/i18n-polyfill'
16import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 11import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
12import { 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 => {