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:
- Structural (self-namespaced keys). A key prefixed by its own namespace, which nests a redundant layer in the bundle and can make the SDK fall back silently to the source locale. This is the one check that can block a pull request.
- Hardcoded strings. User-facing text that isn't behind a key yet. Advisory.
- Placeholder mismatches. Interpolation variables (
{{name}},{count},%{n}) that drifted from the source. Advisory. - Translation-quality candidates.
same_as_source,looks_like_raw_key, andwrong_language. These are heuristics, so expect some false positives on brand names and acronyms. Always advisory.
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>" } project_id(required): your Sonenta project UUID. If it is missing or empty, the file is ignored.source_lang(optional): reserved for future use.
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.
- Blocking off (default): structural findings are warnings; the Check Run concludes
neutral. - Blocking on: structural findings fail the check; the Check Run concludes
failure.
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).