Web QA
static-preflight
A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.
Translation quality assurance for the facts in a string: check that numbers, prices, percentages, URLs, emails and {placeholders} survive translation.
npm install translation-factsA machine or AI translation can read fine and still change $49.99 to $59.99, drop 20%, translate {name} to {nom} or point a link at the wrong page. translation-facts is a translation checker for exactly that. It pulls the facts out of each source string (numbers, prices, percentages, URLs, emails, {placeholders} and terms you want kept) and checks that every one of them is still in the translation.
Tools such as i18next-cli and i18n-check compare keys and placeholders, but not whether the numbers, prices and links inside the text survived. translation-facts has no dependencies and works on JSON message files (flat or nested, i18next and next-intl style) or on single strings, so it fits localization QA in CI.
npx translation-facts en.json de.json fr.json --keep Acmede.json: 6 problems
pricing.title: missing Acme (term)
pricing.standard: changed $49.99 -> 49,99 € (price)
pricing.discount: missing 20% (percent)
pricing.contact: changed https://acme.example/pricing -> https://acme.example/preise (url)
pricing.contact: changed [email protected] -> [email protected] (email)
cart.greeting: changed {name} -> {nom} (token)
fr.json: ok (6 keys checked)
6 problems in 1 of 2 files.import { compareFacts } from 'translation-facts';
compareFacts('Only $7 for 2 seats, save 20%', 'Nur $8 für 2 Plätze');
// {
// missing: [{ kind: 'percent', value: '20%', key: 'percent:20%' }],
// changed: [{ kind: 'price', from: { value: '$7', ... }, to: { value: '$8', ... } }],
// extra: [],
// }import { readFileSync } from 'node:fs';
import { checkTranslations } from 'translation-facts';
const source = JSON.parse(readFileSync('en.json', 'utf8'));
const target = JSON.parse(readFileSync('de.json', 'utf8'));
const { ok, problems } = checkTranslations(source, target, { keepTerms: ['Acme'] });translation-facts <source.json> <target.json> [more targets...] [--keep term,term] [--extra] [--json]Run npx translation-facts en.json de.json. For every key it compares the numbers, prices, percentages, URLs, emails and placeholders in the source string with the translation, and lists what is missing or changed.
No. Keys that are missing or empty in a target file are skipped, because that is a question for a key-parity tool. translation-facts checks the facts inside the strings that are there.
Yes. The CLI exits 0 when there are no problems, 1 when it finds any and 2 for a usage or file error, and --json prints the problems in a structured form. It works on i18next and next-intl style JSON files.
Yes, that is the use case it was built for: it was extracted from Sitessa, where it checks translations before they are saved. It does not judge fluency or meaning, so keep a human review for that.
Web QA
A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.
AI agents
AI agent guardrails for MCP servers: dry run and confirm, signed preview tokens, optimistic concurrency, revision undo and errors that teach the agent.
Author
Saimul Islam is a Forward Deployed Engineer and Solutions Architect. Several of these packages run in production on DeveloperLook, the Bundlewise CRM and Sitessa.