Reference

GitHub Action

Find missing translation keys and translate them via LLM. Provider-agnostic: supports OpenAI, Anthropic, and Google.

The action installs @the-i18n-kit/cli and the SDK matching the chosen provider, runs the translate command, and opens a pull request with what it wrote. The command owns the pass/fail decision and reports it as an exit code; the action reads counts for its outputs and the log only.

Inputs and outputs below are generated from action.yml, so a workflow that sets an input listed here is a workflow GitHub accepts.

Inputs

InputRequiredDefaultDescription
provideryesLLM provider: openai, anthropic, or google
modelyesModel name (e.g. gpt-4o, claude-3-5-sonnet-20241022, gemini-2.0-flash)
api_keyyesAPI key for the chosen provider
layeryesLayer name to translate (e.g. common, dashboard)
localesnoComma-separated target locales (default: all except source)
source_localenoReference/source locale (default: project default from .i18n-mcp.json)
keysnoComma-separated keys to translate (default: all missing)
batch_sizeno50Keys per LLM call (default: 50)
dry_runnofalsePreview translations without writing files
fail_on_failednofalseFail the step (exit 2) when any key failed to translate. Off by default: a partly failed run still writes what succeeded, and the failed keys stay missing for the next run to retry.
working_directoryno${{ github.workspace }}Project root directory (default: github.workspace)
create_prnotrueCreate a PR with the translated files
pr_branchnoBranch name for the PR (default: i18n/translate-missing-<timestamp>)
commit_messagenoCommit message (default: "chore(i18n): translate missing keys via <provider>")
pr_titlenoPR title (default: "chore(i18n): translate missing keys")
github_tokenno${{ github.token }}GitHub token for creating PRs. Defaults to GITHUB_TOKEN.
base_branchnoBase branch for the PR (default: the branch that triggered the workflow)
cli_versionnolatestthe-i18n-cli version to install (npm dist-tag or version). Use "skip" if the CLI is already installed (e.g. a local build).

Outputs

OutputDescription
gate_trippedNames of any CI gates that tripped. The job fails after the translations are committed.
translated_countNumber of keys translated
failed_countNumber of keys that failed to translate
pr_urlURL of the created PR (only when create_pr is true)
A tripped gate does not skip the pull request step. The step that runs translate records the gate in gate_tripped and lets the commit happen, and a later step fails the job — so a run that found something still keeps the translations it produced.
Copyright © 2026