Use shortcut mw.msg( ... ) instead of mw.message( ... ).text()

Change-Id: I3b84e3a19eda44642d5f4993a1e30dda569a4d08
This commit is contained in:
Fomafix 2022-11-05 22:13:42 +00:00
parent 5bd08e95ee
commit 0bd7114c90
3 changed files with 4 additions and 4 deletions

View file

@ -72,9 +72,9 @@ NotificationBadge.prototype.setCount = function ( count ) {
count = 100; count = 100;
} }
this.options.notificationCountRaw = count; this.options.notificationCountRaw = count;
this.options.notificationCountString = mw.message( 'echo-badge-count', this.options.notificationCountString = mw.msg( 'echo-badge-count',
mw.language.convertNumber( count ) mw.language.convertNumber( count )
).text(); );
this.render(); this.render();
}; };

View file

@ -243,7 +243,7 @@
unreadCount = this.manager.getUnreadCounter().getCount(); unreadCount = this.manager.getUnreadCounter().getCount();
cappedUnreadCount = this.manager.getUnreadCounter().getCappedNotificationCount( unreadCount ); cappedUnreadCount = this.manager.getUnreadCounter().getCappedNotificationCount( unreadCount );
badgeLabel = mw.message( 'echo-badge-count', mw.language.convertNumber( cappedUnreadCount ) ).text(); badgeLabel = mw.msg( 'echo-badge-count', mw.language.convertNumber( cappedUnreadCount ) );
this.badgeButton.setLabel( badgeLabel ); this.badgeButton.setLabel( badgeLabel );
this.badgeButton.setCount( unreadCount, badgeLabel ); this.badgeButton.setCount( unreadCount, badgeLabel );

View file

@ -44,7 +44,7 @@
this.populateDataFromModel(); this.populateDataFromModel();
this.$element this.$element
.addClass( 'mw-echo-ui-pageFilterWidget' ) .addClass( 'mw-echo-ui-pageFilterWidget' )
.attr( 'aria-label', mw.message( 'echo-specialpage-pagefilterwidget-aria-label' ).text() ); .attr( 'aria-label', mw.msg( 'echo-specialpage-pagefilterwidget-aria-label' ) );
}; };
/* Initialization */ /* Initialization */