{"id":47685912,"url":"https://github.com/guzzdev/i18n-parity","last_synced_at":"2026-04-02T14:50:02.495Z","repository":{"id":329368250,"uuid":"1117093814","full_name":"guzzdev/i18n-parity","owner":"guzzdev","description":"Validate parity of translation keys across locales: reports missing, empty, and extra keys with coverage (%).","archived":false,"fork":false,"pushed_at":"2025-12-19T03:56:51.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T00:53:08.554Z","etag":null,"topics":["cicd","i18n","lint","next-intl"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/i18n-parity","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guzzdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-15T20:29:04.000Z","updated_at":"2025-12-19T03:56:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/guzzdev/i18n-parity","commit_stats":null,"previous_names":["guzzdev/i18n-parity"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/guzzdev/i18n-parity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzzdev%2Fi18n-parity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzzdev%2Fi18n-parity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzzdev%2Fi18n-parity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzzdev%2Fi18n-parity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guzzdev","download_url":"https://codeload.github.com/guzzdev/i18n-parity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzzdev%2Fi18n-parity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31308446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","i18n","lint","next-intl"],"created_at":"2026-04-02T14:49:59.622Z","updated_at":"2026-04-02T14:50:02.484Z","avatar_url":"https://github.com/guzzdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# i18n-parity\n\nValidate parity of translation keys across locales: reports missing, empty, and extra keys with coverage (%)\n\n[![npm version](https://img.shields.io/npm/v/i18n-parity.svg)](https://www.npmjs.com/package/i18n-parity)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n\u003e [!NOTE]\n\u003e 1. This tool is an open-source version derived from a private commercial solution used internally.\n\u003e\n\u003e 2. Built for [next-intl](https://next-intl.dev/) but works with any JSON-based i18n setup.\n\nFeel free to contribute or contact me.\n\n## Features\n\n - Missing keys detection\n - Empty value detection \n - Extra keys detection\n - Coverage metrics\n - CI/CD\n - Fast \u0026 lightweight\n\n\n## Install\n\n```bash\nnpm i -D i18n-parity\n\nbun add -d i18n-parity\n```\n\n## Usage\n\n```bash\ni18n-parity --ref en --dir ./src/locales\n```\n\n### Options\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--ref` | Reference locale (filename w/o .json) | `fr` |\n| `--dir` | Directory with locale JSON files | `./src/locales` |\n| `--format` | `table` or `json` | `table` |\n| `--fail-on` | Exit with error on: `missing`, `empty`, `extra` | none |\n\n### Examples\n\n```bash\n# Basic usage\ni18n-parity --ref en --dir ./locales\n\n# JSON output for CI\ni18n-parity --format json\n\n# Fail on missing or empty translations\ni18n-parity --fail-on missing,empty\n```\n\nOutput looks like this:\n\n```\n┌─────────┬──────────┬─────────┬───────┬───────┐\n│ locale  │ coverage │ missing │ empty │ extra │\n├─────────┼──────────┼─────────┼───────┼───────┤\n│ es      │ 85.71%   │ 1       │ 1     │ 1     │\n│ de      │ 100%     │ 0       │ 0     │ 0     │\n└─────────┴──────────┴─────────┴───────┴───────┘\n\n[es] Missing keys (1):\n  - navigation.compass\n[es] Empty keys (1):\n  - commands.anchor\n```\n\n## API\n\n```typescript\nimport { checkI18n, diff } from \"i18n-parity\";\n\nconst results = await checkI18n(\"en\", \"src/locales\");\nconsole.log(results[0].coveragePercent);\n```\n\nThe `DiffResult` type:\n\n```typescript\ntype DiffResult = {\n  locale: string;\n  totalLeafKeys: number;\n  presentLeafKeys: number;\n  coveragePercent: number;\n  missingKeys: string[];\n  emptyKeys: string[];\n  extraKeys: string[];\n}\n```\n\n## CI Setup\n\nGitHub Actions:\n\n```yaml\n- uses: oven-sh/setup-bun@v2\n- run: bun install\n- run: bun i18n-parity --ref en --dir ./locales --fail-on missing,empty\n```\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguzzdev%2Fi18n-parity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguzzdev%2Fi18n-parity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguzzdev%2Fi18n-parity/lists"}