From 21cefbf0901353a0ea5d2f0623fe1dcc93a23182 Mon Sep 17 00:00:00 2001 From: Mario Mohar Date: Mon, 31 Aug 2026 08:52:09 +0200 Subject: [PATCH] fix(clipboard): add translator context and list deleteEntries in IPC help Review follow-up. The two strings this branch adds carried no translator context: the "Clear Filtered" tooltip in ClipboardHeader and the confirmation body for a filtered clear in ClipboardHistoryContent. Both now say where they appear, and the second one names what %1 is, per CONTRIBUTING. "Clear All" on the same line is deliberately left alone. It is an existing shared term with four other call sites, so a context there would attach a clipboard-specific comment to a term the printer tab also uses. clipboard.deleteEntries was handled but absent from the IPC method listing that `dms debug-srv` prints, which left it undiscoverable right next to clipboard.deleteEntry. Catalogs untouched. --- core/internal/server/server.go | 1 + quickshell/Modals/Clipboard/ClipboardHeader.qml | 2 +- quickshell/Modals/Clipboard/ClipboardHistoryContent.qml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/internal/server/server.go b/core/internal/server/server.go index 15125bca7..adeb996c6 100644 --- a/core/internal/server/server.go +++ b/core/internal/server/server.go @@ -1497,6 +1497,7 @@ func (s *Server) Serve(printDocs bool) error { log.Info(" clipboard.getHistory - Get clipboard history with previews") log.Info(" clipboard.getEntry - Get full entry by ID (params: id)") log.Info(" clipboard.deleteEntry - Delete entry by ID (params: id)") + log.Info(" clipboard.deleteEntries - Delete entries by ID, skipping pinned ones (params: ids)") log.Info(" clipboard.clearHistory - Clear all clipboard history") log.Info(" clipboard.copy - Copy text to clipboard (params: text)") log.Info(" clipboard.paste - Get current clipboard text") diff --git a/quickshell/Modals/Clipboard/ClipboardHeader.qml b/quickshell/Modals/Clipboard/ClipboardHeader.qml index b709aef83..56e22c353 100644 --- a/quickshell/Modals/Clipboard/ClipboardHeader.qml +++ b/quickshell/Modals/Clipboard/ClipboardHeader.qml @@ -68,7 +68,7 @@ Item { iconName: "delete_sweep" iconSize: Theme.iconSize iconColor: Theme.surfaceText - tooltipText: header.clearsFilteredOnly ? I18n.tr("Clear Filtered") : I18n.tr("Clear All") + tooltipText: header.clearsFilteredOnly ? I18n.tr("Clear Filtered", "clipboard modal: clear button tooltip while a search filter is active") : I18n.tr("Clear All") onClicked: clearAllClicked() } diff --git a/quickshell/Modals/Clipboard/ClipboardHistoryContent.qml b/quickshell/Modals/Clipboard/ClipboardHistoryContent.qml index 0d4228603..a19e05fc0 100644 --- a/quickshell/Modals/Clipboard/ClipboardHistoryContent.qml +++ b/quickshell/Modals/Clipboard/ClipboardHistoryContent.qml @@ -147,7 +147,7 @@ FocusScope { if (unpinnedEntries.length === 0) { return; } - clearConfirmDialog.show(I18n.tr("Clear History?"), I18n.tr("This will delete the %1 entries matching the current filter. Pinned entries are kept.").arg(unpinnedEntries.length), function () { + clearConfirmDialog.show(I18n.tr("Clear History?"), I18n.tr("This will delete the %1 entries matching the current filter. Pinned entries are kept.", "clipboard modal: clear confirmation while a search filter is active, %1 is the number of matching entries").arg(unpinnedEntries.length), function () { clearFiltered(); }, function () {}); return;