Setup
Get an API key
Generate an API key from the settings page.
Add the API key to your repository
Go to your repository’s Settings > Secrets and variables > Actions and create a new secret named
HONYAKU_API_KEY with your API key.Inputs
| Name | Required | Default | Description |
|---|---|---|---|
source-file | Yes | Path to the source translation file | |
output-dir | Yes | Output directory for translated files | |
targets | Yes | Comma-separated list of target locales in <locale>:<filename> format | |
api-key | Yes | API key for authentication | |
translator-id | No | gpt_4_1_mini | Translator model ID |
custom-prompt | No | "" | Custom prompt for the translator |
base-url | No | https://honyaku.dev/api/v1 | Base URL of the Honyaku API |
Custom Prompts
You can use thecustom-prompt input to give the translator additional context about your project:
Lock File
The action creates ahonyaku-lock.json file in your repository root to track the state of translations. Commit this file to your repository. It prevents redundant API calls by skipping translations when the source file hasn’t changed.
How It Works
- Computes the SHA-256 hash of the source file and compares it against
honyaku-lock.json. If unchanged, the action exits early. - Uploads the source file to the Honyaku API.
- Decompiles the file to extract translatable strings.
- Queues translation jobs for each target locale.
- Polls for job completion.
- Downloads the translated files and extracts them to the output directory.
- Updates
honyaku-lock.jsonand commits/pushes the changes.