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
@ -169,7 +169,7 @@ function findAppFromInhibitor(inhibitor) {
|
||||
} catch (e) {
|
||||
// XXX -- sometimes JIT inhibitors generated by gnome-session
|
||||
// get removed too soon. Don't fail in this case.
|
||||
log('gnome-session gave us a dead inhibitor: %s'.format(inhibitor.get_object_path()));
|
||||
log(`gnome-session gave us a dead inhibitor: ${inhibitor.get_object_path()}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._updatesPermission = await Polkit.Permission.new(
|
||||
'org.freedesktop.packagekit.trigger-offline-update', null, null);
|
||||
} catch (e) {
|
||||
log('No permission to trigger offline updates: %s'.format(e.toString()));
|
||||
log(`No permission to trigger offline updates: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -662,7 +662,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
if (!sessionId) {
|
||||
this._loginManager.getCurrentSessionProxy(currentSessionProxy => {
|
||||
sessionId = currentSessionProxy.Id;
|
||||
log('endSessionDialog: No XDG_SESSION_ID, fetched from logind: %d'.format(sessionId));
|
||||
log(`endSessionDialog: No XDG_SESSION_ID, fetched from logind: ${sessionId}`);
|
||||
});
|
||||
}
|
||||
|
||||
@ -731,7 +731,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._updateInfo = await this._getUpdateInfo();
|
||||
} catch (e) {
|
||||
if (this._pkOfflineProxy !== null)
|
||||
log('Failed to get update info from PackageKit: %s'.format(e.message));
|
||||
log(`Failed to get update info from PackageKit: ${e.message}`);
|
||||
|
||||
this._updateInfo = {
|
||||
UpdateTriggered: false,
|
||||
|
Reference in New Issue
Block a user