From fb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 Dec 2021 14:08:07 +0100 Subject: Translate plugin settings --- .../plugin-show-installed.component.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'client/src/app/+admin') diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts index 402bef1ea..1a40f6c65 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts @@ -126,25 +126,9 @@ export class PluginShowInstalledComponent extends FormReactive implements OnInit private async translateSettings (settings: RegisterServerSettingOptions[]) { for (const setting of settings) { - for (const key of [ 'label', 'html', 'descriptionHTML' ]) { - if (setting[key]) setting[key] = await this.pluginService.translateBy(this.npmName, setting[key]) - } - - if (Array.isArray(setting.options)) { - const newOptions = [] - - for (const o of setting.options) { - newOptions.push({ - value: o.value, - label: await this.pluginService.translateBy(this.npmName, o.label) - }) - } - - setting.options = newOptions - } + await this.pluginService.translateSetting(this.npmName, setting) } return settings } - } -- cgit v1.2.3