Repository navigation
fix(ui): use singular/plural text for 'Move to Trash' actions - #1578
Closed
sanketpatel32 wants to merge 1 commit into
Closed
sanketpatel32 wants to merge 1 commit into
sanketpatel32 wants to merge 1 commit into
Conversation
The thumbnail context menu, the Edit menu entry, and the preview panel context menu always showed 'Move file(s) to Trash'. They now use the existing singular/plural translation keys and update as the selection changes, matching what delete_files_callback will actually delete. Fixes TagStudioDev#1410
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1410. The "Move file(s) to Trash" actions always used the ambiguous "file(s)" wording even though the actual behavior is deterministic:
delete_files_callbackdeletes the single originating file when 0-1 items are selected, and the whole selection when more than one item is selected.ItemThumb.delete_action) and the Edit menu entry (MainMenuBar.delete_file_action) now start with the singular text and switch between the existingtrash.context.singular/pluralandmenu.delete_selected_files_singular/pluralkeys inThumbGridLayout.update_selected(), which every selection change funnels through.PreviewThumbView.update_delete_action_text(), called fromInspector.set_selection()— previously it always read "Move file to Trash" even when the action would trash the whole selection.Tasks Completed
ruff/pyright/pre-commit clean)