Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
3567:a240748ed686 | 3568:04283582966f |
---|---|
111 ) | 111 ) |
112 | 112 |
113 async def start(self): | 113 async def start(self): |
114 path = self.args.image_path | 114 path = self.args.image_path |
115 if not os.path.exists(path): | 115 if not os.path.exists(path): |
116 self.disp(_(f"file {path!r} doesn't exist!"), error=True) | 116 self.disp(_("file {path} doesn't exist!").format(path=repr(path)), error=True) |
117 self.host.quit(C.EXIT_BAD_ARG) | 117 self.host.quit(C.EXIT_BAD_ARG) |
118 path = os.path.abspath(path) | 118 path = os.path.abspath(path) |
119 try: | 119 try: |
120 await self.host.bridge.avatarSet(path, self.args.jid, self.profile) | 120 await self.host.bridge.avatarSet(path, self.args.jid, self.profile) |
121 except Exception as e: | 121 except Exception as e: |