js: Use templates for non-translatable strings
This reverts commit 9d941f8202
and replaces all additional
instances of .format() that have been added since.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
This commit is contained in:

committed by
Marge Bot

parent
29dfde5a4a
commit
a1dd1b25d8
@ -26,7 +26,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
schema_id: 'org.gnome.desktop.interface',
|
||||
});
|
||||
this._desktopSettings.connect(
|
||||
'changed::%s'.format(SHOW_BATTERY_PERCENTAGE), this._sync.bind(this));
|
||||
`changed::${SHOW_BATTERY_PERCENTAGE}`, this._sync.bind(this));
|
||||
|
||||
this._indicator = this._addIndicator();
|
||||
this._percentageLabel = new St.Label({
|
||||
@ -125,7 +125,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
(this._proxy.State === UPower.DeviceState.CHARGING && fillLevel === 100);
|
||||
const icon = charged
|
||||
? 'battery-level-100-charged-symbolic'
|
||||
: 'battery-level-%d%s-symbolic'.format(fillLevel, chargingState);
|
||||
: `battery-level-${fillLevel}${chargingState}-symbolic`;
|
||||
|
||||
// Make sure we fall back to fallback-icon-name and not GThemedIcon's
|
||||
// default fallbacks
|
||||
|
Reference in New Issue
Block a user