translate-rpgmaker-plugin
v1.0.0
Published
Translate parameters of RPGMaker plugin.
Downloads
4
Readme
Install
Download source code from github and go to project directory run this command:
npm install
Or install by npm directly:
npm install translate-rpgmaker-plugin
Or download single executable app from release page.
Config
Go to project directory, rename .env.example to .env and fill it on demand.
If using executable binary, put .env in the same directory.
DEEPL_KEY=
AZURE_KEY=
AZURE_REGION=
Get key from:
Or just copy text to existing translator manually.
Usage
Use this command in project directory:
node ./translate.js [options] <plugin>
Or use use this command in anywhere:
npx translate-rpgmaker-plugin [options] <plugin>
Or use single executable app:
./translate-rm [options] <plugin>
- On Windows:
.\translate-rm.exe [options] <plugin>
Options
Arguments:
plugin plugin path
Options:
--src <lang> source language
--target <lang> target language
--txt <path> translated text file path to import (default: "")
--output <dir> output Directory (default: "./")
--engine <type> translate engine type (choices: "deepl", "azure", "google", "manual", default: "manual")
--split-text for translate large amounts of text, but be aware of API quotas (default: false)
-h, --help display help for command
Translate engine types:
deepl
needs DEEPL_KEY in env vars
azure
needs AZURE_KEY and AZURE_REGION in env vars
google
use $ gcloud auth application-default login
manual
will generate txt file for manual translation (ex. website version of google translate, microsoft word, etc..)
Available languages:
Programming
import translatePlugin from "translate-rpgmaker-plugin";
const options = {
pluginPath: "path/to/plugin/xxx.js",
srcLang: "en",
targetLang: "zh",
outputDir: "path/to/output", // default: "./"
engineType: "deepl", // default: "manual"
txtPath: "path/to/import/xxx.txt", // default: ""
splitText: false, // default: false
};
await translatePlugin(options);