]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/plugins/plugin.service.ts
Fix socket io lazy loading
[github/Chocobozzz/PeerTube.git] / client / src / app / core / plugins / plugin.service.ts
index bb9125fe1ff2abfc107deaa511c99aff2c49e02f..dadc2a41d3d9a719e2f35cacb4bed93d19bac212 100644 (file)
@@ -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])
     }