[virt-tools-list] [virt-manager PATCH] Avoid string puzzle

Pino Toscano ptoscano at redhat.com
Mon Jan 6 13:29:00 UTC 2020


Do not join two parts of sentences together, because it is problematic
to translate. Instead, use a different sentence depending on the
condition.

Fixes commit d52c9d1ffa2d8c204fbb2a714f89b007fa6227ec.

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
 virtManager/delete.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/virtManager/delete.py b/virtManager/delete.py
index d4b233fb..2a1f5587 100644
--- a/virtManager/delete.py
+++ b/virtManager/delete.py
@@ -187,11 +187,13 @@ class vmmDeleteDialog(vmmGObjectUI):
         if self.disk:
             title = _("Deleting the selected storage")
             text = _('%s') % self.disk.target
+        elif devs:
+            title = _("Deleting virtual machine '%s' and selected storage "
+                      "(this may take a while)") % self.vm.get_name()
+            text = title
         else:
             title = _("Deleting virtual machine '%s'") % self.vm.get_name()
             text = title
-            if devs:
-                text = title + _(" and selected storage (this may take a while)")
 
 
         progWin = vmmAsyncJob(self._async_delete, [self.vm, devs],
-- 
2.24.1




More information about the virt-tools-list mailing list