Skip to content

Commit c94922e

Browse files
nnaydenowilhan007
authored andcommitted
fix(framework): fix i18n bundle storage (#10924)
Fixes: #11497
1 parent f0241f2 commit c94922e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/base/src/UI5Element.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,8 +1312,8 @@ abstract class UI5Element extends HTMLElement {
13121312
]);
13131313
const [i18nBundles] = result;
13141314
Object.entries(this.getMetadata().getI18n()).forEach((pair, index) => {
1315-
const propertyName = pair[0];
1316-
this.i18nBundleStorage[propertyName] = i18nBundles[index];
1315+
const bundleName = pair[1].bundleName;
1316+
this.i18nBundleStorage[bundleName] = i18nBundles[index];
13171317
});
13181318
this.asyncFinished = true;
13191319
};

packages/base/src/decorators/i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const i18n = (bundleName: string): i18nDecorator => {
2323

2424
Object.defineProperty(target, propertyName, {
2525
get() {
26-
return target.i18nBundles[propertyName];
26+
return target.i18nBundles[bundleName];
2727
},
2828
set() {},
2929
});

0 commit comments

Comments
 (0)