[virt-manager PATCH 7/9] i18n: use plural forms where needed
Pino Toscano
ptoscano at redhat.com
Thu Sep 17 06:44:04 UTC 2020
In particular, when the number of objects depends on a variable.
Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
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
More information about the virt-tools-list
mailing list