From a6e0432848574f5e4c1de6237d1616a4ea95f284 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 2 Feb 2022 02:09:04 -0500 Subject: [PATCH] PDF reader: Tweak annotation deletion confirmation text --- chrome/content/zotero/xpcom/reader.js | 13 ++++++++++++- chrome/locale/en-US/zotero/zotero.properties | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 7c241a7ae0..e0f7bcc254 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -830,7 +830,18 @@ class ReaderTab extends ReaderInstance { }); this._iframeWindow.wrappedJSObject.zoteroConfirmDeletion = function (plural) { - return Services.prompt.confirm(null, '', Zotero.getString('pdfReader.deleteAnnotation.' + (plural ? 'plural' : 'singular'))); + let ps = Services.prompt; + let buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING + + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL; + let index = ps.confirmEx( + null, + '', + Zotero.getString('pdfReader.deleteAnnotation.' + (plural ? 'plural' : 'singular')), + buttonFlags, + Zotero.getString('general.delete'), + null, null, null, {} + ); + return !index; }; } }); diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 20263a26a5..a07ba0a6f9 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -1375,8 +1375,8 @@ pdfReader.thisPage = This page pdfReader.thisPageAndLaterPages = This page and later pages pdfReader.allPages = All pages pdfReader.autoDetect = Auto-Detect -pdfReader.deleteAnnotation.singular = Delete the selected annotation? -pdfReader.deleteAnnotation.plural = Delete selected annotations? +pdfReader.deleteAnnotation.singular = Are you sure you want to delete the selected annotation? +pdfReader.deleteAnnotation.plural = Are you sure you want to delete the selected annotations? spellCheck.checkSpelling = Check Spelling spellCheck.addRemoveDictionaries = Add/Remove Dictionaries…