@ablanc/translator 中文文档教程

发布于 4年前 浏览 26 更新于 3年前


Logo

Translator

用于翻译 JSON 文件的 node.js 包。

Table of Contents

About The Project

[Product Name Screen Shot]

Translator 允许您翻译 JSON 文件,更具体地说是 值数组。 您的 JSON 文件必须包含您要翻译的字符串数组或对象数组

该项目抓取 https://www.deepl.com/fr/translator 网站以绕过它的专业 API 限制。 所有 deepl 语言都可用以及自动检测作为输入语言。

您可以获取在控制台中打印出的翻译结果或作为 JSON 文件。

Built With

Installation

您可以使用全局下载它

npm install -g @ablanc/translator

或将其添加为开发依赖项

npm install --save-dev @ablanc/translator

# or with yarn
yarn add -D @ablanc/translator

Usage

要使用它,请在您的终端中键入:

Usage: translator [options]

Options:
  -i, --input <input>                                 json file to process
  -o, --output <console|path-to-file>                 output display
  -li, --lang-input <lang_input>                      en | fr | de | es | pt | it | nl | pl | ru
  -lo, --lang-output <lang_output>                    en-US | fr-FR | de-DE | es-ES | pt-PT | it-IT | nl-NL | pl-PL | ru-RU
  -pt, --properties-to-translate <property,property>  specify your object properties you want to translate, separated by ,
  -skid --skip-until-id <id>                          it will start translating your objects from id
  -int, --interactive                                 interactive mode
  -h, --help                                          display help for command

Contributing

非常感谢 您所做的任何贡献。

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

根据麻省理工学院许可证分发。 有关详细信息,请参阅 LICENSE


Logo

Translator

A node.js package to translate JSON files.

Table of Contents

About The Project

[Product Name Screen Shot]

Translator allows you to translate a JSON file and more specifically an array of values. Your JSON file must contain either an array of strings or an array of objects that you want to translate.

This project scrape https://www.deepl.com/fr/translator website to bypass it's pro API limitation. All deepl languages are available aswell as auto detection as input language.

You can either get the result of the translation printed out in the console or as a JSON file.

Built With

Installation

You can download it globally using

npm install -g @ablanc/translator

or add it as a devlopment dependency

npm install --save-dev @ablanc/translator

# or with yarn
yarn add -D @ablanc/translator

Usage

To use it type this in your terminal:

Usage: translator [options]

Options:
  -i, --input <input>                                 json file to process
  -o, --output <console|path-to-file>                 output display
  -li, --lang-input <lang_input>                      en | fr | de | es | pt | it | nl | pl | ru
  -lo, --lang-output <lang_output>                    en-US | fr-FR | de-DE | es-ES | pt-PT | it-IT | nl-NL | pl-PL | ru-RU
  -pt, --properties-to-translate <property,property>  specify your object properties you want to translate, separated by ,
  -skid --skip-until-id <id>                          it will start translating your objects from id
  -int, --interactive                                 interactive mode
  -h, --help                                          display help for command

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文