diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 3 |
1 files changed, 2 insertions, 1 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' | |||
11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' | 11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' |
12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' | 12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' |
13 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' | 13 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' |
14 | import { getKeys } from '@shared/core-utils' | ||
14 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' | 15 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' |
15 | import { | 16 | import { |
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 | ||