From 0628157fe9662fdb2b6fa658b8b53fe684c013ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 Dec 2021 14:44:58 +0100 Subject: Move uuid stuff in extra utils Since it requires an external dependency --- client/src/app/core/plugins/plugin.service.ts | 3 ++- client/src/app/shared/shared-forms/dynamic-form-field.component.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'client') 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' import { getDevLocale, isOnDevLocale } from '@app/helpers' import { CustomModalComponent } from '@app/modal/custom-modal.component' import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' +import { getKeys } from '@shared/core-utils' import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' import { ClientHook, @@ -134,7 +135,7 @@ export class PluginService implements ClientHook { } async translateSetting (npmName: string, setting: RegisterClientFormFieldOptions) { - for (const key of [ 'label', 'html', 'descriptionHTML' ]) { + for (const key of getKeys(setting, [ 'label', 'html', 'descriptionHTML' ])) { if (setting[key]) setting[key] = await this.translateBy(npmName, setting[key]) } 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 @@ -
+