[gnome-shell] screenshot: Replace template strings with .format()



commit 461c65c93b2918de081b19528e7c0c95e649739c
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Feb 11 18:30:10 2021 +0100

    screenshot: Replace template strings with .format()
    
    CI will complain when we add screenshot.js to the POTFILES in the next
    commit because gettext doesn't like template strings, so make CI happy
    and switch to .format() instead.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>

 js/ui/screenshot.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index f10c68f386..1c724f0bab 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -90,11 +90,11 @@ var ScreenshotService = class {
             return null;
 
         yield Gio.File.new_for_path(
-            GLib.build_filenamev([path, `${filename}.png`]));
+            GLib.build_filenamev([path, '%s.png'.format(filename)]));
 
         for (let idx = 1; ; idx++) {
             yield Gio.File.new_for_path(
-                GLib.build_filenamev([path, `${filename}-${idx}.png`]));
+                GLib.build_filenamev([path, '%s-%s.png'.format(filename, idx)]));
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]