diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/plugins/plugin-manager.ts | 9 |
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 | |||
23 | import { ClientHtml } from '../client-html' | 23 | import { ClientHtml } from '../client-html' |
24 | import { RegisterHelpers } from './register-helpers' | 24 | import { RegisterHelpers } from './register-helpers' |
25 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' | 25 | import { installNpmPlugin, installNpmPluginFromDisk, removeNpmPlugin } from './yarn' |
26 | import { getCompleteLocale } from '@shared/core-utils' | ||
26 | 27 | ||
27 | export interface RegisteredPlugin { | 28 | export 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 | ||