Add a prompt for unsupported import attempts
This commit is contained in:
parent
41706a3a67
commit
b8b8cbba3a
2 changed files with 10 additions and 0 deletions
|
@ -1660,6 +1660,15 @@ Zotero.Integration.Session.prototype.importDocument = async function() {
|
|||
const documentationURL = "https://www.zotero.org/support/kb/word_processor_document_export";
|
||||
|
||||
var ps = Services.prompt;
|
||||
|
||||
if (!this._app.supportsImportExport) {
|
||||
// Technically you will only reach this part in the code if getDocumentData returns
|
||||
// ZOTERO_EXPORTED_DOCUMENT, which is only viable for Word.
|
||||
// Let's add a parameter this changes later.
|
||||
ps.alert(null, Zotero.getString('integration.importDocument'),
|
||||
Zotero.getString('integration.importDocument.notAvailable', "Word"));
|
||||
}
|
||||
|
||||
var buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING
|
||||
+ (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_CANCEL)
|
||||
+ (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING);
|
||||
|
|
|
@ -901,6 +901,7 @@ integration.delayCitationUpdates.bibliography.toolbar = Automatic citation updat
|
|||
integration.delayCitationUpdates.bibliography.tab = Automatic citation updates are disabled. To see the bibliography, click Refresh in the Zotero tab.
|
||||
integration.importDocument = Import Document
|
||||
integration.importDocument.description = Would you like to import this document for use with Zotero?
|
||||
integration.importDocument.notAvailable = Your version of %S does not support document import. Please update to a newer version.
|
||||
integration.exportDocument = Export Document
|
||||
integration.exportDocument.description1 = Exporting the document will allow you to open it in a different Zotero-supported word processor and retain citation links.
|
||||
integration.exportDocument.description2 = You should make a backup of the document before proceeding.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue