From 3e39cb33d9726ee52f606737b8f4dc4a6db3cd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 20 Mar 2018 11:47:46 +0200 Subject: [PATCH] Shows original and modified citation in warning prompt. Closes #1468 --- chrome/content/zotero/xpcom/integration.js | 10 ++++++++-- chrome/locale/en-US/zotero/zotero.properties | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 7302fe7751..f0e8081cc0 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1008,7 +1008,10 @@ Zotero.Integration.Fields.prototype._updateDocument = async function(forceCitati ); citationField.select(); var result = this._session.displayAlert( - Zotero.getString("integration.citationChanged")+"\n\n"+Zotero.getString("integration.citationChanged.description"), + Zotero.getString("integration.citationChanged")+"\n\n" + + Zotero.getString("integration.citationChanged.description")+"\n\n" + + Zotero.getString("integration.citationChanged.original", citation.properties.plainCitation)+"\n" + + Zotero.getString("integration.citationChanged.modified", plainCitation)+"\n", DIALOG_ICON_CAUTION, DIALOG_BUTTONS_YES_NO); if (result) { citation.properties.dontUpdate = true; @@ -2426,7 +2429,10 @@ Zotero.Integration.Citation = class { + "Original: " + this.properties.plainCitation + "\n" + "Current: " + fieldText ); - if (!Zotero.Integration.currentSession.displayAlert(Zotero.getString("integration.citationChanged.edit"), + if (!Zotero.Integration.currentSession.displayAlert( + Zotero.getString("integration.citationChanged.edit")+"\n\n" + + Zotero.getString("integration.citationChanged.original", this.properties.plainCitation)+"\n" + + Zotero.getString("integration.citationChanged.modified", fieldText)+"\n", DIALOG_ICON_WARNING, DIALOG_BUTTONS_OK_CANCEL)) { throw new Zotero.Exception.UserCancelled("editing citation"); } diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 30755363ec..75f3821fa1 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -861,6 +861,8 @@ integration.corruptBibliography.description = All items cited in the text will a integration.citationChanged = You have modified this citation since Zotero generated it. Do you want to keep your modifications and prevent future updates? integration.citationChanged.description = Clicking "Yes" will prevent Zotero from updating this citation if you add additional citations, switch styles, or modify the item to which it refers. Clicking "No" will erase your changes. integration.citationChanged.edit = You have modified this citation since Zotero generated it. Editing will clear your modifications. Do you want to continue? +integration.citationChanged.original = Original: %S +integration.citationChanged.modified = Modified: %S integration.delayCitationUpdates.alert.text1 = Updating citations in this document is taking a long time. Would you like to disable automatic citation updates? integration.delayCitationUpdates.alert.text2.toolbar = You will need to click Refresh in the Zotero toolbar when you are done inserting citations. integration.delayCitationUpdates.alert.text2.tab = You will need to click Refresh in the Zotero tab when you are done inserting citations.