Score your Angular i18n locale files on every push and fail the build when a language regresses.
Angular i18n compiles translations at build time, so a missing unit can fall back to the source language and ship English to a French user with no error in the logs. Coverage across every locale is rarely tested.
Polylens scans your extracted locale files, scores each language, and lists every missing translation, broken ICU expression, malformed plural and stale string, then fails CI on regression. One curl call, strings stay in your repo.
Locale format: JSON or XLIFF-exported JSON (src/locale/messages.{lang}.json). Point the gate at your locale directory (convert XLIFF to JSON in a prior step if needed).
An untranslated unit renders the source language to users of another locale. Polylens flags every missing translation.
Angular i18n uses ICU for plurals and select; a dropped argument breaks the message. Polylens validates every ICU expression.
Source-language text left in a target locale is invisible to a key diff. Polylens flags untranslated copy directly.
A reworded source leaves old translations live with nothing missing. Polylens detects staleness from scan history.
name: i18n health
on:
pull_request:
paths: ['src/locale/**']
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 ./src/locale
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.
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.
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.
No. Angular i18n 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 Angular i18n into a CI gate in ten minutes. Free for one project, no card, strings stay in your repo.