From 72d3b8b711f267212644f5f81f5c51d8b5418c6b Mon Sep 17 00:00:00 2001 From: aurimasv Date: Mon, 18 Feb 2013 00:16:44 -0600 Subject: [PATCH] Set this.translator for "detect" calls so that parentTranslator is set correctly --- chrome/content/zotero/xpcom/translation/translate.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 5c46ba2e7..5b013255d 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1310,17 +1310,19 @@ Zotero.Translate.Base.prototype = { var me = this; this._loadTranslator(this._potentialTranslators[0], - function() { me._detectTranslatorLoaded() }); + function() { me._detectTranslatorLoaded(me._potentialTranslators[0]) }); }, /** * Runs detect code for a translator */ - "_detectTranslatorLoaded":function() { + "_detectTranslatorLoaded":function(translator) { this._prepareDetection(); this.incrementAsyncProcesses("Zotero.Translate#getTranslators"); + this.translator = [translator]; + try { var returnValue = this._sandboxManager.sandbox["detect"+this._entryFunctionSuffix].apply(null, this._getParameters()); } catch(e) {