Code Monkey home page Code Monkey logo

zotero-pdf-translate's Introduction

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

From Release

  • 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.

From Source Code

Note Not recommended if you don't want to edit the code.

git clone [email protected]:windingwind/zotero-pdf-translate.git
cd zotero-pdf-translate
VERSION=0.0.1 make

Alternatively, version numbers can be passed to make directly: make VERSION=0.0.1

Usage

Once you have the plugin installed simply, open any PDF in your collections.

Select some text, the translation are shown.

If Automatically Translation is disabled, use shortcut T or click button to translate selected text.

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

Settings

General-Functions

  • Enable Translation, default true
  • Automatically Translation, default true
  • Enable Popup: Show results in a right-click popup or only in the side bar, default true
  • Translate Annotation: Save annotation's translation as comment, default true

General-Translate Engine

The default engine is Google Translate. Currently we support:

Translate Engine Require Secret Supported Languages
Google Translate No 100+
Google Translate(API) No Use translate.googleapis.com
Youdao Translate No 100+?
Niu Translate(Trial) No 100+ UNSTABLE
Niu Translate Yes 100+
Microsoft Translate Yes(free 2M) 200+
LingoCloud(Caiyun) Translate Yes zh, en, ja, es, fr, ru
DeepL Translate Yes(free 500k) 100+
Baidu Translate Yes(free-QPS1/free-2M) 200+
Tencent Translate Yes(QPS5, free-5M) 15

WARNING
Translation engines that do not require secret is only for trial use and cannot guarantee quality or availability.
If you expect stable and high-quality translation results, please use a translation engine that requires secret.
If the engine you want is not yet supported, please post an issue.

General-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.

Niu Translate
Apply here.
Chinese Document
The secret is APIKEY.

Baidu Translate
Apply here. Chinese Document
The secret format is MY_APPID#MY_KEY(split with '#').

Tencent Translate
Apply here. Chinese Document
The secret format is secretId#SecretKey#Region(optional, default ap-shanghai)#ProjectId(optional, default 0)(split with '#').

Advanced-UI

  • Font Size: The font size of result text, default 12
  • Reverse Raw/Result SideBar: Reverse the order of Raw/Result in sidebar if true, default false

Advanced-Others

  • Disable Automatic Translation when File Language is(split with ','): If you want to disable automatic translation in zh and ja files, set zh,ja.

Disclaimer

Use this code under AGPL. 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

zotero-pdf-translate's People

Contributors

windingwind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.