From 1d63253b4f600aedf50f51749cde93c6851d0147 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sun, 17 Oct 2021 17:58:21 +0200 Subject: [PATCH] Make window titles more user-friendly --- ftl/core/card-stats.ftl | 5 ++--- qt/aqt/browser/card_info.py | 23 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ftl/core/card-stats.ftl b/ftl/core/card-stats.ftl index 9276aea44..f6dc983c6 100644 --- a/ftl/core/card-stats.ftl +++ b/ftl/core/card-stats.ftl @@ -25,6 +25,5 @@ card-stats-review-log-type-manual = Manual ## Window Titles -card-stats-browser-card = Browser Card -card-stats-reviewer-card = Reviewer Card -card-stats-previous-reviewer-card = Previous Reviewer Card +card-stats-current-card = Current Card ({ $context }) +card-stats-previous-card = Previous Card ({ $context }) diff --git a/qt/aqt/browser/card_info.py b/qt/aqt/browser/card_info.py index 9b67e2c36..59429a232 100644 --- a/qt/aqt/browser/card_info.py +++ b/qt/aqt/browser/card_info.py @@ -7,6 +7,7 @@ from typing import Callable import aqt from anki.cards import Card, CardId +from anki.lang import without_unicode_isolation from aqt.qt import * from aqt.utils import ( addCloseShortcut, @@ -119,16 +120,32 @@ class CardInfoManager: class BrowserCardInfo(CardInfoManager): def __init__(self, mw: aqt.AnkiQt): - super().__init__(mw, "revlog", tr.card_stats_browser_card()) + super().__init__( + mw, + "revlog", + without_unicode_isolation( + tr.card_stats_current_card(context=tr.qt_misc_browse()) + ), + ) class ReviewerCardInfo(CardInfoManager): def __init__(self, mw: aqt.AnkiQt): - super().__init__(mw, "reviewerCardInfo", tr.card_stats_reviewer_card()) + super().__init__( + mw, + "reviewerCardInfo", + without_unicode_isolation( + tr.card_stats_current_card(context=tr.decks_study()) + ), + ) class PreviousReviewerCardInfo(CardInfoManager): def __init__(self, mw: aqt.AnkiQt): super().__init__( - mw, "previousReviewerCardInfo", tr.card_stats_previous_reviewer_card() + mw, + "previousReviewerCardInfo", + without_unicode_isolation( + tr.card_stats_previous_card(context=tr.decks_study()) + ), )