locale-keysmith 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,9 +8,14 @@ Sort, audit, clean, and translate i18n locale files from the command line.
8
8
  pnpm add -D locale-keysmith
9
9
  ```
10
10
 
11
+ Requires Node.js 22.12 or newer.
12
+
11
13
  ## Quick start
12
14
 
13
15
  ```bash
16
+ # Write a starter config based on the locale files in your project (optional)
17
+ pnpm exec locale-keysmith init
18
+
14
19
  # See which locale files are detected
15
20
  pnpm exec locale-keysmith scan
16
21
 
@@ -25,15 +30,56 @@ file (see [Configuration](#configuration)).
25
30
 
26
31
  Run a command with `pnpm exec locale-keysmith <command>` (or `npx locale-keysmith <command>`).
27
32
 
28
- | Command | What it does |
29
- | -------------------------- | ------------------------------------------------------------------------------- |
30
- | `scan` | List the locale files that were found, with their inferred locale. |
31
- | `health` | Report missing keys, unused keys, and unsorted files. Exits non-zero on issues. |
32
- | `missing` | List keys present in the source locale but missing from the others. |
33
- | `unused` | List source-locale keys that no source file references. |
34
- | `sort` | Sort every locale file's keys alphabetically (nested too). |
35
- | `remove-unused` | Delete unused keys from every locale file. |
36
- | `translate --to <locales>` | Fill missing keys in target locales via Google Translate. |
33
+ | Command | What it does |
34
+ | -------------------------- | ------------------------------------------------------------------------ |
35
+ | `init` | Write a starter `locale-keysmith.config.json` for this project. |
36
+ | `scan` | List the locale files that were found, with their inferred locale. |
37
+ | `health` | Run every check below plus extra keys, empty values and type mismatches. |
38
+ | `missing` | List keys present in the source locale but missing from the others. |
39
+ | `unused` | List source-locale keys that no source file references. |
40
+ | `sort` | Sort every locale file's keys alphabetically (nested too). |
41
+ | `remove-unused` | Delete unused keys from every locale file. |
42
+ | `translate --to <locales>` | Fill missing keys in target locales via Google Translate. |
43
+
44
+ ### Using it in CI
45
+
46
+ `scan`, `missing`, `unused` and `health` accept `--json` and print a machine-readable
47
+ result on stdout (warnings go to stderr, so stdout always parses):
48
+
49
+ ```bash
50
+ pnpm exec locale-keysmith health --json
51
+ ```
52
+
53
+ ```json
54
+ {
55
+ "healthy": false,
56
+ "issueCount": 1,
57
+ "issues": [{ "type": "missing", "file": "src/locales/de.json", "locale": "de", "key": "status.offline" }]
58
+ }
59
+ ```
60
+
61
+ Exit codes:
62
+
63
+ | Code | Meaning |
64
+ | ---- | --------------------------------------------------------------------------------- |
65
+ | `0` | Nothing to report. |
66
+ | `1` | `missing`, `unused` or `health` found something. |
67
+ | `2` | The command itself failed (invalid config, unreadable locale file, API error...). |
68
+
69
+ ### `init`
70
+
71
+ ```bash
72
+ pnpm exec locale-keysmith init # refuses to overwrite an existing config
73
+ pnpm exec locale-keysmith init --force # overwrite it
74
+ ```
75
+
76
+ Looks for locale files in the project (skipping `node_modules`, build output, and test or
77
+ fixture folders) and writes a config with:
78
+
79
+ - `sourceLocale`: `en` (or an English variant) when present, otherwise the locale with the most
80
+ keys.
81
+ - `roots`: the top-level folders that hold locale files, plus `src`, `app`, `pages`,
82
+ `components`, `lib` and `packages` when they exist.
37
83
 
38
84
  ### `scan`
39
85
 
@@ -41,7 +87,19 @@ Run a command with `pnpm exec locale-keysmith <command>` (or `npx locale-keysmit
41
87
  pnpm exec locale-keysmith scan
42
88
  ```
43
89
 
44
- Prints one line per detected locale file, e.g. `en src/locales/en.json`.
90
+ Prints one line per detected locale file, e.g. `en src/locales/en.json`. Matched JSON/YAML
91
+ files that are not locale files (see [How locale files are recognised](#how-locale-files-are-recognised))
92
+ are listed underneath as skipped, so you can see why a file you expected is missing:
93
+
94
+ ```
95
+ en src/locales/en.json
96
+ de src/locales/de.json
97
+
98
+ Skipped 1 file whose name or folder is not a locale code:
99
+ src/locales/english.json
100
+ ```
101
+
102
+ With `--json`, the skipped files are in the `skipped` array.
45
103
 
46
104
  ### `health`
47
105
 
@@ -49,18 +107,33 @@ Prints one line per detected locale file, e.g. `en src/locales/en.json`.
49
107
  pnpm exec locale-keysmith health
50
108
  ```
51
109
 
52
- A one-shot audit that combines the checks below. It prints each problem it finds:
110
+ A one-shot audit. It prints each problem it finds:
53
111
 
54
112
  ```
55
113
  unsorted src/locales/de.json
114
+ duplicate en nav.home
56
115
  missing de status.offline
57
- unused legacy.oldButton
116
+ extra de legacy.oldButton
117
+ empty de app.tagline
118
+ type-mismatch de menu (object in the source, string here)
119
+ unused draft.placeholder
58
120
 
59
- 3 issues found.
121
+ 7 issues found.
60
122
  ```
61
123
 
124
+ | Issue | Meaning |
125
+ | --------------- | ----------------------------------------------------------------------------- |
126
+ | `unsorted` | The file's keys are not in alphabetical order (fix with `sort --write`). |
127
+ | `duplicate` | The file defines a key twice, e.g. `"nav.home"` and `"nav": { "home" }`. |
128
+ | `missing` | A key from the source locale is absent in this locale. |
129
+ | `extra` | This locale has a key the source locale does not (often a leftover). |
130
+ | `empty` | The value is an empty or whitespace-only string, or `null`. |
131
+ | `type-mismatch` | The key holds a different kind of value than in the source (text vs. object). |
132
+ | `unused` | No source file references the key. |
133
+
62
134
  It exits with a non-zero status when any issue is found, so it can gate CI. When everything
63
- is fine it prints `All locale files are healthy.` and exits `0`.
135
+ is fine it prints `All locale files are healthy.` and exits `0`. Keys matching `ignoreKeys`
136
+ are skipped by every check.
64
137
 
65
138
  ### `missing`
66
139
 
@@ -70,6 +143,11 @@ pnpm exec locale-keysmith missing
70
143
 
71
144
  Lists, per non-source locale, the keys that exist in the source locale but are absent.
72
145
 
146
+ Plural keys follow each language's plural rules, as i18next does: English `item_one` /
147
+ `item_other` means Polish needs `item_one`, `item_few`, `item_many` and `item_other`, while
148
+ Japanese only needs `item_other`. Neither is reported as missing or extra for doing so, and
149
+ `translate` fills plural forms the source language lacks from its `_other` text.
150
+
73
151
  ### `unused`
74
152
 
75
153
  ```bash
@@ -98,7 +176,7 @@ pnpm exec locale-keysmith remove-unused --write # delete unused keys and re
98
176
  ```
99
177
 
100
178
  Removes unused keys from **every** locale file (not just the source), then re-sorts them.
101
- Without `--write` it reports how many keys would be removed.
179
+ It lists every key it removes; without `--write` it only lists the keys that would be removed.
102
180
 
103
181
  ### `translate`
104
182
 
@@ -109,15 +187,25 @@ pnpm exec locale-keysmith translate --from en --to de,fr --write
109
187
  ```
110
188
 
111
189
  Translates the source locale's missing keys into each target locale using the Google
112
- Translate API. A target locale that has no file yet is created next to the source file.
113
-
114
- | Option | Default | Description |
115
- | ----------------- | ------- | ----------------------------------------------- |
116
- | `--to <locales>` | — | Comma-separated target locales (required). |
117
- | `--from <locale>` | `en` | Source locale to translate from. |
118
- | `--write` | off | Write results to disk (otherwise preview only). |
119
-
120
- Requires the `GOOGLE_TRANSLATE_API_KEY` environment variable.
190
+ Translate API. A target locale that has no file yet is created next to the source file. Keys
191
+ matching `ignoreKeys` are not translated.
192
+
193
+ | Option | Default | Description |
194
+ | ----------------- | ----------------------- | ----------------------------------------------- |
195
+ | `--to <locales>` | — | Comma-separated target locales (required). |
196
+ | `--from <locale>` | `sourceLocale` (config) | Source locale to translate from. |
197
+ | `--write` | off | Write results to disk (otherwise preview only). |
198
+
199
+ Requires the `GOOGLE_TRANSLATE_API_KEY` environment variable; it is sent in a request header,
200
+ never in the URL.
201
+
202
+ - **Placeholders are protected.** `{{name}}`, `{count}`, ICU messages such as
203
+ `{count, plural, ...}`, `<0>…</0>` and other tags, `$t(key)` and `%s` are passed through
204
+ untranslated. If a translation comes back with a placeholder missing, that key is skipped
205
+ with a warning rather than written broken. (The text inside an ICU message is kept as is.)
206
+ - **Progress is saved.** If a request fails midway, the keys translated so far are written
207
+ before the error is reported, so rerunning only translates what is left.
208
+ - Keys are sent in batches of up to 100 strings per request.
121
209
 
122
210
  ## Configuration
123
211
 
@@ -160,8 +248,30 @@ set either explicitly, which overrides the derived globs:
160
248
  | `src` | `<root>/**/*.{ts,tsx,js,jsx,mjs,cjs,vue,svelte}` per root | Globs for source files (overrides the derived globs). |
161
249
  | `ignoreKeys` | `[]` | Key patterns excluded from audits (`*` wildcard). |
162
250
 
163
- `node_modules`, `dist`, and `.next` are always ignored. The locale of each file is inferred
164
- from its filename (`en.json` → `en`, `pt-BR.yaml` → `pt-BR`).
251
+ The config is checked before any command runs. Wrong types (`"roots": "src"` instead of
252
+ `["src"]`), a `sourceLocale` that is not a locale code, and unknown fields (with a "did you
253
+ mean" hint for typos) are all reported together.
254
+
255
+ `node_modules`, `dist`, and `.next` are always ignored.
256
+
257
+ ### How locale files are recognised
258
+
259
+ A matched file is only treated as a locale file when its name or its directory is a locale
260
+ code, so config files such as `package.json` or `src/data/config.json` are never read or
261
+ rewritten:
262
+
263
+ | Path | Locale | Notes |
264
+ | ------------------------------- | ------- | --------------------------------------- |
265
+ | `src/locales/en.json` | `en` | from the file name |
266
+ | `config/locales/pt-BR.yml` | `pt-BR` | `pt_BR`, `zh-Hant`, `es-419` work too |
267
+ | `public/locales/de/common.json` | `de` | from the directory (i18next namespaces) |
268
+ | `src/data/config.json` | — | skipped: not a locale file |
269
+
270
+ Files are compared only with their own translations: `app/locales/de.json` with
271
+ `app/locales/en.json`, `public/locales/de/common.json` with `public/locales/en/common.json`.
272
+ That lets one config cover several independent sets of locale files (an app and a plugin, or
273
+ several namespaces). Two files for the same locale in one set (say `en.json` and `en.yaml`
274
+ side by side) are reported as an error.
165
275
 
166
276
  ### Key usage detection
167
277
 
@@ -180,12 +290,29 @@ const tagKeys = ["tag.work", "tag.urgent"]; // keys in an array
180
290
  const FOOTER = "footer.copyright"; // key in a constant
181
291
  ```
182
292
 
183
- Any string literal shaped like a dotted key path (e.g. `"a.b.c"`) is counted as used. The one
184
- thing that cannot be resolved statically is a **dynamically built** key, which is therefore
185
- not detected:
293
+ Any string literal shaped like a dotted key path (e.g. `"a.b.c"`) is counted as used, including
294
+ one that only appears in a comment. Keys are also matched the way i18next resolves them at
295
+ runtime:
186
296
 
187
297
  ```ts
188
- t(`theme.${mode}`); // theme.dark / theme.light are NOT detected
298
+ t("cart.item", { count }); // cart.item_one, cart.item_other, cart.item_zero, ... are used
299
+ t("friend.greeting", { context }); // friend.greeting_male, friend.greeting_female, ... are used
300
+ t("common:common.title"); // namespaced: common.title is used
301
+
302
+ const { t } = useTranslation("translation", { keyPrefix: "settings" });
303
+ t("title"); // keyPrefix: settings.title is used (also getFixedT(lng, ns, "settings"))
304
+ ```
305
+
306
+ In a file that sets a `keyPrefix`, every key is counted both with and without the prefix,
307
+ since another `t` in the same file may not use it. A `keyPrefix` built at runtime cannot be
308
+ resolved, so keep its keys out of `remove-unused` with `ignoreKeys`.
309
+
310
+ A **dynamically built** key cannot be resolved statically, so every key under its static
311
+ prefix is treated as used. That is never reported or removed:
312
+
313
+ ```ts
314
+ t(`theme.${mode}`); // every key under theme. (theme.dark, theme.light, ...) is used
315
+ t("errors." + code); // every key under errors. is used
189
316
  ```
190
317
 
191
318
  ## Development
@@ -197,3 +324,11 @@ pnpm run test # Vitest
197
324
  pnpm run coverage # Vitest with v8 coverage
198
325
  pnpm run check # lint + format:check + build + test
199
326
  ```
327
+
328
+ `pnpm run test` never calls Google Translate. To check `translate` against the real API
329
+ (placeholders, HTML entities, batching, error messages), run the live tests with a key. A
330
+ full run sends about 2,000 characters:
331
+
332
+ ```bash
333
+ GOOGLE_TRANSLATE_API_KEY="your-api-key" pnpm run test:live
334
+ ```
@@ -0,0 +1,30 @@
1
+ import type { LocaleFile, LocaleObject } from "./types.js";
2
+ export interface TypeMismatch {
3
+ key: string;
4
+ /** Value kind in the source file: string, number, boolean, null, array or object. */
5
+ source: string;
6
+ target: string;
7
+ }
8
+ /**
9
+ * The keys a target locale should contain: the source keys, with plural forms adjusted to
10
+ * the target language. English `item_one`/`item_other` becomes `item_one`/`item_few`/
11
+ * `item_many`/`item_other` for Polish and just `item_other` for Japanese.
12
+ */
13
+ export declare function expectedKeys(sourceKeys: string[], targetLocale: string): string[];
14
+ export declare function missingKeys(sourceKeys: string[], target: LocaleFile): string[];
15
+ /** Keys in the target that the source does not have (allowing for the target's plural forms). */
16
+ export declare function extraKeys(sourceKeys: string[], target: LocaleFile): string[];
17
+ /**
18
+ * Keys written more than once in a file. `{ "a.b": "x", "a": { "b": "y" } }` defines `a.b`
19
+ * twice, and i18next only ever reads one of the two values.
20
+ */
21
+ export declare function duplicateKeys(file: LocaleFile): string[];
22
+ /** Keys whose value is an empty or whitespace-only string, or null. */
23
+ export declare function emptyValueKeys(file: LocaleFile): string[];
24
+ /** Keys that hold a different kind of value in the target than in the source. */
25
+ export declare function typeMismatches(source: LocaleObject, target: LocaleObject, prefix?: string): TypeMismatch[];
26
+ /**
27
+ * For a plural form the source language does not have (Polish `_few` from English), the
28
+ * source text to translate from: the `_other` form, which i18next treats as the general one.
29
+ */
30
+ export declare function pluralFallbackKey(key: string): string | undefined;
package/dist/checks.js ADDED
@@ -0,0 +1,130 @@
1
+ import { flattenKeys } from "./keys.js";
2
+ // i18next plural keys: `item_one`, `item_other`, and ordinals like `place_ordinal_two`.
3
+ const pluralKey = /^(.+?)_(ordinal_)?(zero|one|two|few|many|other)$/;
4
+ const pluralCategories = ["zero", "one", "two", "few", "many", "other"];
5
+ /**
6
+ * The keys a target locale should contain: the source keys, with plural forms adjusted to
7
+ * the target language. English `item_one`/`item_other` becomes `item_one`/`item_few`/
8
+ * `item_many`/`item_other` for Polish and just `item_other` for Japanese.
9
+ */
10
+ export function expectedKeys(sourceKeys, targetLocale) {
11
+ const available = new Set(sourceKeys);
12
+ const expanded = new Set();
13
+ const expected = [];
14
+ for (const key of sourceKeys) {
15
+ const plural = parsePluralKey(key, available);
16
+ if (!plural) {
17
+ expected.push(key);
18
+ continue;
19
+ }
20
+ if (expanded.has(plural.stem)) {
21
+ continue;
22
+ }
23
+ expanded.add(plural.stem);
24
+ // `_zero` is optional in i18next, so it is only expected when the source has one.
25
+ const categories = categoriesFor(targetLocale, plural.ordinal);
26
+ const wanted = pluralCategories.filter((category) => categories.has(category) || (category === "zero" && available.has(`${plural.stem}zero`)));
27
+ expected.push(...wanted.map((category) => `${plural.stem}${category}`));
28
+ }
29
+ return expected;
30
+ }
31
+ export function missingKeys(sourceKeys, target) {
32
+ const present = new Set(flattenKeys(target.data));
33
+ return expectedKeys(sourceKeys, target.locale).filter((key) => !present.has(key));
34
+ }
35
+ /** Keys in the target that the source does not have (allowing for the target's plural forms). */
36
+ export function extraKeys(sourceKeys, target) {
37
+ const expected = new Set(expectedKeys(sourceKeys, target.locale));
38
+ const available = new Set(sourceKeys);
39
+ return flattenKeys(target.data).filter((key) => {
40
+ if (expected.has(key)) {
41
+ return false;
42
+ }
43
+ // An optional `_zero` form is fine wherever the base key is a plural.
44
+ const plural = pluralKey.exec(key);
45
+ return !(plural?.[3] === "zero" && available.has(`${plural[1]}_${plural[2] ?? ""}other`));
46
+ });
47
+ }
48
+ /**
49
+ * Keys written more than once in a file. `{ "a.b": "x", "a": { "b": "y" } }` defines `a.b`
50
+ * twice, and i18next only ever reads one of the two values.
51
+ */
52
+ export function duplicateKeys(file) {
53
+ const seen = new Set();
54
+ const duplicates = new Set();
55
+ for (const [key] of leafEntries(file.data)) {
56
+ (seen.has(key) ? duplicates : seen).add(key);
57
+ }
58
+ return [...duplicates];
59
+ }
60
+ /** Keys whose value is an empty or whitespace-only string, or null. */
61
+ export function emptyValueKeys(file) {
62
+ return leafEntries(file.data)
63
+ .filter(([, value]) => value === null || (typeof value === "string" && value.trim() === ""))
64
+ .map(([key]) => key);
65
+ }
66
+ /** Keys that hold a different kind of value in the target than in the source. */
67
+ export function typeMismatches(source, target, prefix = "") {
68
+ return Object.entries(source).flatMap(([key, sourceValue]) => {
69
+ if (!Object.hasOwn(target, key)) {
70
+ return [];
71
+ }
72
+ const path = prefix ? `${prefix}.${key}` : key;
73
+ const targetValue = target[key];
74
+ const sourceKind = kindOf(sourceValue);
75
+ const targetKind = kindOf(targetValue);
76
+ if (sourceKind !== targetKind) {
77
+ return [{ key: path, source: sourceKind, target: targetKind }];
78
+ }
79
+ return sourceKind === "object"
80
+ ? typeMismatches(sourceValue, targetValue, path)
81
+ : [];
82
+ });
83
+ }
84
+ /**
85
+ * For a plural form the source language does not have (Polish `_few` from English), the
86
+ * source text to translate from: the `_other` form, which i18next treats as the general one.
87
+ */
88
+ export function pluralFallbackKey(key) {
89
+ const plural = pluralKey.exec(key);
90
+ return plural && plural[3] !== "other" ? `${plural[1]}_${plural[2] ?? ""}other` : undefined;
91
+ }
92
+ function parsePluralKey(key, available) {
93
+ const match = pluralKey.exec(key);
94
+ if (!match) {
95
+ return undefined;
96
+ }
97
+ const stem = `${match[1]}_${match[2] ?? ""}`;
98
+ // Only treat it as a plural when the group has the mandatory `_other` form; a key like
99
+ // `step_one` on its own is just a name.
100
+ return available.has(`${stem}other`) ? { stem, ordinal: Boolean(match[2]) } : undefined;
101
+ }
102
+ function categoriesFor(locale, ordinal) {
103
+ const tag = locale.replaceAll("_", "-");
104
+ const type = ordinal ? "ordinal" : "cardinal";
105
+ try {
106
+ if (Intl.PluralRules.supportedLocalesOf(tag).length > 0) {
107
+ return new Set(new Intl.PluralRules(tag, { type }).resolvedOptions().pluralCategories);
108
+ }
109
+ }
110
+ catch {
111
+ // Not a valid tag: fall through and keep every form.
112
+ }
113
+ return new Set(pluralCategories);
114
+ }
115
+ function leafEntries(value, prefix = "") {
116
+ return Object.entries(value).flatMap(([key, child]) => {
117
+ const path = prefix ? `${prefix}.${key}` : key;
118
+ return kindOf(child) === "object" ? leafEntries(child, path) : [[path, child]];
119
+ });
120
+ }
121
+ function kindOf(value) {
122
+ if (value === null) {
123
+ return "null";
124
+ }
125
+ if (Array.isArray(value)) {
126
+ return "array";
127
+ }
128
+ return typeof value;
129
+ }
130
+ //# sourceMappingURL=checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.js","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGrC,wFAAwF;AACxF,MAAM,SAAS,GAAG,kDAAkD,CAAC;AACrE,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,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