[virt-manager PATCH 7/9] i18n: use plural forms where needed

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

 



In particular, when the number of objects depends on a variable.

Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
---
 virtinst/virtxml.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/virtinst/virtxml.py b/virtinst/virtxml.py
index dd79fee0..bd2b4282 100644
--- a/virtinst/virtxml.py
+++ b/virtinst/virtxml.py
@@ -84,8 +84,11 @@ def _find_objects_to_edit(guest, action_name, editval, parserclass):
             fail(_("No --%s objects found in the XML") %
                 parserclass.cli_arg_name)
         if len(objlist) < abs(idx):
-            fail(_("'--edit %(number)s' requested but there's only %(max)s "
-                   "--%(type)s object in the XML") %
+            fail(ngettext("'--edit %(number)s' requested but there's only "
+                          "%(max)s --%(type)s object in the XML",
+                          "'--edit %(number)s' requested but there are only "
+                          "%(max)s --%(type)s objects in the XML",
+                          len(objlist)) %
                 {"number": idx, "max": len(objlist),
                  "type": parserclass.cli_arg_name})
 
-- 
2.26.2




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux