0.0.3 • Published 3 years ago

@onekey/1trans v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Translator

A DeepL translator script

How to use

Using nodejs as runtime.

npm i -g @onekey/1trans

# Translate test-en.json to Chinease and output as `./output-zh.json`
DEEPL_API_TOKEN=[your deepl token] && 1trans ./test-en.json ./output-zh.json -t zh

Use the script locally.

git clone https://github.com/AmagiDDmxh/translator
cd translator
yarn
# 复制 env,编辑 'DEEPL_API_TOKEN=' 属性为 DeepL API token
cp .env.example .env

# 尝试翻译 test-en.json 中文 翻译好的文件会输出到 `output/test-zh.json`
yarn start test-en.json -t zh

# 尝试翻译 input.json 德语
yarn start input.json -t de