Merge pull request #20300 from calixteman/bug1990499
[Editor] Fix the button labels in the comment dialog (bug 1990499)
This commit is contained in:
commit
8448d08345
@ -684,15 +684,16 @@ pdfjs-editor-delete-comment-popup-button =
|
||||
|
||||
# An existing comment is edited
|
||||
pdfjs-editor-edit-comment-dialog-title-when-editing = Edit comment
|
||||
pdfjs-editor-edit-comment-dialog-save-button-when-editing = Update
|
||||
|
||||
# No existing comment
|
||||
pdfjs-editor-edit-comment-dialog-title-when-adding = Add comment
|
||||
pdfjs-editor-edit-comment-dialog-save-button-when-adding = Add
|
||||
|
||||
pdfjs-editor-edit-comment-dialog-text-input =
|
||||
.placeholder = Start typing…
|
||||
|
||||
pdfjs-editor-edit-comment-dialog-cancel-button = Cancel
|
||||
pdfjs-editor-edit-comment-dialog-save-button = Save
|
||||
|
||||
## Edit a comment button in the editor toolbar
|
||||
|
||||
|
||||
@ -682,12 +682,25 @@ class CommentDialog {
|
||||
this.#commentText = str || "";
|
||||
const textInput = this.#textInput;
|
||||
textInput.value = this.#previousText = this.#commentText;
|
||||
if (str) {
|
||||
this.#title.setAttribute(
|
||||
"data-l10n-id",
|
||||
str
|
||||
? "pdfjs-editor-edit-comment-dialog-title-when-editing"
|
||||
: "pdfjs-editor-edit-comment-dialog-title-when-adding"
|
||||
"pdfjs-editor-edit-comment-dialog-title-when-editing"
|
||||
);
|
||||
this.#saveButton.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-edit-comment-dialog-save-button-when-editing"
|
||||
);
|
||||
} else {
|
||||
this.#title.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-edit-comment-dialog-title-when-adding"
|
||||
);
|
||||
this.#saveButton.setAttribute(
|
||||
"data-l10n-id",
|
||||
"pdfjs-editor-edit-comment-dialog-save-button-when-adding"
|
||||
);
|
||||
}
|
||||
if (options?.height) {
|
||||
textInput.style.height = `${options.height}px`;
|
||||
}
|
||||
|
||||
@ -803,7 +803,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||
<span data-l10n-id="pdfjs-editor-edit-comment-dialog-cancel-button"></span>
|
||||
</button>
|
||||
<button id="commentManagerSaveButton" type="button" class="primaryButton" disabled tabindex="0">
|
||||
<span data-l10n-id="pdfjs-editor-edit-comment-dialog-save-button"></span>
|
||||
<span data-l10n-id="pdfjs-editor-edit-comment-dialog-save-button-when-adding"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user