Fix bury count (more) (#1712)

* Fix bury count for negative values

* Enhance bury count tooltip

* Please type checker
This commit is contained in:
RumovZ 2022-03-07 02:03:14 +01:00 committed by GitHub
parent b403f20cae
commit 8504bd67ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View file

@ -15,6 +15,7 @@ studying-cards-buried =
}
studying-cards-will-be-automatically-returned-to = Cards will be automatically returned to their original decks after you review them.
studying-continue = Continue
studying-counts-differ = Counts differ from the deck list, because burying is enabled. Some cards have been excluded, and others may have taken their place.
studying-delete-note = Delete Note
studying-deleting-this-deck-from-the-deck = Deleting this deck from the deck list will return all remaining cards to their original deck.
studying-easy = Easy

View file

@ -231,16 +231,17 @@ class Overview:
buried_review = deck_node.review_count - counts[2]
else:
buried_new = buried_learning = buried_review = 0
buried_label = tr.browsing_buried()
buried_label = tr.studying_counts_differ()
def number_row(title: str, klass: str, count: int, buried_count: int) -> str:
buried = f"{buried_count:+}" if buried_count else ""
return f"""
<tr>
<td>{title}:</td>
<td>
<b>
<span class={klass}>{count}</span>
<span class=bury-count title="{buried_label}">{buried_count or ""}</span>
<span class=bury-count title="{buried_label}">{buried}</span>
</b>
</td>
</tr>

View file

@ -19,10 +19,6 @@
font-weight: bold;
margin-inline-start: 2px;
&::before {
content: "+";
}
&:empty {
display: none;
}