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
@ -68,7 +68,7 @@ var Client = class {
|
||||
BOLT_DBUS_CLIENT_IFACE,
|
||||
null);
|
||||
} catch (e) {
|
||||
log('error creating bolt proxy: %s'.format(e.message));
|
||||
log(`error creating bolt proxy: ${e.message}`);
|
||||
return;
|
||||
}
|
||||
this._propsChangedId = this._proxy.connect('g-properties-changed', this._onPropertiesChanged.bind(this));
|
||||
@ -248,7 +248,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
try {
|
||||
this._perm = await Polkit.Permission.new('org.freedesktop.bolt.enroll', null, null);
|
||||
} catch (e) {
|
||||
log('Failed to get PolKit permission: %s'.format(e.toString()));
|
||||
log(`Failed to get PolKit permission: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,8 +314,7 @@ class Indicator extends PanelMenu.SystemIndicator {
|
||||
let auth = unlocked && allowed;
|
||||
policy[0] = auth;
|
||||
|
||||
log('thunderbolt: [%s] auto enrollment: %s (allowed: %s)'.format(
|
||||
device.Name, auth ? 'yes' : 'no', allowed ? 'yes' : 'no'));
|
||||
log(`thunderbolt: [${device.Name}] auto enrollment: ${auth ? 'yes' : 'no'} (allowed: ${allowed ? 'yes' : 'no'})`);
|
||||
|
||||
if (auth)
|
||||
return; /* we are done */
|
||||
|
Reference in New Issue
Block a user