From ed311cacb9bc131c239d7a1e3c5129c4279377e6 Mon Sep 17 00:00:00 2001 From: Adomas Ven Date: Tue, 13 Aug 2024 23:13:00 +0300 Subject: [PATCH] Show a different error message for WinWord when no document is found (#4563) And link to a different troubleshooting page --- app/modules/zotero-word-for-windows-integration | 2 +- chrome/content/zotero/xpcom/integration.js | 9 +++++++-- chrome/locale/en-US/zotero/zotero.ftl | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/modules/zotero-word-for-windows-integration b/app/modules/zotero-word-for-windows-integration index bb5e422c81..798a96fbed 160000 --- a/app/modules/zotero-word-for-windows-integration +++ b/app/modules/zotero-word-for-windows-integration @@ -1 +1 @@ -Subproject commit bb5e422c816f6233528ae8a0e5e51328a8b169bf +Subproject commit 798a96fbed101d74ce7867bccf3f5e07af192b2c diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index d5ec4967e5..bcb5814cb6 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -355,13 +355,18 @@ Zotero.Integration = new function() { this._handleCommandError = async function (document, session, e) { try { - const supportURL = "https://www.zotero.org/support/kb/debugging_broken_documents"; + let supportURL = "https://www.zotero.org/support/kb/debugging_broken_documents"; var displayError; if (e instanceof Zotero.Exception.Alert) { displayError = e.message; } else { - if (e.toString().indexOf("ExceptionAlreadyDisplayed") === -1) { + if (e.toString().includes("Could not find a running Word instance.")) { + displayError = Zotero.getString('integration-error-unable-to-find-winword') + + "\n\n" + Zotero.getString("integration.error.viewTroubleshootingInfo"); + supportURL = "https://www.zotero.org/support/kb/could_not_find_a_running_word_instance"; + } + else if (e.toString().indexOf("ExceptionAlreadyDisplayed") === -1) { displayError = Zotero.getString("integration.error.generic") + "\n\n" + Zotero.getString("integration.error.viewTroubleshootingInfo"); } diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index d072018469..1bcbbbf786 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -338,6 +338,7 @@ integration-prefs-automaticJournalAbbeviations-description = The “Journal Abbr integration-prefs-exportDocument = .label = Switch to a Different Word Processor… +integration-error-unable-to-find-winword = { -app-name } could not find a running Word instance. publications-intro-page = .label = My Publications