Skip to content

Commit d6b6fa4

Browse files
authored
fix(ui5-li-notification-group, ui5-li-notification): fix i18n bundles usage (#3063)
1 parent 2a01cb4 commit d6b6fa4

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

packages/fiori/src/NotificationListGroupItem.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -167,32 +167,32 @@ class NotificationListGroupItem extends NotificationListItemBase {
167167
}
168168

169169
get overflowBtnAccessibleName() {
170-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_OVERLOW_BTN_TITLE);
170+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_OVERLOW_BTN_TITLE);
171171
}
172172

173173
get closeBtnAccessibleName() {
174-
return this.i18nBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_CLOSE_BTN_TITLE);
174+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_CLOSE_BTN_TITLE);
175175
}
176176

177177
get toggleBtnAccessibleName() {
178178
if (this.collapsed) {
179-
return this.i18nBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TOGGLE_BTN_EXPAND_TITLE);
179+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TOGGLE_BTN_EXPAND_TITLE);
180180
}
181181

182-
return this.i18nBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TOGGLE_BTN_COLLAPSE_TITLE);
182+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TOGGLE_BTN_COLLAPSE_TITLE);
183183
}
184184

185185
get priorityText() {
186186
if (this.priority === Priority.High) {
187-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_HIGH_PRIORITY_TXT);
187+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_HIGH_PRIORITY_TXT);
188188
}
189189

190190
if (this.priority === Priority.Medium) {
191-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_MEDIUM_PRIORITY_TXT);
191+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_MEDIUM_PRIORITY_TXT);
192192
}
193193

194194
if (this.priority === Priority.Low) {
195-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_LOW_PRIORITY_TXT);
195+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_LOW_PRIORITY_TXT);
196196
}
197197

198198
return "";
@@ -204,18 +204,18 @@ class NotificationListGroupItem extends NotificationListItemBase {
204204

205205
get readText() {
206206
if (this.read) {
207-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_READ);
207+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_READ);
208208
}
209209

210-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_UNREAD);
210+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_UNREAD);
211211
}
212212

213213
get groupText() {
214-
return this.i18nBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TXT);
214+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_TXT);
215215
}
216216

217217
get counterText() {
218-
const text = this.i18nBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_COUNTER_TXT);
218+
const text = this.i18nFioriBundle.getText(NOTIFICATION_LIST_GROUP_ITEM_COUNTER_TXT);
219219
return this.showCounter ? `${text} ${this.itemsCount}` : "";
220220
}
221221

packages/fiori/src/NotificationListItem.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,18 @@ class NotificationListItem extends NotificationListItemBase {
222222

223223
get showMoreText() {
224224
if (this._showMorePressed) {
225-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_SHOW_LESS);
225+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_SHOW_LESS);
226226
}
227227

228-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_SHOW_MORE);
228+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_SHOW_MORE);
229229
}
230230

231231
get overflowBtnAccessibleName() {
232-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_OVERLOW_BTN_TITLE);
232+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_OVERLOW_BTN_TITLE);
233233
}
234234

235235
get closeBtnAccessibleName() {
236-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_CLOSE_BTN_TITLE);
236+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_CLOSE_BTN_TITLE);
237237
}
238238

239239
get hideShowMore() {
@@ -319,23 +319,23 @@ class NotificationListItem extends NotificationListItemBase {
319319

320320
get priorityText() {
321321
if (this.priority === Priority.High) {
322-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_HIGH_PRIORITY_TXT);
322+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_HIGH_PRIORITY_TXT);
323323
}
324324

325325
if (this.priority === Priority.Medium) {
326-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_MEDIUM_PRIORITY_TXT);
326+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_MEDIUM_PRIORITY_TXT);
327327
}
328328

329329
if (this.priority === Priority.Low) {
330-
return this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_LOW_PRIORITY_TXT);
330+
return this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_LOW_PRIORITY_TXT);
331331
}
332332

333333
return "";
334334
}
335335

336336
get accInvisibleText() {
337-
const notifcationTxt = this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_TXT);
338-
const readTxt = this.read ? this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_READ) : this.i18nBundle.getText(NOTIFICATION_LIST_ITEM_UNREAD);
337+
const notifcationTxt = this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_TXT);
338+
const readTxt = this.read ? this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_READ) : this.i18nFioriBundle.getText(NOTIFICATION_LIST_ITEM_UNREAD);
339339
const priorityText = this.priorityText;
340340

341341
return `${notifcationTxt} ${readTxt} ${priorityText}`;

packages/fiori/src/NotificationListItemBase.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class NotificationListItemBase extends ListItemBase {
124124
constructor() {
125125
super();
126126

127-
this.i18nBundle = getI18nBundle("@ui5/webcomponents-fiori");
127+
this.i18nFioriBundle = getI18nBundle("@ui5/webcomponents-fiori");
128128
}
129129

130130
static get metadata() {

0 commit comments

Comments
 (0)