How to make a translator compatible with the translation server?

51 views
Skip to first unread message

Michael Unterkalmsteiner

unread,
Mar 17, 2016, 7:08:58 PM3/17/16
to zotero-dev
Hi!

I'm trying to use the Science Direct translator with the translation server. The translator is not compatible with the server ("browserSupport": "gcsib").
If I mark change it to "gcsibv" the translator is invoked, but I get the following error:

zotero(4)(+0000000): Translate: Binding sandbox to http://www.sciencedirect.com/science/article/pii/S0164121202001322
zotero(4)(+0000004): Translate: Parsing code for undefined
zotero(3)(+0000000): this._translatorInfo is undefined at chrome://translation-server/content/translation/translate.js:1967
zotero(2)(+0000000): Translate: Translation using ScienceDirect failed:
string => TypeError: this._translatorInfo is undefined
stack => Zotero.Translate.Import.prototype._loadTranslatorPrepareIO@chrome://translation-server/content/translation/translate.js:1967:6
Zotero.Translate.Import.prototype._loadTranslator/<@chrome://translation-server/content/translation/translate.js:1959:3
Zotero.Translate.Base.prototype._loadTranslator@chrome://translation-server/content/translation/translate.js:1495:16
Zotero.Translate.Import.prototype._loadTranslator@chrome://translation-server/content/translation/translate.js:1958:2
Zotero.Translate.Base.prototype.translate/<@chrome://translation-server/content/translation/translate.js:1145:7
Zotero.Translators</this.get@chrome://translation-server/content/connector/translator.js:115:4
Zotero.Translate.Base.prototype.translate@chrome://translation-server/content/translation/translate.js:1143:1
Zotero.Translate.Sandbox.Base.loadTranslator/safeTranslator.translate@chrome://translation-server/content/translation/translate.js:327:5
processRIS@ScienceDirect:297:2
scrape/<@ScienceDirect:374:4
Zotero.Utilities.Translate.prototype.doPost/xmlhttp<@chrome://translation-server/content/utilities_translate.js:349:4
_stateChange@chrome://translation-server/content/http.js:863:6
Zotero.HTTP</this.doPost/xmlhttp.onreadystatechange@chrome://translation-server/content/http.js:343:4
@translation-server/init.js:134:14
url => http://www.sciencedirect.com/science/article/pii/S0164121202001322
downloadAssociatedFiles => undefined
automaticSnapshots => undefined
zotero(5)(+0000001): Translate: Running handler 0 for done
zotero(5)(+0000000): HTTP/1.0 500 Internal Server Error
Content-Type: text/plain
An error occurred during translation. Please check translation with Zotero client.

### end error message ###

Where should I look for to make the translator compatible with the translation server?

Thanks!
Michael

Avram Lyon

unread,
Mar 17, 2016, 7:16:14 PM3/17/16
to zotero-dev
The only interesting thing in the translator is that it calls out to the ISBN search translator, which might not work in the translation server environment. That said, the code for ISBN searches is never called; the block that would call it is commented out.

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at https://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.

Michael Unterkalmsteiner

unread,
Mar 17, 2016, 7:29:29 PM3/17/16
to zotero-dev
Hi!

I've found the problem. I did not have the RIS translator (loaded by the Science Direct one) in the path with my modified translators. Now it works!

Thanks!
Michael
Reply all
Reply to author
Forward
0 new messages