Translate

GitHub Action

On every push it translates the new keys and opens a pull request. You review and merge it like any other change.

.github/workflows/translate.yml
on:
  push:
    branches: [main]
    paths: ["locales/en.json"]

permissions:
  contents: write
  pull-requests: write

jobs:
  translate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: kaeris-io/kaeris-action@v1
        id: kaeris
        with:
          source: locales/en.json
          languages: de,ja,fr
          # api-key: ${{ secrets.KAERIS_API_KEY }}
      - if: steps.kaeris.outputs.changed == 'true'
        uses: peter-evans/create-pull-request@v6
        with:
          branch: kaeris/i18n-updates
          title: "i18n: new translations"
After a push that adds a key

i18n: new translations

kaeris/i18n-updates → main

M locales/de.json M locales/ja.json M locales/fr.json M kaeris.lock

Only new and edited keys are sent: only-new is on by default and kaeris.lock remembers the rest. Without api-key the free demo limits apply.

Inputs

InputMeaning
modetranslate (default) or check: no API call, fails the job when a translation is broken.
source, languagesThe source file and the comma-separated target languages. Required.
outFolder of the language files. Default: next to the source.
only-newtrue by default: translate only what changed.
api-key, openrouter-keyYour KAERIS key; the OpenRouter key only for Lifetime.
tone, icuThe same as the CLI flags.
strict, sarif-fileCheck mode: fail on warnings and extra keys too; write the SARIF report.

Outputs: changed, summary, missing, placeholder-issues, check-exit-code, translate-exit-code. Source and full workflows: github.com/kaeris-io/kaeris-action.

CI recipes (in English): GitHub Actions · GitLab CI · pre-commit · Make and npm scripts