From 4fd978905c71fa167ec0a5c81b65bbb639e60ed6 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 19 Jul 2012 10:53:01 -0400 Subject: [PATCH 1/3] Clarify wording of missing item message as suggested by @adam3smith --- chrome/locale/en-US/zotero/zotero.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 0b2d7c4784..9b15eec375 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -621,8 +621,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? From 4e015ecbe9a12fc01b7b125738b5d559ed02dd52 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 19 Jul 2012 13:18:35 -0400 Subject: [PATCH 2/3] Another attempt at getting tests working for translation via server --- chrome/content/zotero/tools/testTranslators/translatorTester.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b117da88a3e4334fa2e09a4d1df7b1cbd9bd57d8 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 21 Jul 2012 18:28:36 -0400 Subject: [PATCH 3/3] Don't save unsynchable tags --- .../content/zotero/xpcom/translation/translate.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 0e6b8060b9..a45a5cfa21 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -580,6 +580,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); }