File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -684,15 +684,16 @@ pdfjs-editor-delete-comment-popup-button =
684684
685685# An existing comment is edited
686686pdfjs-editor-edit-comment-dialog-title-when-editing = Edit comment
687+ pdfjs-editor-edit-comment-dialog-save-button-when-editing = Update
687688
688689# No existing comment
689690pdfjs-editor-edit-comment-dialog-title-when-adding = Add comment
691+ pdfjs-editor-edit-comment-dialog-save-button-when-adding = Add
690692
691693pdfjs-editor-edit-comment-dialog-text-input =
692694 .placeholder = Start typing…
693695
694696pdfjs-editor-edit-comment-dialog-cancel-button = Cancel
695- pdfjs-editor-edit-comment-dialog-save-button = Save
696697
697698## Edit a comment button in the editor toolbar
698699
Original file line number Diff line number Diff line change @@ -682,12 +682,25 @@ class CommentDialog {
682682 this . #commentText = str || "" ;
683683 const textInput = this . #textInput;
684684 textInput . value = this . #previousText = this . #commentText;
685- this . #title. setAttribute (
686- "data-l10n-id" ,
687- str
688- ? "pdfjs-editor-edit-comment-dialog-title-when-editing"
689- : "pdfjs-editor-edit-comment-dialog-title-when-adding"
690- ) ;
685+ if ( str ) {
686+ this . #title. setAttribute (
687+ "data-l10n-id" ,
688+ "pdfjs-editor-edit-comment-dialog-title-when-editing"
689+ ) ;
690+ this . #saveButton. setAttribute (
691+ "data-l10n-id" ,
692+ "pdfjs-editor-edit-comment-dialog-save-button-when-editing"
693+ ) ;
694+ } else {
695+ this . #title. setAttribute (
696+ "data-l10n-id" ,
697+ "pdfjs-editor-edit-comment-dialog-title-when-adding"
698+ ) ;
699+ this . #saveButton. setAttribute (
700+ "data-l10n-id" ,
701+ "pdfjs-editor-edit-comment-dialog-save-button-when-adding"
702+ ) ;
703+ }
691704 if ( options ?. height ) {
692705 textInput . style . height = `${ options . height } px` ;
693706 }
Original file line number Diff line number Diff line change 803803 < span data-l10n-id ="pdfjs-editor-edit-comment-dialog-cancel-button "> </ span >
804804 </ button >
805805 < button id ="commentManagerSaveButton " type ="button " class ="primaryButton " disabled tabindex ="0 ">
806- < span data-l10n-id ="pdfjs-editor-edit-comment-dialog-save-button "> </ span >
806+ < span data-l10n-id ="pdfjs-editor-edit-comment-dialog-save-button-when-adding "> </ span >
807807 </ button >
808808 </ div >
809809 </ div >
You can’t perform that action at this time.
0 commit comments