i18n: fix string puzzles in error messages

Do not split the error messages and the error details, but rather use a
single string with proper placeholders. This avoids string puzzles.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
Pino Toscano
2020-07-14 11:23:57 -04:00
committed by Cole Robinson
parent ed836c7138
commit 71f034d6b6
15 changed files with 70 additions and 40 deletions
+1 -1
View File
@@ -736,7 +736,7 @@ class vmmConsolePages(vmmGObjectUI):
except Exception as e:
log.exception("Error connection to graphical console")
self._activate_unavailable_page(
_("Error connecting to graphical console") + ":\n%s" % e)
_("Error connecting to graphical console:\n%s") % e)
def _set_credentials(self, src_ignore=None):
passwd = self.widget("console-auth-password")
+4 -2
View File
@@ -461,8 +461,10 @@ class VNCViewer(Viewer):
self._sockfd = sock
except Exception as e:
raise RuntimeError(
(_("Error opening socket path '%s'") % self._ginfo.gsocket) +
(": %s" % e))
_("Error opening socket path '%(path)s': %(error)s") % {
"path": self._ginfo.gsocket,
"error": e,
})
fd = self._sockfd.fileno()
if fd < 0: