diff sat_frontends/jp/cmd_avatar.py @ 3568:04283582966f

core, frontends: fix invalid translatable strings. Some f-strings where used in translatable text, this has been fixed by using explicit `format()` call (using a script based on `tokenize`). As tokenize messes with spaces, a reformating tool (`black`) has been applied to some files afterwards.
author Goffi <goffi@goffi.org>
date Mon, 14 Jun 2021 18:35:12 +0200
parents be6d91572633
children 82e616b70a2a
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_avatar.py	Mon Jun 14 12:19:21 2021 +0200
+++ b/sat_frontends/jp/cmd_avatar.py	Mon Jun 14 18:35:12 2021 +0200
@@ -113,7 +113,7 @@
     async def start(self):
         path = self.args.image_path
         if not os.path.exists(path):
-            self.disp(_(f"file {path!r} doesn't exist!"), error=True)
+            self.disp(_("file {path} doesn't exist!").format(path=repr(path)), error=True)
             self.host.quit(C.EXIT_BAD_ARG)
         path = os.path.abspath(path)
         try: