commit 72d3b8b711f267212644f5f81f5c51d8b5418c6b
parent 376db8d9f0bbe7d90ee639ab9a40f3b0a2ccad49
Author: aurimasv <aurimas.dev@gmail.com>
Date: Mon, 18 Feb 2013 00:16:44 -0600
Set this.translator for "detect" calls so that parentTranslator is set correctly
Diffstat:
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
@@ -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) {