diff --git a/ftl/core/adding.ftl b/ftl/core/adding.ftl index e94333008..a090576aa 100644 --- a/ftl/core/adding.ftl +++ b/ftl/core/adding.ftl @@ -1,5 +1,10 @@ adding-add-shortcut-ctrlandenter = Add (shortcut: ctrl+enter) adding-added = Added +adding-added-cards = + Added { $count -> + [one] { $count } card + *[other] { $count } cards + } adding-discard-current-input = Discard current input? adding-keep-editing = Keep Editing adding-edit = Edit "{ $val }" diff --git a/qt/aqt/addcards.py b/qt/aqt/addcards.py index 86e8a25b1..68f5c4259 100644 --- a/qt/aqt/addcards.py +++ b/qt/aqt/addcards.py @@ -8,7 +8,7 @@ from collections.abc import Callable import aqt.editor import aqt.forms from anki._legacy import deprecated -from anki.collection import OpChanges, SearchNode +from anki.collection import OpChanges, OpChangesWithCount, SearchNode from anki.decks import DeckId from anki.models import NotetypeId from anki.notes import Note, NoteFieldsCheckResult, NoteId @@ -294,13 +294,13 @@ class AddCards(QMainWindow): target_deck_id = self.deck_chooser.selected_deck_id - def on_success(changes: OpChanges) -> None: + def on_success(changes: OpChangesWithCount) -> None: # only used for detecting changed sticky fields on close self._last_added_note = note self.addHistory(note) - tooltip(tr.adding_added(), period=500) + tooltip(tr.adding_added_cards(count=changes.count), period=500) av_player.stop_and_clear_queue() self._load_new_note(sticky_fields_from=note) gui_hooks.add_cards_did_add_note(note)