Skip to content

cnmask/zotero-pdf-translate

 
 

Repository files navigation

PDFTranslateZotero PDF Translate

This is an add-on for Zotero 6. It provides PDF translation for Zotero built-in PDF reader.

Quick Start Guide

Install

  • Download the latest release (.xpi file) from the Releases Page Note If you're using Firefox as your browser, right click the xpi and select "Save As.."
  • In Zotero click "Tools" in the top menu bar and then click "Addons"
  • Go to the Extensions page and then click the gear icon in the top right.
  • Select Install Add-on from file.
  • Browse to where you downloaded the .xpi file and select it.
  • Restart Zotero, by clicking "restart now" in the extensions list where the Zotero PDF Translate plugin is now listed.

Usage

Once you have the plugin installed simply, open any PDF in your collections.
Select some text, the translation are shown.

Not the lauguage you want? The default tartget lauguage is zh-CN(Chinese Simplified). You can edit it in the Preference menu.

Settings

General

  • Enable PDF Translation
  • Enable Popup: Show results in a right-click popup or only in the side bar.
  • Font Size: The font size of result text.

Translate Engine

The default engine is Google Translate. Currently we support:

Translate Engine Require Secret Supported Languages
Google Translate No 100+
Google Translate(CN) No For China mainland users
Microsoft Translate Yes(free 2M) 200+
Youdao Translate No 100+?
LingoCloud(Caiyun) Translate No(temporarily) zh, en, ja, es, fr, ru
Niu Translate No 100+
DeepL Translate Yes(free 500k) 100+
Baidu Translate Yes(free-QPS1/free-2M) 200+

如果你无法访问谷歌,请选择其他翻译引擎。

Lauguage Settings

You can change the source and target language here. For some Translte Engines, the secret is required. They are listed below:

Microsoft Translate
WARNING The default secret may reach limit or be deleted any time. Please consider use your own secret.
For how to get a free Microsoft secret and more infomation, see this. Copy your secret and paste it in the settings.
See this issue for detailed steps to setup the Microsoft Translate.

DeepL Translate Follow the instruction here.

Baidu Translate
Follow the instruction here. The secret format is MY_APPID#MY_KEY.

Building

Invoke make with the VERSION variable set in the environment. For example:

VERSION=0.0.1 make

Alternatively, version numbers can be passed to make directly:

make VERSION=0.0.1

Disclaimer

Use this code at your own peril. No warranties are provided. Keep the laws of your locality in mind!

Part of the code of this repo refers to other open-source projects within the allowed scope.

  • zotero-scihub
  • zotero-tag

My Other Zotero Addons

  • zotero-tag: Automatically tag items/Batch tagging

About

PDF translation add-on for Zotero 6

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.1%
  • Makefile 6.9%