Skip to content
eliwarePublic

About

A tool for translating locale files for discord apps built on @eliware/discord

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

eliware.org

@eliware/translate npm License CI

A tool for translating locale files for discord apps built on @eliware/discord

Table of Contents

Features

Translate en-US.json into supported Discord locales. Translate Discord command manifests.

Requirements

Use Node.js 26 or later. Use an OpenAI API key.

Setup

Install the package with npm install @eliware/translate. Create .env at the installed package root. Set OPENAI_API_KEY in that file.

Usage

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.

Development

Run npm install to install dependencies. Read documentation and specifications.

Testing

Run npm test for aggregate checks. Run npm run lint for lint checks.

Troubleshooting

Check .env and OPENAI_API_KEY when setup fails. Check the input JSON when the CLI skips a file.

Security

Keep API keys out of source control. The CLI sends source JSON to OpenAI. Examine generated files before you share them.

Configuration

Set OPENAI_API_KEY in .env at the installed package root. Locale mode uses prompt.json. Command mode uses prompt-commands.json.

Operations

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.

Commands

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.

Exit codes

The CLI returns 0 when a run completes without errors. It returns 1 when setup or file processing fails.

Support

For help, questions, or to chat with the author and community, visit:

Discordeliware.org

eliware.org on Discord

Links

License

MIT © Eliware

About

A tool for translating locale files for discord apps built on @eliware/discord

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages