[virt-manager PATCH 12/16] i18n: globally install also the ngettext function

Pino Toscano ptoscano at redhat.com
Tue Jul 14 07:41:56 UTC 2020


It will be used to translate strings with plural forms.

Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
 virtinst/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virtinst/__init__.py b/virtinst/__init__.py
index f6c9899b..02e852c1 100644
--- a/virtinst/__init__.py
+++ b/virtinst/__init__.py
@@ -21,7 +21,8 @@ def _setup_i18n():
         # Can happen if user passed a bogus LANG
         pass
 
-    gettext.install("virt-manager", BuildConfig.gettext_dir)
+    gettext.install("virt-manager", BuildConfig.gettext_dir,
+                    names=["ngettext"])
     gettext.bindtextdomain("virt-manager", BuildConfig.gettext_dir)
 
 
-- 
2.26.2




More information about the virt-tools-list mailing list