www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 349c19fe4d8303d7d762b8d20f1aa4081463d52a
parent cc1ab112f687dfee8edaf7616dd326c3b68dbdcb
Author: Simon Kornblith <simon@simonster.com>
Date:   Sat, 21 Jul 2012 18:29:04 -0400

Merge branch '3.0'

Diffstat:
Mchrome/content/zotero/tools/testTranslators/translatorTester.js | 2+-
Mchrome/content/zotero/xpcom/translation/translate.js | 13+++++++++++++
Mchrome/locale/en-US/zotero/zotero.properties | 4++--
3 files changed, 16 insertions(+), 3 deletions(-)

diff --git 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 @@ -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<item.tags.length; i++) { + var tag = item.tags[i]; + tagString = typeof tag === "string" ? tag : + typeof tag === "object" ? (tag.tag || tag.name) : null; + if(tagString && tagString.length > 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 @@ -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?