next-intl + Polylens

Translation health for next-intl, caught in CI

Score your next-intl message files on every push and fail the build when a locale regresses.

next-intl throws on a missing message in development but most teams catch only the locales their tests exercise, which is usually the default one. A key missing from de.json sails through CI and surfaces for a real German user instead.

Polylens scans your next-intl message JSON, scores each locale, and lists every missing key, broken ICU argument, malformed plural and stale string, then fails the build when a locale regresses. One curl call, strings stay in your repo.

Locale format: JSON messages (messages/{locale}.json). Point the gate at your messages directory.

next-intl bugs that ship with a green build

Missing messages per locale

A key present in en.json but missing from de.json is invisible until a German user hits it. Polylens lists every gap per locale.

Broken ICU arguments

next-intl uses ICU MessageFormat; a translator who drops {count} or {name} breaks the message. Polylens diffs every ICU argument.

Malformed ICU plurals and selects

A plural block that loses its other branch renders raw syntax. Polylens parses and validates every ICU plural and select.

Stale translations

Reword the source and the old translation stays live with nothing missing. Polylens detects it from scan history.

GitHub Actions: gate next-intl messages on every PR

name: i18n health
on:
  pull_request:
    paths: ['messages/**']
jobs:
  polylens:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: curl -fsSO https://polylens.sh/polylens-ci.mjs
      - run: node polylens-ci.mjs ./messages
        env:
          POLYLENS_TOKEN: ${{ secrets.POLYLENS_TOKEN }}
          FAIL_ON: error
          NO_REGRESSION: 'true'

Add your project token as the POLYLENS_TOKEN repository secret. A failing gate returns HTTP 422, so the build goes red like any other test.

FAQ

How do I check next-intl translations in CI?

Add one step to your pipeline that posts your locale files to Polylens. The gate returns HTTP 422 when a language regresses, so the build fails like any other test. No SDK, one curl call, and your strings never leave your repo.

Will it catch missing keys that next-intl renders as raw strings?

Yes. Missing keys are the first of 13 issue classes Polylens detects, alongside broken placeholders, untranslated copy, malformed plurals, and stale strings. Every missing key is listed per language in the dashboard.

Is Polylens a replacement for next-intl?

No. next-intl renders your translations at runtime; Polylens is the quality gate that scores the locale files before they ship. They sit on opposite ends of the pipeline and work together.

Wire next-intl into a CI gate in ten minutes. Free for one project, no card, strings stay in your repo.