diff --git a/packages/core/server/src/locale/locale.ts b/packages/core/server/src/locale/locale.ts index 77959d1bc..457c56f34 100644 --- a/packages/core/server/src/locale/locale.ts +++ b/packages/core/server/src/locale/locale.ts @@ -79,7 +79,7 @@ export class Locale { if (!p) { continue; } - const packageName = p.options?.packageName; + const packageName: string = p.options?.packageName; if (!packageName) { continue; } @@ -88,8 +88,8 @@ export class Locale { const res = getResource(packageName, lang); if (res) { resources[packageName] = { ...res }; - if (name !== packageName) { - resources[name] = { ...res }; + if (packageName.includes('@nocobase/plugin-')) { + resources[packageName.substring('@nocobase/plugin-'.length)] = { ...res }; } } } catch (err) {