fix: locale resource name

This commit is contained in:
chenos 2023-12-22 18:49:58 +08:00
parent 3b5240cc0a
commit 2e038a651b

View File

@ -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) {