GitHub Action · react-i18next

i18n coverage for react-i18next

The Lokali GitHub Action scans your React binding's default public/locales/{lng}/{namespace}.json layout on every PR, posts a per-language coverage table, and opens a Coverage delta PR the moment a new key lands in en.

public/locales/{lng}/{namespace}.json
Scan your React repo → Install the GitHub App

What the Action checks for react-i18next

Lokali watches the same globs the React binding's i18n.ts provider already knows. If you ship a non-default layout, the action falls back to scanning from the repo root for any {lng}/{namespace}.json pair.

DETECT — public/locales
Default public/locales/{lng}/{namespace}.json layout used by useTranslation() providers out of the box.
DETECT — provider tree
Reads src/i18n.ts|js and respects any explicit backend.loadPath overrides the developer set.
DETECT — dual namespaces
Treats common and translation as independent namespaces and reports each one separately in the PR comment.
DETECT — YAML alt
YAML sibling public/locales/{lng}/{namespace}.yml files are picked up when present alongside JSON.
DETECT — nested namespaces
Subdirectories like public/locales/{lng}/auth/login.json are scanned recursively and counted under their parent namespace.
DETECT — interpolation
ICU-style {name} and {{count}} placeholders are diffed per locale so untranslated placeholders show up as missing keys, not silent fallbacks.

Common coverage gaps the Action flags

These are the three failure modes we see most often in real react-i18next repos. Each one ships the same way — as a per-locale missing-keys row in the PR comment.


Sample Action report on a react-i18next PR

What lokali[bot] posts in the PR thread after a push touches public/locales/en/common.json. The same table is also dropped into the first-run Coverage delta PR.

lokali[bot] commented · i18n Coverage Report
## i18n Coverage Report · react-i18next

Baseline namespace: `common` · 184 keys · locales: 6

| Locale   | Coverage | Total | Translated | Missing |
|----------|----------|-------|------------|---------|
| 🟢 en    |   100%   |  184  |    184     |    0    |
| 🟢 pt-BR |    98%   |  184  |    181     |    3    |
| 🟡 fr    |    92%   |  184  |    170     |   14    |
| 🟡 de    |    88%   |  184  |    162     |   22    |
| 🔴 ja    |    71%   |  184  |    131     |   53    |
| 🔴 ar    |    42%   |  184  |     78     |  106    |

Top missing keys (across all locales):
  • `common.signInCta`  (missing in fr, de, ja, ar, pt-BR)
  • `common.billing.invoiceSuccess`  (missing in de, ja, ar, pt-BR)
  • `common.placeholder.welcomeName`  (placeholder drift in de)

Coverage delta PR opened: #1234 — `lokali: coverage-delta-2026-08-11`

Scan a react-i18next repo or install the Action

One URL works for both. Coverage comments arrive on your next PR, and the Coverage delta PR closes the gap automatically.

Run a free i18n audit → ← Back to integrations hub