From b090c2ed766f616e77f452617fce847470addc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 17 Dec 2008 17:20:49 +0200 Subject: [PATCH] Support plural --- ankiqt/ui/deckproperties.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/deckproperties.py b/ankiqt/ui/deckproperties.py index 717e13c4e..91151853b 100644 --- a/ankiqt/ui/deckproperties.py +++ b/ankiqt/ui/deckproperties.py @@ -11,6 +11,7 @@ from anki.utils import parseTags from anki.deck import newCardOrderLabels, newCardSchedulingLabels from anki.deck import revCardOrderLabels from anki.utils import hexifyID, dehexifyID +from anki.lang import ngettext tabs = ("Scheduling", "Synchronization", @@ -111,9 +112,10 @@ class DeckProperties(QDialog): self.dialog.modelsList.clear() self.models = [] for model in self.d.models: - name = _("%(name)s [%(facts)d facts]") % { - 'name': model.name, - 'facts': self.d.modelUseCount(model), + name = ngettext("%(name)s [%(facts)d fact]", + "%(name)s [%(facts)d facts]", self.d.modelUseCount(model)) % { + 'name': model.name, + 'facts': self.d.modelUseCount(model), } self.models.append((name, model)) self.models.sort()