Skip to content

fix(ui): use singular/plural text for 'Move to Trash' actions - #1578

Closed
sanketpatel32 wants to merge 1 commit into
TagStudioDev:mainfrom
sanketpatel32:devin/fix-delete-label-plural
Closed

sanketpatel32 wants to merge 1 commit into
TagStudioDev:mainfrom
sanketpatel32:devin/fix-delete-label-plural

Conversation

@sanketpatel32

Copy link
Copy Markdown

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_callback deletes the single originating file when 0-1 items are selected, and the whole selection when more than one item is selected.

  • Thumbnail context menu (ItemThumb.delete_action) and the Edit menu entry (MainMenuBar.delete_file_action) now start with the singular text and switch between the existing trash.context.singular/plural and menu.delete_selected_files_singular/plural keys in ThumbGridLayout.update_selected(), which every selection change funnels through.
  • The preview panel context menu got the same treatment via PreviewThumbView.update_delete_action_text(), called from Inspector.set_selection() — previously it always read "Move file to Trash" even when the action would trash the whole selection.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality (320/320 tests passing, ruff/pyright/pre-commit clean)
    • PyInstaller executable

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
@CyanVoxel CyanVoxel closed this Nov 23, 2026
@TrigamDev TrigamDev added the Type: Invalid This doesn't seem right label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Use singular or plural form of "file(s)" in thumbnail context menu

3 participants