CLI Commands
find-duplicates
Find translation keys defined in BOTH a shared layer and an app layer that consumes it.
Synopsis
the-i18n-cli find-duplicates
Flags
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--locale | string | no | — | Locale code to compare values in (e.g., "de", "en-US"). Defaults to the project default locale. |
--byValue | boolean | no | false | Also group different keys carrying the same value — e.g. common.actions.save and calendar.views.save both "Speichern". Each group says what to do about it: "reuse" (a shared layer already has it — delete the app copies and repoint the call sites), "promote" (move one to a shared layer) or "consolidate" (duplication inside one layer). Default: false. |
--minValueLength | string | no | — | Shortest value worth grouping when byValue is set. Default: 4 — below that, values like "OK" repeat across unrelated namespaces legitimately. |
--outputFile | string | no | — | Absolute path to write the full JSON output to. Only a compact summary is returned to the caller, which is what you want for a result too large to read in one piece. Example: ".i18n-reports/duplicate-keys.json" |
--codequalityOutput | string | no | — | Also write the duplicate keys as a GitLab Code Quality (CodeClimate) JSON report to this file path. |