aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-29 14:08:07 +0100
committerChocobozzz <me@florianbigard.com>2021-12-29 14:08:07 +0100
commitfb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb (patch)
tree251e39490e83b6a0e40c25871188628e62819fa8 /client/src/app/+videos
parent2accfdd8ecd092de7e8c71fbd1235e139ad29832 (diff)
downloadPeerTube-fb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb.tar.gz
PeerTube-fb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb.tar.zst
PeerTube-fb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb.zip
Translate plugin settings
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index a03005bcb..8ce36121d 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -22,6 +22,7 @@ import {
22import { FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms' 22import { FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms'
23import { InstanceService } from '@app/shared/shared-instance' 23import { InstanceService } from '@app/shared/shared-instance'
24import { VideoCaptionEdit, VideoEdit, VideoService } from '@app/shared/shared-main' 24import { VideoCaptionEdit, VideoEdit, VideoService } from '@app/shared/shared-main'
25import { PluginInfo } from '@root-helpers/plugins-manager'
25import { 26import {
26 HTMLServerConfig, 27 HTMLServerConfig,
27 LiveVideo, 28 LiveVideo,
@@ -37,6 +38,7 @@ import { VideoEditType } from './video-edit.type'
37 38
38type VideoLanguages = VideoConstant<string> & { group?: string } 39type VideoLanguages = VideoConstant<string> & { group?: string }
39type PluginField = { 40type PluginField = {
41 pluginInfo: PluginInfo
40 commonOptions: RegisterClientFormFieldOptions 42 commonOptions: RegisterClientFormFieldOptions
41 videoFormOptions: RegisterClientVideoFieldOptions 43 videoFormOptions: RegisterClientVideoFieldOptions
42} 44}
@@ -294,7 +296,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
294 }) 296 })
295 } 297 }
296 298
297 private updatePluginFields () { 299 private async updatePluginFields () {
298 this.pluginFields = this.pluginService.getRegisteredVideoFormFields(this.type) 300 this.pluginFields = this.pluginService.getRegisteredVideoFormFields(this.type)
299 301
300 if (this.pluginFields.length === 0) return 302 if (this.pluginFields.length === 0) return
@@ -305,6 +307,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
305 const pluginDefaults: any = {} 307 const pluginDefaults: any = {}
306 308
307 for (const setting of this.pluginFields) { 309 for (const setting of this.pluginFields) {
310 await this.pluginService.translateSetting(setting.pluginInfo.plugin.npmName, setting.commonOptions)
311
308 const validator = (control: AbstractControl): ValidationErrors | null => { 312 const validator = (control: AbstractControl): ValidationErrors | null => {
309 if (!setting.commonOptions.error) return null 313 if (!setting.commonOptions.error) return null
310 314