cleanup: Prefer template strings
Template strings are much nicer than string concatenation, so use them where possible; this excludes translatable strings and any strings containing '/' (until we can depend on gettext >= 0.20[0]). [0] https://savannah.gnu.org/bugs/?50920 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/612
This commit is contained in:

committed by
Florian Müllner

parent
46874eed05
commit
0d035a4e53
@ -254,7 +254,7 @@ function _initializeUI() {
|
||||
let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
|
||||
if (perfModuleName) {
|
||||
let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
|
||||
let module = eval('imports.perf.' + perfModuleName + ';');
|
||||
let module = eval(`imports.perf.${perfModuleName};`);
|
||||
Scripting.runPerfScript(module, perfOutput);
|
||||
}
|
||||
});
|
||||
@ -390,9 +390,9 @@ function notify(msg, details) {
|
||||
function notifyError(msg, details) {
|
||||
// Also print to stderr so it's logged somewhere
|
||||
if (details)
|
||||
log('error: ' + msg + ': ' + details);
|
||||
log(`error: ${msg}: ${details}`);
|
||||
else
|
||||
log('error: ' + msg);
|
||||
log(`error: ${msg}`);
|
||||
|
||||
notify(msg, details);
|
||||
}
|
||||
|
Reference in New Issue
Block a user