fix browser updateTitle()

This commit is contained in:
Damien Elmes 2020-11-18 13:40:21 +10:00
parent 1c5f94d46f
commit c1e6149a1b
2 changed files with 6 additions and 7 deletions

View file

@ -14,6 +14,7 @@ from typing import Callable, List, Optional, Sequence, Tuple, Union, cast
import anki
import aqt
import aqt.forms
from anki.lang import without_unicode_isolation
from anki.cards import Card
from anki.collection import Collection
from anki.consts import *
@ -820,10 +821,10 @@ class Browser(QMainWindow):
def updateTitle(self):
selected = len(self.form.tableView.selectionModel().selectedRows())
cur = len(self.model.cards)
print("fixme: browser updateTitle()")
self.setWindowTitle(
"Browse (%(cur)d cards shown; %(sel)s)"
% {"cur": cur, "sel": self.col.tr(TR.BROWSING_SELECTED, count=selected)}
without_unicode_isolation(
tr(TR.BROWSING_WINDOW_TITLE, total=cur, selected=selected)
)
)
return selected

View file

@ -114,7 +114,5 @@ browsing-note-deleted = { $count ->
[one] { $count } note deleted.
*[other] { $count } notes deleted.
}
browsing-selected = { $count ->
[one] { $count } selected
*[other] { $count } selected
}
browsing-window-title = Browse ({ $selected } of { $total } cards selected)