fix: locale resource name
This commit is contained in:
parent
3b5240cc0a
commit
2e038a651b
@ -79,7 +79,7 @@ export class Locale {
|
|||||||
if (!p) {
|
if (!p) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const packageName = p.options?.packageName;
|
const packageName: string = p.options?.packageName;
|
||||||
if (!packageName) {
|
if (!packageName) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -88,8 +88,8 @@ export class Locale {
|
|||||||
const res = getResource(packageName, lang);
|
const res = getResource(packageName, lang);
|
||||||
if (res) {
|
if (res) {
|
||||||
resources[packageName] = { ...res };
|
resources[packageName] = { ...res };
|
||||||
if (name !== packageName) {
|
if (packageName.includes('@nocobase/plugin-')) {
|
||||||
resources[name] = { ...res };
|
resources[packageName.substring('@nocobase/plugin-'.length)] = { ...res };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user