diff --git a/chrome/content/zotero/tools/testTranslators/translatorTester.js b/chrome/content/zotero/tools/testTranslators/translatorTester.js index 605b5a1e3a..9cd292ef02 100644 --- a/chrome/content/zotero/tools/testTranslators/translatorTester.js +++ b/chrome/content/zotero/tools/testTranslators/translatorTester.js @@ -452,7 +452,7 @@ Zotero_TranslatorTester.prototype._runTestTranslate = function(translate, transl if(!translators.length) { testDoneCallback(this, test, "failed", "Detection failed"); return; - } else if(this.type === "web" && translators[0].itemType !== "server" + } else if(this.type === "web" && translators[0].itemType !== Zotero.Translator.RUN_MODE_ZOTERO_SERVER && (translators[0].itemType !== "multiple" && test.items.length > 1 || test.items.length === 1 && translators[0].itemType !== test.items[0].itemType)) { // this handles "items":"multiple" too, since the string has length 8 diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 9022ebd3cb..10980454aa 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -568,6 +568,19 @@ Zotero.Translate.Sandbox = { if(setShortTitle) item.shortTitle = title; } + // refuse to save very long tags + if(item.tags) { + for(var i=0; i 255) { + translate._debug("WARNING: Skipping unsynchable tag "+JSON.stringify(tagString)); + item.tags.splice(i--, 1); + } + } + } + // call super Zotero.Translate.Sandbox.Base._itemDone(translate, item); } diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 7cc75a46f9..14a12ac1c1 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -624,8 +624,8 @@ integration.error.invalidStyle = The style you have selected does not appear t integration.error.fieldTypeMismatch = Zotero cannot update this document because it was created by a different word processing application with an incompatible field encoding. In order to make a document compatible with both Word and OpenOffice.org/LibreOffice/NeoOffice, open the document in the word processor with which it was originally created and switch the field type to Bookmarks in the Zotero Document Preferences. integration.replace = Replace this Zotero field? -integration.missingItem.single = This item no longer exists in your Zotero database. Do you want to select a substitute item? -integration.missingItem.multiple = Item %1$S in this citation no longer exists in your Zotero database. Do you want to select a substitute item? +integration.missingItem.single = The highlighted citation no longer exists in your Zotero database. Do you want to select a substitute item? +integration.missingItem.multiple = Item %1$S in the highlighted citation no longer exists in your Zotero database. Do you want to select a substitute item? integration.missingItem.description = Clicking "No" will delete the field codes for citations containing this item, preserving the citation text but deleting it from your bibliography. integration.removeCodesWarning = Removing field codes will prevent Zotero from updating citations and bibliographies in this document. Are you sure you want to continue? integration.upgradeWarning = Your document must be permanently upgraded in order to work with Zotero 2.1 or later. It is recommended that you make a backup before proceeding. Are you sure you want to continue?