fix suspended card msg when review early term early, tweak fin msg

This commit is contained in:
Damien Elmes 2009-02-06 15:59:35 +09:00
parent 8c9803e638
commit 09dbbecf3a

View file

@ -648,7 +648,7 @@ At the same time tomorrow:<br><br>
"There will be <b>%s reviews</b>.", cards) % cards, "There will be <b>%s reviews</b>.", cards) % cards,
} }
if next - time.time() > 86400 and not newCardsTomorrow: if next - time.time() > 86400 and not newCardsTomorrow:
msg = (_("The next card will be shown in <b>%s</b>.") % msg = (_("The next review is in <b>%s</b>.") %
self.earliestTimeStr()) self.earliestTimeStr())
else: else:
msg = _("No cards are due.") msg = _("No cards are due.")
@ -679,27 +679,21 @@ select count(id) from cards where combinedDue < :time
and priority in (1,2,3,4) and type in (0, 1)""", time=time) and priority in (1,2,3,4) and type in (0, 1)""", time=time)
def deckFinishedMsg(self): def deckFinishedMsg(self):
self.resetAfterReviewEarly()
spaceSusp = "" spaceSusp = ""
c = self.spacedCardCount() c = self.spacedCardCount()
if c and self.newCountToday: newLeft = self.newCardsPerDay - self.newCardsToday()
spaceSusp += ngettext(''' if c and newLeft:
There is <b>%d</b> spaceSusp += ngettext('There is <b>%d</b> spaced card.',
<a href="http://ichi2.net/anki/wiki/Key_Terms_and_Concepts#head-787faa3eb21d7962f7719dc2722d34b7d74035ae"> 'There are <b>%d</b> spaced cards.',
spaced</a> card.''', ''' c) % c
There are <b>%d</b>
<a href="http://ichi2.net/anki/wiki/Key_Terms_and_Concepts#head-787faa3eb21d7962f7719dc2722d34b7d74035ae">
spaced</a> cards.''', c) % c
c2 = self.suspendedCardCount() c2 = self.suspendedCardCount()
if c2: if c2:
if c: if c:
spaceSusp += "<br>" spaceSusp += "<br>"
spaceSusp += ngettext(''' spaceSusp += ngettext('There is <b>%d</b> suspended card.',
There is <b>%d</b> 'There are <b>%d</b> suspended cards.',
<a href="http://ichi2.net/anki/wiki/Key_Terms_and_Concepts#head-37d2db274e6caa23aef55e29655a6b806901774b"> c) % c2
suspended</a> card.''', '''
There are <b>%d</b>
<a href="http://ichi2.net/anki/wiki/Key_Terms_and_Concepts#head-37d2db274e6caa23aef55e29655a6b806901774b">
suspended</a> cards.''', c) % c2
if spaceSusp: if spaceSusp:
spaceSusp = "<br><br>" + spaceSusp spaceSusp = "<br><br>" + spaceSusp
return _('''\ return _('''\