i18next-cli 1.80.6 → 1.81.0
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 +1 -1
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/ast-visitors.js +5 -6
- package/dist/cjs/extractor/parsers/expression-resolver.js +19 -9
- package/dist/cjs/linter.js +41 -5
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/ast-visitors.js +5 -6
- package/dist/esm/extractor/parsers/expression-resolver.js +19 -9
- package/dist/esm/linter.js +41 -5
- package/package.json +1 -1
- package/types/extractor/core/ast-visitors.d.ts.map +1 -1
- package/types/extractor/parsers/expression-resolver.d.ts +3 -0
- package/types/extractor/parsers/expression-resolver.d.ts.map +1 -1
- package/types/linter.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -374,7 +374,7 @@ npx i18next-cli lint
|
|
|
374
374
|
**What it checks:**
|
|
375
375
|
|
|
376
376
|
- **Hardcoded strings** *(error)* — user-facing text in JSX elements and attributes that isn't wrapped in `t()`/`<Trans>`.
|
|
377
|
-
- **Interpolation parameters** *(error)* — mismatches between `{{placeholders}}` in a translation and the params passed to `t()` (missing or unused). Toggle with `lint.checkInterpolationParams` (default: `true`). With `extract.messageFormat: 'icu'` or `'mf2'` the arguments come from the ICU or MF2 parser (`{name}`, `{$name}`), so plurals like `one {{count} row}` are not read as `{{…}}` interpolation.
|
|
377
|
+
- **Interpolation parameters** *(error)* — mismatches between `{{placeholders}}` in a translation and the params passed to `t()` (missing or unused), also for selector calls like `t($ => $.user.greeting, { name })`. Toggle with `lint.checkInterpolationParams` (default: `true`). With `extract.messageFormat: 'icu'` or `'mf2'` the arguments come from the ICU or MF2 parser (`{name}`, `{$name}`), so plurals like `one {{count} row}` are not read as `{{…}}` interpolation.
|
|
378
378
|
- **ICU / MF2 messages** *(error, only with `extract.messageFormat: 'icu'` or `'mf2'`)*: every value in the translation files of all locales is parsed. The linter reports, with file, key and line (JSON files):
|
|
379
379
|
- syntax errors with the parser's message, e.g. `greeting: ICU syntax error: EXPECT_ARGUMENT_CLOSING_BRACE at column 7`
|
|
380
380
|
- argument names that differ from the primary language (a renamed or missing `{name}`). `#` in a plural is not an argument
|
package/dist/cjs/cli.js
CHANGED
|
@@ -39,7 +39,7 @@ const program = new commander.Command();
|
|
|
39
39
|
program
|
|
40
40
|
.name('i18next-cli')
|
|
41
41
|
.description('A unified, high-performance i18next CLI.')
|
|
42
|
-
.version('1.
|
|
42
|
+
.version('1.81.0') // This string is replaced with the actual version at build time by rollup
|
|
43
43
|
.addHelpText('after', '\nUsing an AI coding agent? Install the i18next-localization skill: npx skills add i18next/i18next-cli\n');
|
|
44
44
|
// new: global config override option
|
|
45
45
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
@@ -890,12 +890,11 @@ class ASTVisitors {
|
|
|
890
890
|
// The single argument to Object.keys/values must be a known identifier
|
|
891
891
|
const mapArg = this.expressionResolver.unwrapNamespace(obj.arguments?.[0]?.expression);
|
|
892
892
|
if (mapArg?.type === 'Identifier') {
|
|
893
|
-
const
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
}
|
|
893
|
+
const values = isKeys
|
|
894
|
+
? this.expressionResolver.getObjectKeys(mapArg.value)
|
|
895
|
+
: Object.values(this.expressionResolver.getObjectMap(mapArg.value) ?? {});
|
|
896
|
+
if (values?.length) {
|
|
897
|
+
return this.extractCallbackParam(node, values, elementParamIndex);
|
|
899
898
|
}
|
|
900
899
|
}
|
|
901
900
|
}
|
|
@@ -173,6 +173,10 @@ class ExpressionResolver {
|
|
|
173
173
|
// Shared (cross-file) table for as-const object maps, `export const LABELS = { … } as const`,
|
|
174
174
|
// so `LABELS.save` and `Object.keys(LABELS)` resolve in importing files.
|
|
175
175
|
sharedObjectMapTable = new ModuleTable(this, true);
|
|
176
|
+
// Shared (cross-file) literal keys of every object declared as `const MAP = { … }`, whatever
|
|
177
|
+
// its values are: the map tables above only hold string values, `keyof typeof MAP` and
|
|
178
|
+
// `Object.keys(MAP)` need all keys (#317).
|
|
179
|
+
sharedObjectKeysTable = new ModuleTable(this, true);
|
|
176
180
|
// Shared (cross-file) table for type aliases — populated alongside typeAliasTable.
|
|
177
181
|
// Persists across resetFileSymbols() so exported type aliases are visible to importers.
|
|
178
182
|
sharedTypeAliasTable = new ModuleTable(this);
|
|
@@ -497,6 +501,7 @@ class ExpressionResolver {
|
|
|
497
501
|
if (unwrappedInit.type === 'ObjectExpression' && Array.isArray(unwrappedInit.properties)) {
|
|
498
502
|
this.objectLiterals.set(name, unwrappedInit);
|
|
499
503
|
const map = {};
|
|
504
|
+
const keys = [];
|
|
500
505
|
for (const p of unwrappedInit.properties) {
|
|
501
506
|
if (!p || p.type !== 'KeyValueProperty')
|
|
502
507
|
continue;
|
|
@@ -504,6 +509,7 @@ class ExpressionResolver {
|
|
|
504
509
|
const keyName = keyNode?.type === 'Identifier' ? keyNode.value : keyNode?.type === 'StringLiteral' ? keyNode.value : undefined;
|
|
505
510
|
if (!keyName)
|
|
506
511
|
continue;
|
|
512
|
+
keys.push(keyName);
|
|
507
513
|
const valExpr = p.value;
|
|
508
514
|
const vals = this.resolvePossibleStringValuesFromExpression(valExpr);
|
|
509
515
|
// Only capture properties that we can statically resolve to a single string.
|
|
@@ -511,6 +517,8 @@ class ExpressionResolver {
|
|
|
511
517
|
map[keyName] = vals[0];
|
|
512
518
|
}
|
|
513
519
|
}
|
|
520
|
+
if (keys.length > 0)
|
|
521
|
+
this.sharedObjectKeysTable.set(name, keys);
|
|
514
522
|
// If at least one property was resolvable, record the partial map.
|
|
515
523
|
if (Object.keys(map).length > 0) {
|
|
516
524
|
this.variableTable.set(name, map);
|
|
@@ -1194,6 +1202,14 @@ class ExpressionResolver {
|
|
|
1194
1202
|
return v;
|
|
1195
1203
|
return this.sharedObjectMapTable.get(name) ?? this.sharedEnumTable.get(name);
|
|
1196
1204
|
}
|
|
1205
|
+
/** All keys of an object map, also those whose value is not a string, or of an enum. */
|
|
1206
|
+
getObjectKeys(name) {
|
|
1207
|
+
const keys = this.sharedObjectKeysTable.get(name);
|
|
1208
|
+
if (keys)
|
|
1209
|
+
return keys;
|
|
1210
|
+
const map = this.getObjectMap(name);
|
|
1211
|
+
return map ? Object.keys(map) : undefined;
|
|
1212
|
+
}
|
|
1197
1213
|
/**
|
|
1198
1214
|
* Capture a TypeScript enum declaration so members can be resolved later.
|
|
1199
1215
|
* Accepts SWC node shapes like `TsEnumDeclaration` / `TSEnumDeclaration`.
|
|
@@ -1626,15 +1642,9 @@ class ExpressionResolver {
|
|
|
1626
1642
|
const exprName = inner.exprName ?? inner.expr ?? inner.entityName;
|
|
1627
1643
|
const varName = this.typeQueryName(exprName);
|
|
1628
1644
|
if (varName) {
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
return Object.keys(v);
|
|
1633
|
-
}
|
|
1634
|
-
// Also check sharedEnumTable (enum keys)
|
|
1635
|
-
const ev = this.sharedEnumTable.get(varName);
|
|
1636
|
-
if (ev)
|
|
1637
|
-
return Object.keys(ev);
|
|
1645
|
+
const keys = this.getObjectKeys(varName);
|
|
1646
|
+
if (keys)
|
|
1647
|
+
return keys;
|
|
1638
1648
|
}
|
|
1639
1649
|
}
|
|
1640
1650
|
}
|
package/dist/cjs/linter.js
CHANGED
|
@@ -11,6 +11,8 @@ var wrapOra = require('./utils/wrap-ora.js');
|
|
|
11
11
|
var jsxAttributes = require('./utils/jsx-attributes.js');
|
|
12
12
|
var astUtils = require('./extractor/parsers/ast-utils.js');
|
|
13
13
|
var functionMatcher = require('./extractor/utils/function-matcher.js');
|
|
14
|
+
var astVisitors = require('./extractor/core/ast-visitors.js');
|
|
15
|
+
var nestedObject = require('./utils/nested-object.js');
|
|
14
16
|
var messageFormat = require('./utils/message-format.js');
|
|
15
17
|
var lintBaseline = require('./utils/lint-baseline.js');
|
|
16
18
|
var funnelMsgTracker = require('./utils/funnel-msg-tracker.js');
|
|
@@ -65,7 +67,10 @@ async function loadPrimaryTranslationValues(config) {
|
|
|
65
67
|
try {
|
|
66
68
|
const raw = await promises.readFile(filePath, 'utf-8');
|
|
67
69
|
const json = JSON.parse(raw);
|
|
68
|
-
|
|
70
|
+
// Nested resources too: `{ "a": { "b": "…" } }` → "a.b"
|
|
71
|
+
const keySeparator = config.extract?.keySeparator ?? '.';
|
|
72
|
+
for (const k of nestedObject.getNestedKeys(json, keySeparator)) {
|
|
73
|
+
const v = nestedObject.getNestedValue(json, k, keySeparator);
|
|
69
74
|
if (typeof v === 'string')
|
|
70
75
|
result.set(k, v);
|
|
71
76
|
}
|
|
@@ -83,7 +88,7 @@ const i18nextOptionKeys = new Set([
|
|
|
83
88
|
'defaultValue', 'count', 'context', 'ns', 'lng', 'lngs',
|
|
84
89
|
'fallbackLng', 'returnDetails', 'returnObjects', 'joinArrays',
|
|
85
90
|
'postProcess', 'interpolation', 'skipInterpolation', 'replace',
|
|
86
|
-
'ordinal', 'keySeparator', 'nsSeparator', 'tDescription',
|
|
91
|
+
'ordinal', 'keySeparator', 'nsSeparator', 'tDescription', 'keyPrefix',
|
|
87
92
|
]);
|
|
88
93
|
function isI18nextOptionKey(key) {
|
|
89
94
|
if (i18nextOptionKeys.has(key))
|
|
@@ -178,6 +183,28 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
178
183
|
return code.substring(0, pos).split('\n').length;
|
|
179
184
|
};
|
|
180
185
|
const callSites = [];
|
|
186
|
+
// The keys the extractor resolves for each call (selector path, keyPrefix and namespace scope
|
|
187
|
+
// included), walked once and only for a file with a selector call: `t($ => $.a.b)` → ['a.b']
|
|
188
|
+
let keysByCall;
|
|
189
|
+
const keysOfCall = (call) => {
|
|
190
|
+
if (!keysByCall) {
|
|
191
|
+
const found = new Map();
|
|
192
|
+
let current;
|
|
193
|
+
const silent = { info() { }, warn() { }, error() { } };
|
|
194
|
+
const context = {
|
|
195
|
+
addKey: ({ key }) => { found.set(current, [...(found.get(current) ?? []), key]); },
|
|
196
|
+
config,
|
|
197
|
+
logger: silent,
|
|
198
|
+
getVarFromScope: () => undefined,
|
|
199
|
+
setVarInScope: () => { },
|
|
200
|
+
};
|
|
201
|
+
const visitors = new astVisitors.ASTVisitors(config, context, silent, { onBeforeVisitNode: (node) => { current = node; } });
|
|
202
|
+
visitors.setCurrentFile('', code);
|
|
203
|
+
visitors.visit(ast);
|
|
204
|
+
keysByCall = found;
|
|
205
|
+
}
|
|
206
|
+
return keysByCall.get(call) ?? [];
|
|
207
|
+
};
|
|
181
208
|
// Traverse AST for CallExpressions matching t() or i18n.t()
|
|
182
209
|
function walk(node, ancestors) {
|
|
183
210
|
if (!node || typeof node !== 'object')
|
|
@@ -213,8 +240,9 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
213
240
|
const arg0 = arg0raw?.expression ?? arg0raw;
|
|
214
241
|
const arg1 = arg1raw?.expression ?? arg1raw;
|
|
215
242
|
const arg2 = arg2raw?.expression ?? arg2raw;
|
|
216
|
-
// Only check interpolation params if the first argument is a string literal
|
|
217
|
-
|
|
243
|
+
// Only check interpolation params if the first argument is a string literal or a selector
|
|
244
|
+
const isSelector = arg0?.type === 'ArrowFunctionExpression';
|
|
245
|
+
if (arg0?.type === 'StringLiteral' || isSelector) {
|
|
218
246
|
const keyOrStr = arg0.value;
|
|
219
247
|
// Detect 3-argument form: t('key', 'Default string {{foo}}', { foo })
|
|
220
248
|
// In this form arg1 is the default string and arg2 is the params object.
|
|
@@ -257,10 +285,18 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
257
285
|
if (isThreeArgForm) {
|
|
258
286
|
resolvedStr = translationArg.value;
|
|
259
287
|
}
|
|
288
|
+
else if (isSelector) {
|
|
289
|
+
// The first key with a value, like i18next's fallback (a ternary or plural yields several)
|
|
290
|
+
const value = keysOfCall(node).map(k => translationValues?.get(k)).find(v => v !== undefined);
|
|
291
|
+
if (value === undefined)
|
|
292
|
+
return;
|
|
293
|
+
resolvedStr = value;
|
|
294
|
+
}
|
|
260
295
|
else {
|
|
261
296
|
resolvedStr = translationValues?.get(keyOrStr) ?? keyOrStr;
|
|
262
297
|
}
|
|
263
|
-
|
|
298
|
+
// spans are file-relative character indices here (normalizeSpansToCharIndices)
|
|
299
|
+
const searchText = isSelector ? code.slice(arg0.span.start, arg0.span.end) : (arg0.raw ?? `"${arg0.value}"`);
|
|
264
300
|
callSites.push({ translationStr: resolvedStr, searchText, paramKeys });
|
|
265
301
|
}
|
|
266
302
|
}
|
package/dist/esm/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ const program = new Command();
|
|
|
33
33
|
program
|
|
34
34
|
.name('i18next-cli')
|
|
35
35
|
.description('A unified, high-performance i18next CLI.')
|
|
36
|
-
.version('1.
|
|
36
|
+
.version('1.81.0') // This string is replaced with the actual version at build time by rollup
|
|
37
37
|
.addHelpText('after', '\nUsing an AI coding agent? Install the i18next-localization skill: npx skills add i18next/i18next-cli\n');
|
|
38
38
|
// new: global config override option
|
|
39
39
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
@@ -888,12 +888,11 @@ class ASTVisitors {
|
|
|
888
888
|
// The single argument to Object.keys/values must be a known identifier
|
|
889
889
|
const mapArg = this.expressionResolver.unwrapNamespace(obj.arguments?.[0]?.expression);
|
|
890
890
|
if (mapArg?.type === 'Identifier') {
|
|
891
|
-
const
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
}
|
|
891
|
+
const values = isKeys
|
|
892
|
+
? this.expressionResolver.getObjectKeys(mapArg.value)
|
|
893
|
+
: Object.values(this.expressionResolver.getObjectMap(mapArg.value) ?? {});
|
|
894
|
+
if (values?.length) {
|
|
895
|
+
return this.extractCallbackParam(node, values, elementParamIndex);
|
|
897
896
|
}
|
|
898
897
|
}
|
|
899
898
|
}
|
|
@@ -171,6 +171,10 @@ class ExpressionResolver {
|
|
|
171
171
|
// Shared (cross-file) table for as-const object maps, `export const LABELS = { … } as const`,
|
|
172
172
|
// so `LABELS.save` and `Object.keys(LABELS)` resolve in importing files.
|
|
173
173
|
sharedObjectMapTable = new ModuleTable(this, true);
|
|
174
|
+
// Shared (cross-file) literal keys of every object declared as `const MAP = { … }`, whatever
|
|
175
|
+
// its values are: the map tables above only hold string values, `keyof typeof MAP` and
|
|
176
|
+
// `Object.keys(MAP)` need all keys (#317).
|
|
177
|
+
sharedObjectKeysTable = new ModuleTable(this, true);
|
|
174
178
|
// Shared (cross-file) table for type aliases — populated alongside typeAliasTable.
|
|
175
179
|
// Persists across resetFileSymbols() so exported type aliases are visible to importers.
|
|
176
180
|
sharedTypeAliasTable = new ModuleTable(this);
|
|
@@ -495,6 +499,7 @@ class ExpressionResolver {
|
|
|
495
499
|
if (unwrappedInit.type === 'ObjectExpression' && Array.isArray(unwrappedInit.properties)) {
|
|
496
500
|
this.objectLiterals.set(name, unwrappedInit);
|
|
497
501
|
const map = {};
|
|
502
|
+
const keys = [];
|
|
498
503
|
for (const p of unwrappedInit.properties) {
|
|
499
504
|
if (!p || p.type !== 'KeyValueProperty')
|
|
500
505
|
continue;
|
|
@@ -502,6 +507,7 @@ class ExpressionResolver {
|
|
|
502
507
|
const keyName = keyNode?.type === 'Identifier' ? keyNode.value : keyNode?.type === 'StringLiteral' ? keyNode.value : undefined;
|
|
503
508
|
if (!keyName)
|
|
504
509
|
continue;
|
|
510
|
+
keys.push(keyName);
|
|
505
511
|
const valExpr = p.value;
|
|
506
512
|
const vals = this.resolvePossibleStringValuesFromExpression(valExpr);
|
|
507
513
|
// Only capture properties that we can statically resolve to a single string.
|
|
@@ -509,6 +515,8 @@ class ExpressionResolver {
|
|
|
509
515
|
map[keyName] = vals[0];
|
|
510
516
|
}
|
|
511
517
|
}
|
|
518
|
+
if (keys.length > 0)
|
|
519
|
+
this.sharedObjectKeysTable.set(name, keys);
|
|
512
520
|
// If at least one property was resolvable, record the partial map.
|
|
513
521
|
if (Object.keys(map).length > 0) {
|
|
514
522
|
this.variableTable.set(name, map);
|
|
@@ -1192,6 +1200,14 @@ class ExpressionResolver {
|
|
|
1192
1200
|
return v;
|
|
1193
1201
|
return this.sharedObjectMapTable.get(name) ?? this.sharedEnumTable.get(name);
|
|
1194
1202
|
}
|
|
1203
|
+
/** All keys of an object map, also those whose value is not a string, or of an enum. */
|
|
1204
|
+
getObjectKeys(name) {
|
|
1205
|
+
const keys = this.sharedObjectKeysTable.get(name);
|
|
1206
|
+
if (keys)
|
|
1207
|
+
return keys;
|
|
1208
|
+
const map = this.getObjectMap(name);
|
|
1209
|
+
return map ? Object.keys(map) : undefined;
|
|
1210
|
+
}
|
|
1195
1211
|
/**
|
|
1196
1212
|
* Capture a TypeScript enum declaration so members can be resolved later.
|
|
1197
1213
|
* Accepts SWC node shapes like `TsEnumDeclaration` / `TSEnumDeclaration`.
|
|
@@ -1624,15 +1640,9 @@ class ExpressionResolver {
|
|
|
1624
1640
|
const exprName = inner.exprName ?? inner.expr ?? inner.entityName;
|
|
1625
1641
|
const varName = this.typeQueryName(exprName);
|
|
1626
1642
|
if (varName) {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
return Object.keys(v);
|
|
1631
|
-
}
|
|
1632
|
-
// Also check sharedEnumTable (enum keys)
|
|
1633
|
-
const ev = this.sharedEnumTable.get(varName);
|
|
1634
|
-
if (ev)
|
|
1635
|
-
return Object.keys(ev);
|
|
1643
|
+
const keys = this.getObjectKeys(varName);
|
|
1644
|
+
if (keys)
|
|
1645
|
+
return keys;
|
|
1636
1646
|
}
|
|
1637
1647
|
}
|
|
1638
1648
|
}
|
package/dist/esm/linter.js
CHANGED
|
@@ -9,6 +9,8 @@ import { createSpinnerLike } from './utils/wrap-ora.js';
|
|
|
9
9
|
import { acceptedTags, translatableAttributes, ignoredTags, ignoredAttributeLowerSet } from './utils/jsx-attributes.js';
|
|
10
10
|
import { normalizeSpansToCharIndices, collectIgnoredLineRanges, lineColumnFromOffset } from './extractor/parsers/ast-utils.js';
|
|
11
11
|
import { matchesFunctionPattern } from './extractor/utils/function-matcher.js';
|
|
12
|
+
import { ASTVisitors } from './extractor/core/ast-visitors.js';
|
|
13
|
+
import { getNestedKeys, getNestedValue } from './utils/nested-object.js';
|
|
12
14
|
import { loadMessageAnalyzer, lintMessageFormatResources, lintI18nextResources, interpolationNames } from './utils/message-format.js';
|
|
13
15
|
import { lintBaselinePath, writeLintBaseline, readLintBaseline, applyLintBaseline } from './utils/lint-baseline.js';
|
|
14
16
|
import { shouldShowFunnel, recordFunnelShown } from './utils/funnel-msg-tracker.js';
|
|
@@ -63,7 +65,10 @@ async function loadPrimaryTranslationValues(config) {
|
|
|
63
65
|
try {
|
|
64
66
|
const raw = await readFile(filePath, 'utf-8');
|
|
65
67
|
const json = JSON.parse(raw);
|
|
66
|
-
|
|
68
|
+
// Nested resources too: `{ "a": { "b": "…" } }` → "a.b"
|
|
69
|
+
const keySeparator = config.extract?.keySeparator ?? '.';
|
|
70
|
+
for (const k of getNestedKeys(json, keySeparator)) {
|
|
71
|
+
const v = getNestedValue(json, k, keySeparator);
|
|
67
72
|
if (typeof v === 'string')
|
|
68
73
|
result.set(k, v);
|
|
69
74
|
}
|
|
@@ -81,7 +86,7 @@ const i18nextOptionKeys = new Set([
|
|
|
81
86
|
'defaultValue', 'count', 'context', 'ns', 'lng', 'lngs',
|
|
82
87
|
'fallbackLng', 'returnDetails', 'returnObjects', 'joinArrays',
|
|
83
88
|
'postProcess', 'interpolation', 'skipInterpolation', 'replace',
|
|
84
|
-
'ordinal', 'keySeparator', 'nsSeparator', 'tDescription',
|
|
89
|
+
'ordinal', 'keySeparator', 'nsSeparator', 'tDescription', 'keyPrefix',
|
|
85
90
|
]);
|
|
86
91
|
function isI18nextOptionKey(key) {
|
|
87
92
|
if (i18nextOptionKeys.has(key))
|
|
@@ -176,6 +181,28 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
176
181
|
return code.substring(0, pos).split('\n').length;
|
|
177
182
|
};
|
|
178
183
|
const callSites = [];
|
|
184
|
+
// The keys the extractor resolves for each call (selector path, keyPrefix and namespace scope
|
|
185
|
+
// included), walked once and only for a file with a selector call: `t($ => $.a.b)` → ['a.b']
|
|
186
|
+
let keysByCall;
|
|
187
|
+
const keysOfCall = (call) => {
|
|
188
|
+
if (!keysByCall) {
|
|
189
|
+
const found = new Map();
|
|
190
|
+
let current;
|
|
191
|
+
const silent = { info() { }, warn() { }, error() { } };
|
|
192
|
+
const context = {
|
|
193
|
+
addKey: ({ key }) => { found.set(current, [...(found.get(current) ?? []), key]); },
|
|
194
|
+
config,
|
|
195
|
+
logger: silent,
|
|
196
|
+
getVarFromScope: () => undefined,
|
|
197
|
+
setVarInScope: () => { },
|
|
198
|
+
};
|
|
199
|
+
const visitors = new ASTVisitors(config, context, silent, { onBeforeVisitNode: (node) => { current = node; } });
|
|
200
|
+
visitors.setCurrentFile('', code);
|
|
201
|
+
visitors.visit(ast);
|
|
202
|
+
keysByCall = found;
|
|
203
|
+
}
|
|
204
|
+
return keysByCall.get(call) ?? [];
|
|
205
|
+
};
|
|
179
206
|
// Traverse AST for CallExpressions matching t() or i18n.t()
|
|
180
207
|
function walk(node, ancestors) {
|
|
181
208
|
if (!node || typeof node !== 'object')
|
|
@@ -211,8 +238,9 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
211
238
|
const arg0 = arg0raw?.expression ?? arg0raw;
|
|
212
239
|
const arg1 = arg1raw?.expression ?? arg1raw;
|
|
213
240
|
const arg2 = arg2raw?.expression ?? arg2raw;
|
|
214
|
-
// Only check interpolation params if the first argument is a string literal
|
|
215
|
-
|
|
241
|
+
// Only check interpolation params if the first argument is a string literal or a selector
|
|
242
|
+
const isSelector = arg0?.type === 'ArrowFunctionExpression';
|
|
243
|
+
if (arg0?.type === 'StringLiteral' || isSelector) {
|
|
216
244
|
const keyOrStr = arg0.value;
|
|
217
245
|
// Detect 3-argument form: t('key', 'Default string {{foo}}', { foo })
|
|
218
246
|
// In this form arg1 is the default string and arg2 is the params object.
|
|
@@ -255,10 +283,18 @@ function lintInterpolationParams(ast, code, config, translationValues, analyze)
|
|
|
255
283
|
if (isThreeArgForm) {
|
|
256
284
|
resolvedStr = translationArg.value;
|
|
257
285
|
}
|
|
286
|
+
else if (isSelector) {
|
|
287
|
+
// The first key with a value, like i18next's fallback (a ternary or plural yields several)
|
|
288
|
+
const value = keysOfCall(node).map(k => translationValues?.get(k)).find(v => v !== undefined);
|
|
289
|
+
if (value === undefined)
|
|
290
|
+
return;
|
|
291
|
+
resolvedStr = value;
|
|
292
|
+
}
|
|
258
293
|
else {
|
|
259
294
|
resolvedStr = translationValues?.get(keyOrStr) ?? keyOrStr;
|
|
260
295
|
}
|
|
261
|
-
|
|
296
|
+
// spans are file-relative character indices here (normalizeSpansToCharIndices)
|
|
297
|
+
const searchText = isSelector ? code.slice(arg0.span.start, arg0.span.end) : (arg0.raw ?? `"${arg0.value}"`);
|
|
262
298
|
callSites.push({ translationStr: resolvedStr, searchText, paramKeys });
|
|
263
299
|
}
|
|
264
300
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-visitors.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ast-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAQ,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3H,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAiB,MAAM,mCAAmC,CAAA;AAuCrF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,C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B;IAiH1B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAIzB,mFAAmF;IACnF,OAAO,CAAC,oBAAoB;IAoB5B;;;;;;;;OAQG;IACH,OAAO,CAAC,gCAAgC;IAgDxC;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA+CxB;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B;IA8ClC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;;;;;;;OAQG;IACI,eAAe,CAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI5D;;OAEG;IACI,cAAc,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAMxD;;;;;;OAMG;IACI,cAAc,IAAK,MAAM;IAIhC;;OAEG;IACI,cAAc,IAAK,MAAM;CAGjC"}
|
|
@@ -15,6 +15,7 @@ export declare class ExpressionResolver {
|
|
|
15
15
|
private typeAliasTable;
|
|
16
16
|
private sharedVariableTable;
|
|
17
17
|
private sharedObjectMapTable;
|
|
18
|
+
private sharedObjectKeysTable;
|
|
18
19
|
private sharedTypeAliasTable;
|
|
19
20
|
private sharedFunctionReturnTable;
|
|
20
21
|
private temporaryVariables;
|
|
@@ -254,6 +255,8 @@ export declare class ExpressionResolver {
|
|
|
254
255
|
* Checks per-file variableTable first, then sharedEnumTable (for enums).
|
|
255
256
|
*/
|
|
256
257
|
getObjectMap(name: string): Record<string, string> | undefined;
|
|
258
|
+
/** All keys of an object map, also those whose value is not a string, or of an enum. */
|
|
259
|
+
getObjectKeys(name: string): string[] | undefined;
|
|
257
260
|
/**
|
|
258
261
|
* Capture a TypeScript enum declaration so members can be resolved later.
|
|
259
262
|
* Accepts SWC node shapes like `TsEnumDeclaration` / `TSEnumDeclaration`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA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IACI,oBAAoB,CAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAIlE;;OAEG;IACI,uBAAuB,CAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAInD;;;;OAIG;IACI,yBAAyB,CAAE,MAAM,EAAE,GAAG,GAAG,MAAM,EAAE;IAQxD;;;OAGG;IACI,iBAAiB,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAQ7D,6FAA6F;IACtF,eAAe,CAAE,IAAI,EAAE,GAAG,GAAG,gBAAgB,GAAG,SAAS;IAMhE;;;;OAIG;IACI,YAAY,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAMtE,wFAAwF;IACjF,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAOzD;;;;;OAKG;IACH,sBAAsB,CAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAwBxC;;;;;;;OAOG;IACH,kCAAkC,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKrE;;;;;;;OAOG;IACH,8BAA8B,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKjE;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,yCAAyC;IA+OjD,OAAO,CAAC,mCAAmC;IAwI3C;;;;;;OAMG;IACH,OAAO,CAAC,6CAA6C;IAyBrD;;;;;;OAMG;IACH,OAAO,CAAC,kDAAkD;CAwB3D"}
|
package/types/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../src/linter.ts"],"names":[],"mappings":"AAIA,OAAO,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