A tool for translating locale files for discord apps built on @eliware/discord
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- Configuration
- Operations
- Commands
- Exit codes
- Support
- Links
- License
Translate en-US.json into supported Discord locales. Translate Discord command manifests.
Use Node.js 26 or later. Use an OpenAI API key.
Install the package with npm install @eliware/translate. Create .env at the installed package root. Set OPENAI_API_KEY in that file.
Run translate --yes from the target repository root to translate files. Read the user guide for setup and use. Read the release notes for changes.
Run npm install to install dependencies. Read documentation and specifications.
Run npm test for aggregate checks. Run npm run lint for lint checks.
Check .env and OPENAI_API_KEY when setup fails. Check the input JSON when the CLI skips a file.
Keep API keys out of source control. The CLI sends source JSON to OpenAI. Examine generated files before you share them.
Set OPENAI_API_KEY in .env at the installed package root. Locale mode uses prompt.json. Command mode uses prompt-commands.json.
Run the CLI from the target repository root. The CLI writes files only when you use --yes. It can overwrite existing locale files and command manifests.
Run translate or translate --help to read the help text. Run translate --dry-run to list target files.
Run translate --yes to send API requests and write translations. Run translate --version to show the package version.
Run translate --file lock.json --dry-run to list one command manifest. Add --debug to show error details.
The CLI returns 0 when a run completes without errors. It returns 1 when setup or file processing fails.
For help, questions, or to chat with the author and community, visit:


