[pybliographer] scripts: Use plurals on pybliocheck
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pybliographer] scripts: Use plurals on pybliocheck
- Date: Thu, 29 Mar 2018 03:40:15 +0000 (UTC)
commit 31d2307e2a9c5930f3eb6932c1ee20ac14750bf5
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Wed Mar 28 20:00:57 2018 -0300
scripts: Use plurals on pybliocheck
scripts/pybliocheck.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/scripts/pybliocheck.py b/scripts/pybliocheck.py
index f081a4e..343a480 100644
--- a/scripts/pybliocheck.py
+++ b/scripts/pybliocheck.py
@@ -25,6 +25,9 @@ import os
import sys
import string
+from gettext import gettext as _
+from gettext import ngettext as _n
+
from Pyblio import Config, Exceptions
from Pyblio.Open import bibopen
@@ -62,7 +65,10 @@ for dir in sys.argv [2:]:
# try to open the database
try:
b = bibopen (f)
- print (_(u"file “%s” is ok [%d entries]") % (f, len (b))).encode (charset)
+ print (_n(u"file “%s” is ok [%d entry]",
+ u"file “%s” is ok [%d entries]",
+ len(b))
+ % (f, len (b))).encode(charset)
except (Exceptions.ParserError, KeyError), err:
broken.append (str (err))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]