diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index 1e2da25b40..bf3dc0783b 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -2059,8 +2059,7 @@ Zotero.Items = function() { /** - * Find attachment items whose paths point to missing files and begin with - * the passed `pathPrefix`. + * Find attachment items whose paths begin with the passed `pathPrefix` and don't exist on disk * * @param {Number} libraryID * @param {String} pathPrefix diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 439a240b01..750dc2b193 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4881,7 +4881,7 @@ var ZoteroPane = new function() let title = Zotero.getString('pane.item.attachments.autoRelink.title'); let text = Zotero.getString('pane.item.attachments.autoRelink.text1') + '\n\n' - + Zotero.getString('pane.item.attachments.autoRelink.text2', item.getFilePath()) + '\n' + + Zotero.getString('pane.item.attachments.autoRelink.text2', item.getFilePath()) + '\n\n' + Zotero.getString('pane.item.attachments.autoRelink.text3', path) + '\n\n' + Zotero.getString('pane.item.attachments.autoRelink.text4', Zotero.appName); let buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING @@ -4913,11 +4913,18 @@ var ZoteroPane = new function() title = Zotero.getString('pane.item.attachments.autoRelinkOthers.title'); text = Zotero.getString('pane.item.attachments.autoRelinkOthers.text', numOthers, numOthers); + buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING + + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL; index = ps.confirmEx(null, title, text, - ps.STD_YES_NO_BUTTONS, - null, null, null, null, {} + buttonFlags, + Zotero.getString( + numOthers == 1 + ? 'pane.item.attachments.autoRelink.relink' + : 'pane.item.attachments.autoRelink.relinkAll' + ), + null, null, null, {} ); return index == 0 ? 'all' : 'one'; diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index b1174b2454..9ebb0a3c4d 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -418,13 +418,13 @@ pane.item.attachments.fileNotFound.text2.stored.notOnServer = It may have been m pane.item.attachments.fileNotFound.text2.linked = It may have been moved or deleted outside of %1$S, or a Linked Attachment Base Directory may be set incorrectly on one of your computers. pane.item.attachments.delete.confirm = Are you sure you want to delete this attachment? pane.item.attachments.autoRelink.title = File Located Automatically -pane.item.attachments.autoRelink.text1 = The file could not be found at the specified location, but a matching file was found in your Linked Attachment Base Directory: +pane.item.attachments.autoRelink.text1 = The file could not be found at the specified location, but a file with the same name was found within your Linked Attachment Base Directory: pane.item.attachments.autoRelink.text2 = Old Location: %S pane.item.attachments.autoRelink.text3 = New Location: %S pane.item.attachments.autoRelink.text4 = %1$S can automatically relink this attachment. pane.item.attachments.autoRelink.relink = Relink -pane.item.attachments.autoRelinkOthers.title = More Files Located -pane.item.attachments.autoRelinkOthers.text = One other unlinked attachment in this library was found in the same directory. Relink the additional located attachment?;%S other unlinked attachments in this library were found in the same directory. Relink the additional located attachments? +pane.item.attachments.autoRelinkOthers.title = Additional Files Located +pane.item.attachments.autoRelinkOthers.text = One other unlinked attachment in this library was found within the same directory. Relink this attachment as well?;%S other unlinked attachments in this library were found within the same directory. Relink all located attachments? pane.item.attachments.autoRelink.locateManually = Locate Manually… pane.item.attachments.autoRelink.relinkAll = Relink All pane.item.attachments.count.zero = %S attachments: