aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r--server/lib/plugins/plugin-manager.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index f3766ffa8..ae05af721 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -23,6 +23,7 @@ import { PluginLibrary, RegisterServerAuthExternalOptions, RegisterServerAuthPas
23import { ClientHtml } from '../client-html' 23import { ClientHtml } from '../client-html'
24import { RegisterHelpers } from './register-helpers' 24import { RegisterHelpers } from './register-helpers'
25import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' 25import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn'
26import { getCompleteLocale } from '@shared/core-utils'
26 27
27export interface RegisteredPlugin { 28export interface RegisteredPlugin {
28 npmName: string 29 npmName: string
@@ -444,10 +445,12 @@ export class PluginManager implements ServerHook {
444 const path = translationPaths[locale] 445 const path = translationPaths[locale]
445 const json = await readJSON(join(this.getPluginPath(plugin.name, plugin.type), path)) 446 const json = await readJSON(join(this.getPluginPath(plugin.name, plugin.type), path))
446 447
447 if (!this.translations[locale]) this.translations[locale] = {} 448 const completeLocale = getCompleteLocale(locale)
448 this.translations[locale][npmName] = json
449 449
450 logger.info('Added locale %s of plugin %s.', locale, npmName) 450 if (!this.translations[completeLocale]) this.translations[completeLocale] = {}
451 this.translations[completeLocale][npmName] = json
452
453 logger.info('Added locale %s of plugin %s.', completeLocale, npmName)
451 } 454 }
452 } 455 }
453 456