An xpcshell-based approach to Zotero server side translation.
Currently supports import, export, and web translation.
-
Install the XULRunner SDK:
-
Create a symlink to XULRunner inside this project directory:
$ ln -s /path/to/where/you/put/xulrunner xulrunner-sdk -
Fetch the Zotero extension source as a submodule:
$ git submodule init $ git submodule update -
Clone the Zotero translators repository, too:
$ git clone https://github.com/zotero/translators.git
- Edit config.js and update the "translation-server.translatorsDirectory" preference to reflect the translators directory from step 4.
-
Run the build.sh script. If all goes well, there should be no output.
$ ./build.sh -
Run the server:
$ build/run_translation-server.sh zotero(3)(+0000000): HTTP server listening on *:1969 -
Try a query!
$ curl -d '{"url":"http://www.tandfonline.com/doi/abs/10.1080/15424060903167229","sessionid":"abc123"}' \ --header "Content-Type: application/json" \ localhost:1969/web
Supported endpoints are: /web, /import, /export, and /refresh.
Read server_translation.js for more information.