aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/core/plugins/plugin.service.ts3
-rw-r--r--client/src/app/shared/shared-forms/dynamic-form-field.component.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index bb9125fe1..dadc2a41d 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -11,6 +11,7 @@ import { ServerService } from '@app/core/server/server.service'
11import { getDevLocale, isOnDevLocale } from '@app/helpers' 11import { getDevLocale, isOnDevLocale } from '@app/helpers'
12import { CustomModalComponent } from '@app/modal/custom-modal.component' 12import { CustomModalComponent } from '@app/modal/custom-modal.component'
13import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' 13import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager'
14import { getKeys } from '@shared/core-utils'
14import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' 15import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n'
15import { 16import {
16 ClientHook, 17 ClientHook,
@@ -134,7 +135,7 @@ export class PluginService implements ClientHook {
134 } 135 }
135 136
136 async translateSetting (npmName: string, setting: RegisterClientFormFieldOptions) { 137 async translateSetting (npmName: string, setting: RegisterClientFormFieldOptions) {
137 for (const key of [ 'label', 'html', 'descriptionHTML' ]) { 138 for (const key of getKeys(setting, [ 'label', 'html', 'descriptionHTML' ])) {
138 if (setting[key]) setting[key] = await this.translateBy(npmName, setting[key]) 139 if (setting[key]) setting[key] = await this.translateBy(npmName, setting[key])
139 } 140 }
140 141
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.html b/client/src/app/shared/shared-forms/dynamic-form-field.component.html
index c228069b5..2ef61ecfc 100644
--- a/client/src/app/shared/shared-forms/dynamic-form-field.component.html
+++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.html
@@ -1,4 +1,4 @@
1<div [formGroup]="form"> 1<div *ngIf="form" [formGroup]="form">
2 <label *ngIf="setting.label && setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> 2 <label *ngIf="setting.label && setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label>
3 3
4 <my-peertube-checkbox 4 <my-peertube-checkbox