From 8fbf2cb4127c38bc15894bf0906f620db1f899b4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 2 Jan 2011 10:00:10 +0900 Subject: [PATCH] translation patch from piotr --- ankiqt/ui/main.py | 8 +++++--- ankiqt/ui/modelproperties.py | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index fd150628d..748e7d05f 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -3006,7 +3006,7 @@ link into Anki.""")) fail = True if fail: ui.utils.showInfo(_("""\ -That doesn't appear to be a public link. You'll be asked again when the deck\ +That doesn't appear to be a public link. You'll be asked again when the deck \ is next loaded.""")) else: self.config['dropboxPublicFolder'] = os.path.dirname(txt[0]) @@ -3118,14 +3118,16 @@ doubt.""")) (grabbed, missing) = res[1:] msg = _("%d successfully retrieved.") % grabbed if missing: - msg += "\n" + _("%d missing.") % missing + msg += "\n" + ngettext("%d missing.", "%d missing.", missing) % missing else: msg = _("Unable to download %s\nDownload aborted.") % res[1] ui.utils.showInfo(msg) def onLocalizeMedia(self): res = downloadRemote(self.deck) - msg = _("%d successfully downloaded.") % len(res[0]) + count = len(res[0]) + msg = ngettext("%d successfully downloaded.", + "%d successfully downloaded.", count) % count if len(res[1]): msg += "\n\n" + _("Couldn't find:") + "\n" + "\n".join(res[1]) ui.utils.showText(msg, parent=self, type="text") diff --git a/ankiqt/ui/modelproperties.py b/ankiqt/ui/modelproperties.py index ccb3dcb22..defc0edb6 100644 --- a/ankiqt/ui/modelproperties.py +++ b/ankiqt/ui/modelproperties.py @@ -83,11 +83,12 @@ class ModelProperties(QDialog): status="" else: status=_("; disabled") - label = _("%(name)s [%(cards)d facts%(status)s]") % { + cards = self.deck.cardModelUseCount(card) + label = "%(name)s [%(cards)s%(status)s]" % { 'num': n, 'name': card.name, 'status': status, - 'cards': self.deck.cardModelUseCount(card), + 'cards': ngettext("%d fact", "%d facts", cards) % cards } item = QListWidgetItem(label) self.dialog.cardList.addItem(item)