Open source · Content & Publishing

Locale Fallback Auditor

Check locale fallbacks and translated fields before a page is published.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Audit translation catalogs and the fallback graph that joins them. It reports the three things a fallback graph quietly gets wrong: content that requires a real translation but is served from another locale, an interpolation placeholder that the source text and a translation disagree about, and a fallback cycle.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

node bin/locale-fallback-auditor.mjs --config examples/clean/locale-fallback.config.json

Read the result

Findings sort by (location.file, location.pointer, ruleId, message), each compared by UTF-16 code unit rather than by collation, so the order does not change with the ICU data a Node build happens to carry. Two runs over identical inputs produce byte-identical stdout.

Scope

Enforced bounds. Five configurable limits (maxCatalogBytes, maxCatalogDepth, maxFallbackDepth, maxKeysPerCatalog, maxLocales) and two fixed ones (MAXCONFIGBYTES, MAXPATHLENGTH). Exceeding any of them is an explicit finding or a configuration error, never a silent truncation and never a pass. The defaults are in the docs.