跳到内容
Sonenta

Guide · CI

Catch i18n problems on every pull request

Sonenta reviews the internationalization impact of a pull request, mis-structured keys, hardcoded strings, missing placeholders, and translation-quality candidates, and reports them right on the diff. It's advisory by default, with the option to block a pull request on real structure errors.

What it checks

On the files a pull request changes:

Available today: the sonenta ci command

sonenta ci ships in @sonenta/cli and runs offline. Point it at a base ref and it prints a pull-request-ready report.

terminal
1npx @sonenta/cli ci --base origin/main --source-lang en

Flags: --base <ref> (default: the PR base, else origin/main), --source-lang <code> (enables the same-as-source check), --strict (exit non-zero when the status is FAIL), --format markdown|json, --out <file>, --dir <path>, --src <dir>.

Wire it into a GitHub Action:

.github/workflows/i18n.yml
1name: i18n2on: pull_request3jobs:4  i18n:5    runs-on: ubuntu-latest6    steps:7      - uses: actions/checkout@v48        with:9          fetch-depth: 010      - uses: actions/setup-node@v411        with:12          node-version: 2013      - run: npx @sonenta/cli ci --base "origin/${{ github.base_ref }}" --source-lang en

Offline, so glossary-blind

sonenta ci has no access to your Sonenta glossary, so the quality checks (same_as_source, looks_like_raw_key) can flag kept-as-source terms (brand names, proper nouns) as false positives. They are advisory and never fail the build. The authoritative translation-quality verdict is validate_translations (online, glossary-aware); run it before you publish.

The hosted GitHub App (opening soon)

Not yet publicly available. The hosted Sonenta i18n App is not on the GitHub Marketplace yet and self-serve installation isn't open. This section describes how it works; general availability will be confirmed here when it opens.

The hosted App posts a native GitHub Check Run on each pull request, with inline annotations at the exact file and line, and supports both advisory and blocking modes. It requests these repository permissions: Contents (read), Checks (read and write), and Pull requests (read and write), and subscribes to the Pull request event.

Configure with .sonenta/ci.json

Add a .sonenta/ci.json file at the root of your repository (it is read from the pull request's HEAD):

.sonenta/ci.json
1{ "project_id": "<your Sonenta project UUID>" }

No other fields are read.

Advisory or blocking

By default the check is advisory: findings show up as annotations and the Check Run concludes neutral, so a pull request is never blocked. To require a green structure check, turn on Block pull requests on i18n structure errors for the project, in the client dashboard under GitHub CI. Only the structural check can block; quality, hardcoded, and placeholder findings always stay advisory.

What the result looks like

A Check Run named Sonenta i18n with a title, a summary, and inline annotations, one per finding at its file and line. Annotation levels: structural is a failure when blocking is on, otherwise a warning; quality and hardcoded are warnings. The run concludes failure (a structural error with blocking on), neutral (advisory findings only), or success (nothing found).

See a real check on a public pull request

Next