mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
Merge pull request #19649 from calixteman/bug1953298
[Editor] Fix the title of saved signature button (bug 1953298)
This commit is contained in:
commit
d5c185b90a
3 changed files with 21 additions and 7 deletions
|
@ -365,10 +365,18 @@ pdfjs-editor-stamp-add-image-button-label = Add image
|
|||
pdfjs-editor-free-highlight-thickness-input = Thickness
|
||||
pdfjs-editor-free-highlight-thickness-title =
|
||||
.title = Change thickness when highlighting items other than text
|
||||
pdfjs-editor-add-signature-container =
|
||||
.aria-label = Signature controls and saved signatures
|
||||
pdfjs-editor-signature-add-signature-button =
|
||||
.title = Add new signature
|
||||
pdfjs-editor-signature-add-signature-button-label = Add new signature
|
||||
|
||||
# Used on the button to use an already saved signature.
|
||||
# Variables:
|
||||
# description (String) - a string describing/labeling the signature.
|
||||
pdfjs-editor-add-saved-signature-button =
|
||||
.title = Saved signature: { $description }
|
||||
|
||||
# .default-content is used as a placeholder in an empty text editor.
|
||||
pdfjs-free-text2 =
|
||||
.aria-label = Text Editor
|
||||
|
@ -603,9 +611,9 @@ pdfjs-editor-add-signature-add-button = Add
|
|||
|
||||
## Main menu for adding/removing signatures
|
||||
|
||||
pdfjs-editor-delete-signature-button =
|
||||
.title = Remove signature
|
||||
pdfjs-editor-delete-signature-button-label = Remove signature
|
||||
pdfjs-editor-delete-signature-button1 =
|
||||
.title = Remove saved signature
|
||||
pdfjs-editor-delete-signature-button-label1 = Remove saved signature
|
||||
|
||||
## Editor toolbar
|
||||
|
||||
|
|
|
@ -708,11 +708,17 @@ class SignatureManager {
|
|||
button.append(svg);
|
||||
|
||||
const span = document.createElement("span");
|
||||
span.ariaHidden = true;
|
||||
button.append(span);
|
||||
|
||||
button.classList.add("toolbarAddSignatureButton");
|
||||
button.type = "button";
|
||||
button.title = span.textContent = description;
|
||||
span.textContent = description;
|
||||
button.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-add-saved-signature-button"
|
||||
);
|
||||
button.setAttribute("data-l10n-args", JSON.stringify({ description }));
|
||||
button.tabIndex = 0;
|
||||
|
||||
const path = svgFactory.createElement("path");
|
||||
|
@ -729,7 +735,7 @@ class SignatureManager {
|
|||
deleteButton.classList.add("toolbarButton", "deleteButton");
|
||||
deleteButton.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-delete-signature-button"
|
||||
"pdfjs-editor-delete-signature-button1"
|
||||
);
|
||||
deleteButton.type = "button";
|
||||
deleteButton.tabIndex = 0;
|
||||
|
@ -749,7 +755,7 @@ class SignatureManager {
|
|||
deleteButton.append(deleteSpan);
|
||||
deleteSpan.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-delete-signature-button-label"
|
||||
"pdfjs-editor-delete-signature-button-label1"
|
||||
);
|
||||
|
||||
this.#addSignatureToolbarButton.before(div);
|
||||
|
|
|
@ -249,7 +249,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||
<span data-l10n-id="pdfjs-editor-signature-button-label">Add signature</span>
|
||||
</button>
|
||||
<div class="editorParamsToolbar hidden doorHangerRight menu" id="editorSignatureParamsToolbar">
|
||||
<div id="addSignatureDoorHanger" class="menuContainer">
|
||||
<div id="addSignatureDoorHanger" class="menuContainer" role="region" data-l10n-id="pdfjs-editor-add-signature-container">
|
||||
<button id="editorSignatureAddSignature" class="toolbarButton labeled" type="button" title="Add new signature" tabindex="0" data-l10n-id="pdfjs-editor-signature-add-signature-button">
|
||||
<span data-l10n-id="pdfjs-editor-signature-add-signature-button-label" class="editorParamsLabel">Add new signature</span>
|
||||
</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue