From b7d28a3bf68bf38827d62cee35818e12cd386c83 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 15 Nov 2023 10:51:39 +0100 Subject: [PATCH] [Editor] Add a tooltip to the delete button --- l10n/en-US/viewer.ftl | 2 ++ src/display/editor/toolbar.js | 1 + 2 files changed, 3 insertions(+) diff --git a/l10n/en-US/viewer.ftl b/l10n/en-US/viewer.ftl index 2193f51c657a1..a7fdf58ceab7b 100644 --- a/l10n/en-US/viewer.ftl +++ b/l10n/en-US/viewer.ftl @@ -323,6 +323,8 @@ pdfjs-editor-ink-button-label = Draw pdfjs-editor-stamp-button = .title = Add or edit images pdfjs-editor-stamp-button-label = Add or edit images +pdfjs-editor-remove-button = + .title = Remove # Editor Parameters pdfjs-editor-free-text-color-input = Color diff --git a/src/display/editor/toolbar.js b/src/display/editor/toolbar.js index 422fd8bddaea6..19e18e2319ae9 100644 --- a/src/display/editor/toolbar.js +++ b/src/display/editor/toolbar.js @@ -82,6 +82,7 @@ class EditorToolbar { const button = document.createElement("button"); button.className = "delete"; button.tabIndex = 0; + button.setAttribute("data-l10n-id", "pdfjs-editor-remove-button"); this.#addListenersToElement(button); button.addEventListener("click", e => { this.#editor._uiManager.delete();