fix(localization): compatibility with plugin package names as namespaces (#3234)

This commit is contained in:
YANG QIA 2023-12-19 13:51:26 +08:00 committed by GitHub
parent 4be8812912
commit a6c23d58a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,8 +87,11 @@ export class Locale {
// this.app.setMaintainingMessage(`load [${packageName}] locale resource `);
const res = getResource(packageName, lang);
if (res) {
resources[packageName] = { ...res };
if (name !== packageName) {
resources[name] = { ...res };
}
}
} catch (err) {
// empty
}