mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
add leech report to congrats, remove bold from less important items
This commit is contained in:
parent
285bf5a9a0
commit
33c23bc082
1 changed files with 16 additions and 6 deletions
22
anki/deck.py
22
anki/deck.py
|
@ -742,23 +742,30 @@ and priority in (1,2,3,4) and type in (0, 1)""", time=time)
|
||||||
spaceSusp = ""
|
spaceSusp = ""
|
||||||
c= self.spacedCardCount()
|
c= self.spacedCardCount()
|
||||||
if c:
|
if c:
|
||||||
spaceSusp += ngettext('There is <b>%d delayed</b> new card.',
|
spaceSusp += ngettext('There is %d delayed new card.',
|
||||||
'There are <b>%d delayed</b> new cards.',
|
'There are %d delayed new cards.',
|
||||||
c) % c
|
c) % c
|
||||||
c2 = self.suspendedCardCount()
|
c2 = self.suspendedCardCount()
|
||||||
if c2:
|
if c2:
|
||||||
if spaceSusp:
|
if spaceSusp:
|
||||||
spaceSusp += "<br>"
|
spaceSusp += "<br>"
|
||||||
spaceSusp += ngettext('There is <b>%d suspended</b> card.',
|
spaceSusp += ngettext('There is %d suspended card.',
|
||||||
'There are <b>%d suspended</b> cards.',
|
'There are %d suspended cards.',
|
||||||
c2) % c2
|
c2) % c2
|
||||||
c3 = self.inactiveCardCount()
|
c3 = self.inactiveCardCount()
|
||||||
if c3:
|
if c3:
|
||||||
if spaceSusp:
|
if spaceSusp:
|
||||||
spaceSusp += "<br>"
|
spaceSusp += "<br>"
|
||||||
spaceSusp += ngettext('There is <b>%d inactive</b> card.',
|
spaceSusp += ngettext('There is %d inactive card.',
|
||||||
'There are <b>%d inactive</b> cards.',
|
'There are %d inactive cards.',
|
||||||
c3) % c3
|
c3) % c3
|
||||||
|
c4 = self.leechCardCount()
|
||||||
|
if c4:
|
||||||
|
if spaceSusp:
|
||||||
|
spaceSusp += "<br>"
|
||||||
|
spaceSusp += ngettext('There is %d leech.',
|
||||||
|
'There are %d leeches.',
|
||||||
|
c4) % c4
|
||||||
if spaceSusp:
|
if spaceSusp:
|
||||||
spaceSusp = "<br><br>" + spaceSusp
|
spaceSusp = "<br><br>" + spaceSusp
|
||||||
return _('''\
|
return _('''\
|
||||||
|
@ -884,6 +891,9 @@ select count(id) from cards where priority = -3""")
|
||||||
return self.s.scalar("""
|
return self.s.scalar("""
|
||||||
select count(id) from cards where priority = 0""")
|
select count(id) from cards where priority = 0""")
|
||||||
|
|
||||||
|
def leechCardCount(self):
|
||||||
|
return len(self.findCards("is:suspended tag:leech"))
|
||||||
|
|
||||||
def seenCardCount(self):
|
def seenCardCount(self):
|
||||||
return self.s.scalar(
|
return self.s.scalar(
|
||||||
"select count(id) from cards where type != 2")
|
"select count(id) from cards where type != 2")
|
||||||
|
|
Loading…
Reference in a new issue