Simplify multi deletion confirmation strings

This commit is contained in:
RumovZ 2021-03-07 11:05:43 +01:00
parent f72daacae4
commit 6c4d6457fb
4 changed files with 4 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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()