diff options
author | Florian Müllner <fmuellner@gnome.org> | 2022-02-07 15:14:06 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-02-12 12:29:52 +0000 |
commit | a1dd1b25d8f78d3037d553010f6dee792ad4bd20 (patch) | |
tree | e4e5c8715f94c274266bf5aa64f3578581c23402 /subprojects | |
parent | 29dfde5a4a062ac76d157bf01cce51bb7d20425c (diff) | |
download | gnome-shell-a1dd1b25d8f78d3037d553010f6dee792ad4bd20.tar.gz |
js: Use templates for non-translatable strings
This reverts commit 9d941f8202125fa and replaces all additional
instances of .format() that have been added since.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
Diffstat (limited to 'subprojects')
-rw-r--r-- | subprojects/extensions-app/js/main.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subprojects/extensions-app/js/main.js b/subprojects/extensions-app/js/main.js index 09047a939..c32707b61 100644 --- a/subprojects/extensions-app/js/main.js +++ b/subprojects/extensions-app/js/main.js @@ -18,14 +18,14 @@ Gio._promisify(Gio.DBusConnection.prototype, 'call'); Gio._promisify(Shew.WindowExporter.prototype, 'export'); function loadInterfaceXML(iface) { - const uri = 'resource:///org/gnome/Extensions/dbus-interfaces/%s.xml'.format(iface); + const uri = `resource:///org/gnome/Extensions/dbus-interfaces/${iface}.xml`; const f = Gio.File.new_for_uri(uri); try { let [ok_, bytes] = f.load_contents(null); return new TextDecoder().decode(bytes); } catch (e) { - log('Failed to load D-Bus interface %s'.format(iface)); + log(`Failed to load D-Bus interface ${iface}`); } return null; @@ -186,7 +186,7 @@ var ExtensionsWindow = GObject.registerClass({ try { this._exportedHandle = await this._exporter.export(); } catch (e) { - log('Failed to export window: %s'.format(e.message)); + log(`Failed to export window: ${e.message}`); } } @@ -278,7 +278,7 @@ var ExtensionsWindow = GObject.registerClass({ this._shellProxy.ListExtensionsRemote(([extensionsMap], e) => { if (e) { if (e instanceof Gio.DBusError) { - log('Failed to connect to shell proxy: %s'.format(e.toString())); + log(`Failed to connect to shell proxy: ${e}`); this._mainStack.visible_child_name = 'noshell'; } else { throw e; @@ -536,7 +536,7 @@ function initEnvironment() { }, logError(s) { - log('ERROR: %s'.format(s)); + log(`ERROR: ${s}`); }, userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']), |