From 6c4d6457fb8f37bd65322ee028591942b5119d1b Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sun, 7 Mar 2021 11:05:43 +0100 Subject: [PATCH] Simplify multi deletion confirmation strings --- ftl/core/browsing.ftl | 6 +----- ftl/core/decks.ftl | 2 +- qt/aqt/deckbrowser.py | 4 +--- qt/aqt/sidebar.py | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ftl/core/browsing.ftl b/ftl/core/browsing.ftl index c5a13ad0e..06160d468 100644 --- a/ftl/core/browsing.ftl +++ b/ftl/core/browsing.ftl @@ -22,11 +22,7 @@ browsing-change-to = Change { $val } to: browsing-clear-unused = Clear Unused browsing-clear-unused-tags = Clear Unused Tags browsing-confirm-saved-search-overwrite = A saved search with the name { $name } already exists. Do you want to overwrite it? -browsing-confirm-saved-searches-deletion = - { $count -> - [one] Are you sure you want to delete the selected saved search? - *[other] Are you sure you want to delete the { $count } selected saved searches? - } +browsing-confirm-saved-searches-deletion = Are you sure you want to delete all selected saved searches? browsing-created = Created browsing-ctrlandshiftande = Ctrl+Shift+E browsing-current-deck = Current Deck diff --git a/ftl/core/decks.ftl b/ftl/core/decks.ftl index b4b942b10..29e359c5c 100644 --- a/ftl/core/decks.ftl +++ b/ftl/core/decks.ftl @@ -2,7 +2,7 @@ decks-add-new-deck-ctrlandn = Add New Deck (Ctrl+N) decks-are-you-sure-you-wish-to = Are you sure you wish to delete { $val }? decks-build = Build decks-cards-selected-by = cards selected by -decks-confirm-deletion = Are you sure you wish to delete { $deck_count } decks including { $card_count } cards? +decks-confirm-deletion = Are you sure you want to delete all selected decks including { $count } cards? decks-create-deck = Create Deck decks-custom-steps-in-minutes = Custom steps (in minutes) decks-deck = Deck diff --git a/qt/aqt/deckbrowser.py b/qt/aqt/deckbrowser.py index 1b9463c07..1afc1c298 100644 --- a/qt/aqt/deckbrowser.py +++ b/qt/aqt/deckbrowser.py @@ -313,9 +313,7 @@ class DeckBrowser: f"{tr(TR.DECKS_ARE_YOU_SURE_YOU_WISH_TO, val=decks[0]['name'])} {extra}" ) - return askUser( - tr(TR.DECKS_CONFIRM_DELETION, deck_count=len(dids), card_count=count) - ) + return askUser(tr(TR.DECKS_CONFIRM_DELETION, count=count)) def _delete(self, did: int) -> None: if self.ask_delete_deck(did): diff --git a/qt/aqt/sidebar.py b/qt/aqt/sidebar.py index 08b9b2cb8..20ada84cd 100644 --- a/qt/aqt/sidebar.py +++ b/qt/aqt/sidebar.py @@ -1267,7 +1267,7 @@ class SidebarTreeView(QTreeView): if len(selected) == 1: query = tr(TR.BROWSING_REMOVE_FROM_YOUR_SAVED_SEARCHES, val=selected[0]) else: - query = tr(TR.BROWSING_CONFIRM_SAVED_SEARCHES_DELETION, count=len(selected)) + query = tr(TR.BROWSING_CONFIRM_SAVED_SEARCHES_DELETION) if not askUser(query): return conf = self._get_saved_searches()