]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-forms/form-validators/video-captions-validators.service.ts
Migrate to $localize
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-forms / form-validators / video-captions-validators.service.ts
CommitLineData
40e87e9e 1import { Injectable } from '@angular/core'
66357162 2import { Validators } from '@angular/forms'
67ed6552 3import { BuildFormValidator } from './form-validator.service'
40e87e9e
C
4
5@Injectable()
6export class VideoCaptionsValidatorsService {
7 readonly VIDEO_CAPTION_LANGUAGE: BuildFormValidator
8 readonly VIDEO_CAPTION_FILE: BuildFormValidator
9
66357162 10 constructor () {
40e87e9e
C
11
12 this.VIDEO_CAPTION_LANGUAGE = {
13 VALIDATORS: [ Validators.required ],
14 MESSAGES: {
66357162 15 'required': $localize`Video caption language is required.`
40e87e9e
C
16 }
17 }
18
19 this.VIDEO_CAPTION_FILE = {
20 VALIDATORS: [ Validators.required ],
21 MESSAGES: {
66357162 22 'required': $localize`Video caption file is required.`
40e87e9e
C
23 }
24 }
25 }
26}