Support plural

This commit is contained in:
Niklas Laxström 2008-12-17 17:20:49 +02:00 committed by Timo Paulssen
parent 3209a96735
commit b090c2ed76

View file

@ -11,6 +11,7 @@ from anki.utils import parseTags
from anki.deck import newCardOrderLabels, newCardSchedulingLabels from anki.deck import newCardOrderLabels, newCardSchedulingLabels
from anki.deck import revCardOrderLabels from anki.deck import revCardOrderLabels
from anki.utils import hexifyID, dehexifyID from anki.utils import hexifyID, dehexifyID
from anki.lang import ngettext
tabs = ("Scheduling", tabs = ("Scheduling",
"Synchronization", "Synchronization",
@ -111,9 +112,10 @@ class DeckProperties(QDialog):
self.dialog.modelsList.clear() self.dialog.modelsList.clear()
self.models = [] self.models = []
for model in self.d.models: for model in self.d.models:
name = _("%(name)s [%(facts)d facts]") % { name = ngettext("%(name)s [%(facts)d fact]",
'name': model.name, "%(name)s [%(facts)d facts]", self.d.modelUseCount(model)) % {
'facts': self.d.modelUseCount(model), 'name': model.name,
'facts': self.d.modelUseCount(model),
} }
self.models.append((name, model)) self.models.append((name, model))
self.models.sort() self.models.sort()