i18next-cli 1.76.0 → 1.78.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 +6 -4
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/types-generator.js +30 -5
- package/dist/cjs/utils/message-format.js +44 -17
- package/dist/esm/cli.js +1 -1
- package/dist/esm/types-generator.js +30 -5
- package/dist/esm/utils/message-format.js +44 -17
- package/package.json +3 -3
- package/types/types-generator.d.ts.map +1 -1
- package/types/types.d.ts +3 -2
- package/types/types.d.ts.map +1 -1
- package/types/utils/message-format.d.ts +12 -5
- package/types/utils/message-format.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -340,7 +340,7 @@ Generates TypeScript definitions from your translation files for full type-safet
|
|
|
340
340
|
|
|
341
341
|
> **Note:** When `extract.defaultNS` is set to `false`, the generated `defaultNS` is derived from your resource files (i18next's type system cannot express `defaultNS: false`). Adjust the generated `i18next.d.ts` if your runtime i18next config uses a different default namespace.
|
|
342
342
|
|
|
343
|
-
> **Note:** With `extract.messageFormat: 'icu'` or `'mf2'` the generated `i18next.d.ts` sets `parseInterpolation:
|
|
343
|
+
> **Note:** With `extract.messageFormat: 'icu'` or `'mf2'` the generated `i18next.d.ts` sets `parseInterpolation: 'icu'` or `'mf2'` when the project's `i18next` is 26.5.0 or later, so `t()` options are type-checked against the arguments of each message (a missing or misspelled `{name}` is a type error). With `i18next` 26.2.0 to 26.4.x it sets `parseInterpolation: false` instead, so ICU plurals like `one {{count} row}` are not typed as `{{…}}` interpolation, but arguments are not checked. The installed version is read from `node_modules/i18next/package.json`, from the working directory upwards. The file is only written when it does not exist yet; for an existing one `types` prints a warning until you add the line, and a hint when it still sets `false` although your `i18next` supports the typed value.
|
|
344
344
|
|
|
345
345
|
```bash
|
|
346
346
|
npx i18next-cli types [options]
|
|
@@ -376,7 +376,8 @@ npx i18next-cli lint
|
|
|
376
376
|
- **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):
|
|
377
377
|
- syntax errors with the parser's message, e.g. `greeting: ICU syntax error: EXPECT_ARGUMENT_CLOSING_BRACE at column 7`
|
|
378
378
|
- argument names that differ from the primary language (a renamed or missing `{name}`). `#` in a plural is not an argument
|
|
379
|
-
- plural categories of `plural` and `selectordinal` (MF2: `.match` on `:number` or `:integer`) that do not fit the locale. Allowed are the locale's CLDR categories, required are `other` plus every category a whole number
|
|
379
|
+
- plural categories of `plural` and `selectordinal` (MF2: `.match` on `:number` or `:integer`) that do not fit the locale. Allowed are the locale's CLDR categories, required are `other` plus every category a whole number below one million selects. So `ru` needs `one`, `few` and `many`, while `fr`, `es`, `it` and `pt` may leave out `many` (only from 1,000,000) and `cs` its `many` (fractions only), and `zero` in English is reported as unused. Exact selectors like `=0` are always allowed, and they count for a category that selects only a few small numbers when they cover them all: `=1` covers `one` in English, but not in Russian, where `one` is also 21, 31 and so on. For a locale `Intl` does not know only `other` is required. A language code with `_` (`ru_RU`, `pt_BR`) is read as `ru-RU`, `pt-BR`.
|
|
380
|
+
- *(warning, MF2 only)* whitespace at the start or end of a pattern that differs from the primary language: `{{ {$count} files}}` shows the space in the app.
|
|
380
381
|
|
|
381
382
|
Empty values count as untranslated and are skipped. See [ICU and MF2 messages](#icu-and-mf2-messages).
|
|
382
383
|
- **String concatenation** *(warning by default)* — translated strings glued together with `+`, or a sentence split across multiple adjacent translations (`<Trans>` components and/or `{t()}` expressions rendered as siblings). This breaks in languages that reorder or inflect the pieces; use a single key with placeholders instead. Configure with `lint.checkConcatenation`: `'warn'` / `true` (default) reports it without failing the run, `'error'` makes it fail (exit non-zero, useful for CI), and `'off'` / `false` disables it.
|
|
@@ -1057,7 +1058,8 @@ export default defineConfig({
|
|
|
1057
1058
|
// The syntax of your translation values: 'i18next' (default), 'icu' (i18next-icu) or 'mf2' (i18next-mf2).
|
|
1058
1059
|
// With 'icu' or 'mf2', `extract` writes one key per message (no plural or context suffix keys),
|
|
1059
1060
|
// `lint` checks the syntax, arguments and plural categories of every translation value, and
|
|
1060
|
-
// `types` adds `parseInterpolation:
|
|
1061
|
+
// `types` adds `parseInterpolation: 'icu'` / 'mf2' (i18next >= 26.5.0, else false) to a new i18next.d.ts.
|
|
1062
|
+
// See "ICU and MF2 messages" below.
|
|
1061
1063
|
messageFormat: 'i18next', // Default: 'i18next'
|
|
1062
1064
|
|
|
1063
1065
|
// Warn (or error) when the same ns:key is extracted with different default values.
|
|
@@ -1783,7 +1785,7 @@ What it changes:
|
|
|
1783
1785
|
- `status` counts a plural or select message as one key.
|
|
1784
1786
|
- `instrument` writes `{name}` / `{$name}` placeholders and escapes the text around them (`File '{{name}}'` becomes `File ''{name}'`, since an apostrophe before `{` starts quoted text in ICU), a ternary like `count === 1 ? 'task' : 'tasks'` becomes one plural message (`{count, plural, one {…} other {…}}`, MF2 `.match $count`) instead of `defaultValue_one` / `defaultValue_other`, and the i18n init file it creates registers `i18next-icu` or `i18next-mf2`.
|
|
1785
1787
|
- `lint` parses every translation value and reports syntax errors, arguments that differ from the primary language and plural categories that do not fit a locale (see [`lint`](#lint)). The `t()` interpolation check reads the arguments with the same parser.
|
|
1786
|
-
- `types` sets `parseInterpolation:
|
|
1788
|
+
- `types` sets `parseInterpolation: 'icu'` or `'mf2'` in a newly generated `i18next.d.ts`, so `t()` options are type-checked against each message's arguments (i18next 26.5.0 or later; with older versions it sets `parseInterpolation: false`).
|
|
1787
1789
|
|
|
1788
1790
|
What keeps and what stops working at runtime with these formats (plural and context suffix keys, `$t()` nesting, i18next formatters, `escapeValue`) is described in [Using ICU or MF2](https://www.i18next.com/how-to/using-icu-or-mf2).
|
|
1789
1791
|
|
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.78.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)');
|
|
@@ -18,6 +18,23 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
18
18
|
var yaml__default = /*#__PURE__*/_interopDefault(yaml);
|
|
19
19
|
var vm__default = /*#__PURE__*/_interopDefault(vm);
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* The `parseInterpolation` value for ICU or MF2 messages: `'icu'` / `'mf2'` (typed arguments) when the
|
|
23
|
+
* project's i18next is 26.5.0 or later, else `false` (no argument checks, needs 26.2.0). Looks for
|
|
24
|
+
* node_modules/i18next from the working directory upwards, so hoisted monorepo installs count.
|
|
25
|
+
*/
|
|
26
|
+
async function parseInterpolationFor(messageFormat) {
|
|
27
|
+
for (let dir = process.cwd();; dir = node_path.dirname(dir)) {
|
|
28
|
+
try {
|
|
29
|
+
const { version } = JSON.parse(await promises.readFile(node_path.join(dir, 'node_modules', 'i18next', 'package.json'), 'utf-8'));
|
|
30
|
+
const [major, minor] = String(version).split('.').map(Number);
|
|
31
|
+
return major > 26 || (major === 26 && minor >= 5) ? `'${messageFormat}'` : 'false';
|
|
32
|
+
}
|
|
33
|
+
catch { }
|
|
34
|
+
if (node_path.dirname(dir) === dir)
|
|
35
|
+
return 'false';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
21
38
|
async function loadFile(file) {
|
|
22
39
|
const ext = node_path.extname(file);
|
|
23
40
|
if (['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs'].includes(ext)) {
|
|
@@ -187,10 +204,18 @@ ${i18nextResourcesForTs.mergeResourcesAsInterface(resources, { optimize: !!enabl
|
|
|
187
204
|
outputPathExists = false;
|
|
188
205
|
}
|
|
189
206
|
// ICU and MF2 plurals like `one {{count} row}` contain double braces, which i18next's type-level
|
|
190
|
-
// {{variable}} extractor would read as interpolation
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
207
|
+
// {{variable}} extractor would read as interpolation: i18next >= 26.5.0 parses ICU / MF2 instead,
|
|
208
|
+
// >= 26.2.0 can turn it off
|
|
209
|
+
const messageFormat = config.extract.messageFormat === 'icu' || config.extract.messageFormat === 'mf2' ? config.extract.messageFormat : undefined;
|
|
210
|
+
const parseInterpolation = messageFormat && await parseInterpolationFor(messageFormat);
|
|
211
|
+
if (outputPathExists && messageFormat) {
|
|
212
|
+
const existing = await promises.readFile(outputPath, 'utf-8');
|
|
213
|
+
if (!existing.includes('parseInterpolation')) {
|
|
214
|
+
internalLogger.warn(node_util.styleText('yellow', `Warning: extract.messageFormat is '${messageFormat}', but ${config.types.output} does not set parseInterpolation. Add \`parseInterpolation: ${parseInterpolation};\` to CustomTypeOptions, see https://www.i18next.com/how-to/using-icu-or-mf2#typescript`));
|
|
215
|
+
}
|
|
216
|
+
else if (parseInterpolation !== 'false' && /parseInterpolation\s*:\s*false/.test(existing)) {
|
|
217
|
+
logMessages.push(` ${node_util.styleText('yellow', 'Hint:')} your i18next version can type-check ${messageFormat === 'icu' ? 'ICU' : 'MF2'} arguments: set \`parseInterpolation: ${parseInterpolation};\` in ${config.types.output}`);
|
|
218
|
+
}
|
|
194
219
|
}
|
|
195
220
|
if (!outputPathExists) {
|
|
196
221
|
// The main output file will now import from the resources file
|
|
@@ -242,7 +267,7 @@ import type Resources from './${importPath}';
|
|
|
242
267
|
declare module 'i18next' {
|
|
243
268
|
interface CustomTypeOptions {
|
|
244
269
|
enableSelector: ${typeof enableSelector === 'string' ? `"${enableSelector}"` : enableSelector};
|
|
245
|
-
defaultNS: ${defaultNS};${config.extract.fallbackNS ? `\n fallbackNS: ${fallbackNS};` : ''}${
|
|
270
|
+
defaultNS: ${defaultNS};${config.extract.fallbackNS ? `\n fallbackNS: ${fallbackNS};` : ''}${parseInterpolation ? `\n parseInterpolation: ${parseInterpolation};` : ''}
|
|
246
271
|
resources: Resources;
|
|
247
272
|
}
|
|
248
273
|
}`;
|
|
@@ -80,7 +80,7 @@ async function loadMessageAnalyzer(format) {
|
|
|
80
80
|
const column = err?.location?.start?.column;
|
|
81
81
|
throw new Error(column ? `${err.message} at column ${column}` : String(err?.message ?? err));
|
|
82
82
|
}
|
|
83
|
-
const shape = { args: new Set(), plurals: [] };
|
|
83
|
+
const shape = { args: new Set(), plurals: [], edges: new Set() };
|
|
84
84
|
walk(elements, shape);
|
|
85
85
|
return shape;
|
|
86
86
|
};
|
|
@@ -88,7 +88,15 @@ async function loadMessageAnalyzer(format) {
|
|
|
88
88
|
const { parseMessage, validate } = await import('messageformat');
|
|
89
89
|
return (message) => {
|
|
90
90
|
const msg = parseMessage(message); // throws a MessageSyntaxError
|
|
91
|
-
const shape = { args: validate(msg).variables, plurals: [] }; // validate throws a MessageDataModelError
|
|
91
|
+
const shape = { args: validate(msg).variables, plurals: [], edges: new Set() }; // validate throws a MessageDataModelError
|
|
92
|
+
for (const pattern of msg.type === 'select' ? msg.variants.map(v => v.value) : [msg.pattern]) {
|
|
93
|
+
const first = pattern[0];
|
|
94
|
+
const last = pattern[pattern.length - 1];
|
|
95
|
+
if (typeof first === 'string' && /^\s/.test(first))
|
|
96
|
+
shape.edges.add('start');
|
|
97
|
+
if (typeof last === 'string' && /\s$/.test(last))
|
|
98
|
+
shape.edges.add('end');
|
|
99
|
+
}
|
|
92
100
|
if (msg.type !== 'select')
|
|
93
101
|
return shape;
|
|
94
102
|
msg.selectors.forEach((selector, i) => {
|
|
@@ -133,29 +141,38 @@ function mf2PluralType(declarations, name) {
|
|
|
133
141
|
return undefined;
|
|
134
142
|
}
|
|
135
143
|
const categoryCache = new Map();
|
|
144
|
+
const FIRST_NUMBERS = 10;
|
|
136
145
|
/**
|
|
137
146
|
* The plural categories a message for `lng` may and must have: allowed are the locale's CLDR
|
|
138
|
-
* categories, required are `other` plus every category a whole number
|
|
147
|
+
* categories, required are `other` plus every category a whole number below one million selects.
|
|
139
148
|
* So ru needs one/few/many, while fr, es, it and pt may leave out `many` (from 1,000,000 only)
|
|
140
149
|
* and cs/lt `many` (fractions only). Undefined when Intl does not know the locale.
|
|
141
|
-
* Same rule as
|
|
150
|
+
* Same rule as Locize (`@inweso-dev/i18n-utils` `pluralCategories`); port a fix by hand in both directions.
|
|
151
|
+
* ponytail: samples 0..1999, not every number below one million: CLDR's whole-number rules look at
|
|
152
|
+
* small values and at n % 10, % 100 and % 1000, and a category met from 1000 on selects hundreds of numbers.
|
|
142
153
|
*/
|
|
143
154
|
function pluralCategories(lng, type) {
|
|
144
155
|
const cacheKey = `${lng}|${type}`;
|
|
145
156
|
if (categoryCache.has(cacheKey))
|
|
146
157
|
return categoryCache.get(cacheKey);
|
|
158
|
+
// a language code may use `_` (ru_RU, zh_Hant_TW), Intl only reads `-`
|
|
159
|
+
const locale = lng.replace(/_/g, '-');
|
|
147
160
|
let categories;
|
|
148
161
|
try {
|
|
149
|
-
if (Intl.PluralRules.supportedLocalesOf([
|
|
150
|
-
const rules = new Intl.PluralRules(
|
|
151
|
-
const numbers = new Map([['other', []]]);
|
|
152
|
-
for (let i = 0; i
|
|
162
|
+
if (Intl.PluralRules.supportedLocalesOf([locale]).length) {
|
|
163
|
+
const rules = new Intl.PluralRules(locale, { type });
|
|
164
|
+
const numbers = new Map([['other', { first: [], more: false }]]);
|
|
165
|
+
for (let i = 0; i < 2000; i++) {
|
|
153
166
|
const category = rules.select(i);
|
|
154
|
-
|
|
155
|
-
if (
|
|
156
|
-
|
|
167
|
+
let n = numbers.get(category);
|
|
168
|
+
if (!n)
|
|
169
|
+
numbers.set(category, n = { first: [], more: false });
|
|
170
|
+
if (n.first.length < FIRST_NUMBERS)
|
|
171
|
+
n.first.push(i);
|
|
157
172
|
else
|
|
158
|
-
|
|
173
|
+
n.more = true;
|
|
174
|
+
if (i >= 1000)
|
|
175
|
+
n.more = true;
|
|
159
176
|
}
|
|
160
177
|
categories = { allowed: rules.resolvedOptions().pluralCategories, required: [...numbers.keys()], numbers };
|
|
161
178
|
}
|
|
@@ -168,15 +185,21 @@ function pluralCategories(lng, type) {
|
|
|
168
185
|
}
|
|
169
186
|
/**
|
|
170
187
|
* The required categories a plural lacks. A category other than `other` also counts as present when
|
|
171
|
-
*
|
|
172
|
-
* does not (ru `one` is also 21, 31, ...).
|
|
188
|
+
* it selects few small numbers and exact selectors cover them all: en `=1` covers `one`, while ru `=1`
|
|
189
|
+
* does not (ru `one` is also 21, 31, ...).
|
|
173
190
|
*/
|
|
174
191
|
function missingPluralCategories(plural, lng) {
|
|
175
192
|
const expected = pluralCategories(lng, plural.type);
|
|
176
193
|
const exact = new Set(plural.exact);
|
|
194
|
+
const covered = (c) => {
|
|
195
|
+
if (c === 'other')
|
|
196
|
+
return false;
|
|
197
|
+
const n = expected.numbers.get(c);
|
|
198
|
+
return !n.more && n.first.every(i => exact.has(i));
|
|
199
|
+
};
|
|
177
200
|
return (expected?.required ?? ['other'])
|
|
178
201
|
.filter(c => !plural.categories.includes(c))
|
|
179
|
-
.filter(c =>
|
|
202
|
+
.filter(c => !covered(c))
|
|
180
203
|
.sort(byCldrOrder);
|
|
181
204
|
}
|
|
182
205
|
function* leaves(value, path = []) {
|
|
@@ -233,7 +256,7 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
233
256
|
if (typeof value !== 'string' || value === '')
|
|
234
257
|
continue;
|
|
235
258
|
const key = path.join(keySeparator);
|
|
236
|
-
const report = (text) => problems.push({ path, text: `${key}: ${text}
|
|
259
|
+
const report = (text, severity) => problems.push({ path, text: `${key}: ${text}`, severity });
|
|
237
260
|
let shape;
|
|
238
261
|
try {
|
|
239
262
|
shape = analyze(value);
|
|
@@ -254,6 +277,10 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
254
277
|
unexpected.length ? `unexpected ${unexpected.join(', ')}` : '',
|
|
255
278
|
].filter(Boolean).join(', ')}`);
|
|
256
279
|
}
|
|
280
|
+
// a correct translation with a visible flaw, so a warning (Locize's soft `whitespace`)
|
|
281
|
+
if ([...source.edges].sort().join() !== [...shape.edges].sort().join()) {
|
|
282
|
+
report(`whitespace at the start or end of a pattern differs from "${primary}", MF2 shows it as text`, 'warning');
|
|
283
|
+
}
|
|
257
284
|
}
|
|
258
285
|
for (const plural of shape.plurals) {
|
|
259
286
|
const expected = pluralCategories(lng, plural.type);
|
|
@@ -270,7 +297,7 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
270
297
|
primaryShapes = shapes;
|
|
271
298
|
if (problems.length) {
|
|
272
299
|
const lineOf = await lineFinder(file);
|
|
273
|
-
issuesByFile.set(file, problems.map(({ path, text }) => ({ text, line: lineOf(path), type: 'messageFormat' })));
|
|
300
|
+
issuesByFile.set(file, problems.map(({ path, text, severity }) => ({ text, line: lineOf(path), type: 'messageFormat', severity })));
|
|
274
301
|
}
|
|
275
302
|
}
|
|
276
303
|
}
|
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.78.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)');
|
|
@@ -11,6 +11,23 @@ import { JsonParser, JsonObjectNode } from '@croct/json5-parser';
|
|
|
11
11
|
import yaml from 'yaml';
|
|
12
12
|
import vm from 'node:vm';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* The `parseInterpolation` value for ICU or MF2 messages: `'icu'` / `'mf2'` (typed arguments) when the
|
|
16
|
+
* project's i18next is 26.5.0 or later, else `false` (no argument checks, needs 26.2.0). Looks for
|
|
17
|
+
* node_modules/i18next from the working directory upwards, so hoisted monorepo installs count.
|
|
18
|
+
*/
|
|
19
|
+
async function parseInterpolationFor(messageFormat) {
|
|
20
|
+
for (let dir = process.cwd();; dir = dirname(dir)) {
|
|
21
|
+
try {
|
|
22
|
+
const { version } = JSON.parse(await readFile(join(dir, 'node_modules', 'i18next', 'package.json'), 'utf-8'));
|
|
23
|
+
const [major, minor] = String(version).split('.').map(Number);
|
|
24
|
+
return major > 26 || (major === 26 && minor >= 5) ? `'${messageFormat}'` : 'false';
|
|
25
|
+
}
|
|
26
|
+
catch { }
|
|
27
|
+
if (dirname(dir) === dir)
|
|
28
|
+
return 'false';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
14
31
|
async function loadFile(file) {
|
|
15
32
|
const ext = extname(file);
|
|
16
33
|
if (['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs'].includes(ext)) {
|
|
@@ -180,10 +197,18 @@ ${mergeResourcesAsInterface(resources, { optimize: !!enableSelector, indentation
|
|
|
180
197
|
outputPathExists = false;
|
|
181
198
|
}
|
|
182
199
|
// ICU and MF2 plurals like `one {{count} row}` contain double braces, which i18next's type-level
|
|
183
|
-
// {{variable}} extractor would read as interpolation
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
// {{variable}} extractor would read as interpolation: i18next >= 26.5.0 parses ICU / MF2 instead,
|
|
201
|
+
// >= 26.2.0 can turn it off
|
|
202
|
+
const messageFormat = config.extract.messageFormat === 'icu' || config.extract.messageFormat === 'mf2' ? config.extract.messageFormat : undefined;
|
|
203
|
+
const parseInterpolation = messageFormat && await parseInterpolationFor(messageFormat);
|
|
204
|
+
if (outputPathExists && messageFormat) {
|
|
205
|
+
const existing = await readFile(outputPath, 'utf-8');
|
|
206
|
+
if (!existing.includes('parseInterpolation')) {
|
|
207
|
+
internalLogger.warn(styleText('yellow', `Warning: extract.messageFormat is '${messageFormat}', but ${config.types.output} does not set parseInterpolation. Add \`parseInterpolation: ${parseInterpolation};\` to CustomTypeOptions, see https://www.i18next.com/how-to/using-icu-or-mf2#typescript`));
|
|
208
|
+
}
|
|
209
|
+
else if (parseInterpolation !== 'false' && /parseInterpolation\s*:\s*false/.test(existing)) {
|
|
210
|
+
logMessages.push(` ${styleText('yellow', 'Hint:')} your i18next version can type-check ${messageFormat === 'icu' ? 'ICU' : 'MF2'} arguments: set \`parseInterpolation: ${parseInterpolation};\` in ${config.types.output}`);
|
|
211
|
+
}
|
|
187
212
|
}
|
|
188
213
|
if (!outputPathExists) {
|
|
189
214
|
// The main output file will now import from the resources file
|
|
@@ -235,7 +260,7 @@ import type Resources from './${importPath}';
|
|
|
235
260
|
declare module 'i18next' {
|
|
236
261
|
interface CustomTypeOptions {
|
|
237
262
|
enableSelector: ${typeof enableSelector === 'string' ? `"${enableSelector}"` : enableSelector};
|
|
238
|
-
defaultNS: ${defaultNS};${config.extract.fallbackNS ? `\n fallbackNS: ${fallbackNS};` : ''}${
|
|
263
|
+
defaultNS: ${defaultNS};${config.extract.fallbackNS ? `\n fallbackNS: ${fallbackNS};` : ''}${parseInterpolation ? `\n parseInterpolation: ${parseInterpolation};` : ''}
|
|
239
264
|
resources: Resources;
|
|
240
265
|
}
|
|
241
266
|
}`;
|
|
@@ -78,7 +78,7 @@ async function loadMessageAnalyzer(format) {
|
|
|
78
78
|
const column = err?.location?.start?.column;
|
|
79
79
|
throw new Error(column ? `${err.message} at column ${column}` : String(err?.message ?? err));
|
|
80
80
|
}
|
|
81
|
-
const shape = { args: new Set(), plurals: [] };
|
|
81
|
+
const shape = { args: new Set(), plurals: [], edges: new Set() };
|
|
82
82
|
walk(elements, shape);
|
|
83
83
|
return shape;
|
|
84
84
|
};
|
|
@@ -86,7 +86,15 @@ async function loadMessageAnalyzer(format) {
|
|
|
86
86
|
const { parseMessage, validate } = await import('messageformat');
|
|
87
87
|
return (message) => {
|
|
88
88
|
const msg = parseMessage(message); // throws a MessageSyntaxError
|
|
89
|
-
const shape = { args: validate(msg).variables, plurals: [] }; // validate throws a MessageDataModelError
|
|
89
|
+
const shape = { args: validate(msg).variables, plurals: [], edges: new Set() }; // validate throws a MessageDataModelError
|
|
90
|
+
for (const pattern of msg.type === 'select' ? msg.variants.map(v => v.value) : [msg.pattern]) {
|
|
91
|
+
const first = pattern[0];
|
|
92
|
+
const last = pattern[pattern.length - 1];
|
|
93
|
+
if (typeof first === 'string' && /^\s/.test(first))
|
|
94
|
+
shape.edges.add('start');
|
|
95
|
+
if (typeof last === 'string' && /\s$/.test(last))
|
|
96
|
+
shape.edges.add('end');
|
|
97
|
+
}
|
|
90
98
|
if (msg.type !== 'select')
|
|
91
99
|
return shape;
|
|
92
100
|
msg.selectors.forEach((selector, i) => {
|
|
@@ -131,29 +139,38 @@ function mf2PluralType(declarations, name) {
|
|
|
131
139
|
return undefined;
|
|
132
140
|
}
|
|
133
141
|
const categoryCache = new Map();
|
|
142
|
+
const FIRST_NUMBERS = 10;
|
|
134
143
|
/**
|
|
135
144
|
* The plural categories a message for `lng` may and must have: allowed are the locale's CLDR
|
|
136
|
-
* categories, required are `other` plus every category a whole number
|
|
145
|
+
* categories, required are `other` plus every category a whole number below one million selects.
|
|
137
146
|
* So ru needs one/few/many, while fr, es, it and pt may leave out `many` (from 1,000,000 only)
|
|
138
147
|
* and cs/lt `many` (fractions only). Undefined when Intl does not know the locale.
|
|
139
|
-
* Same rule as
|
|
148
|
+
* Same rule as Locize (`@inweso-dev/i18n-utils` `pluralCategories`); port a fix by hand in both directions.
|
|
149
|
+
* ponytail: samples 0..1999, not every number below one million: CLDR's whole-number rules look at
|
|
150
|
+
* small values and at n % 10, % 100 and % 1000, and a category met from 1000 on selects hundreds of numbers.
|
|
140
151
|
*/
|
|
141
152
|
function pluralCategories(lng, type) {
|
|
142
153
|
const cacheKey = `${lng}|${type}`;
|
|
143
154
|
if (categoryCache.has(cacheKey))
|
|
144
155
|
return categoryCache.get(cacheKey);
|
|
156
|
+
// a language code may use `_` (ru_RU, zh_Hant_TW), Intl only reads `-`
|
|
157
|
+
const locale = lng.replace(/_/g, '-');
|
|
145
158
|
let categories;
|
|
146
159
|
try {
|
|
147
|
-
if (Intl.PluralRules.supportedLocalesOf([
|
|
148
|
-
const rules = new Intl.PluralRules(
|
|
149
|
-
const numbers = new Map([['other', []]]);
|
|
150
|
-
for (let i = 0; i
|
|
160
|
+
if (Intl.PluralRules.supportedLocalesOf([locale]).length) {
|
|
161
|
+
const rules = new Intl.PluralRules(locale, { type });
|
|
162
|
+
const numbers = new Map([['other', { first: [], more: false }]]);
|
|
163
|
+
for (let i = 0; i < 2000; i++) {
|
|
151
164
|
const category = rules.select(i);
|
|
152
|
-
|
|
153
|
-
if (
|
|
154
|
-
|
|
165
|
+
let n = numbers.get(category);
|
|
166
|
+
if (!n)
|
|
167
|
+
numbers.set(category, n = { first: [], more: false });
|
|
168
|
+
if (n.first.length < FIRST_NUMBERS)
|
|
169
|
+
n.first.push(i);
|
|
155
170
|
else
|
|
156
|
-
|
|
171
|
+
n.more = true;
|
|
172
|
+
if (i >= 1000)
|
|
173
|
+
n.more = true;
|
|
157
174
|
}
|
|
158
175
|
categories = { allowed: rules.resolvedOptions().pluralCategories, required: [...numbers.keys()], numbers };
|
|
159
176
|
}
|
|
@@ -166,15 +183,21 @@ function pluralCategories(lng, type) {
|
|
|
166
183
|
}
|
|
167
184
|
/**
|
|
168
185
|
* The required categories a plural lacks. A category other than `other` also counts as present when
|
|
169
|
-
*
|
|
170
|
-
* does not (ru `one` is also 21, 31, ...).
|
|
186
|
+
* it selects few small numbers and exact selectors cover them all: en `=1` covers `one`, while ru `=1`
|
|
187
|
+
* does not (ru `one` is also 21, 31, ...).
|
|
171
188
|
*/
|
|
172
189
|
function missingPluralCategories(plural, lng) {
|
|
173
190
|
const expected = pluralCategories(lng, plural.type);
|
|
174
191
|
const exact = new Set(plural.exact);
|
|
192
|
+
const covered = (c) => {
|
|
193
|
+
if (c === 'other')
|
|
194
|
+
return false;
|
|
195
|
+
const n = expected.numbers.get(c);
|
|
196
|
+
return !n.more && n.first.every(i => exact.has(i));
|
|
197
|
+
};
|
|
175
198
|
return (expected?.required ?? ['other'])
|
|
176
199
|
.filter(c => !plural.categories.includes(c))
|
|
177
|
-
.filter(c =>
|
|
200
|
+
.filter(c => !covered(c))
|
|
178
201
|
.sort(byCldrOrder);
|
|
179
202
|
}
|
|
180
203
|
function* leaves(value, path = []) {
|
|
@@ -231,7 +254,7 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
231
254
|
if (typeof value !== 'string' || value === '')
|
|
232
255
|
continue;
|
|
233
256
|
const key = path.join(keySeparator);
|
|
234
|
-
const report = (text) => problems.push({ path, text: `${key}: ${text}
|
|
257
|
+
const report = (text, severity) => problems.push({ path, text: `${key}: ${text}`, severity });
|
|
235
258
|
let shape;
|
|
236
259
|
try {
|
|
237
260
|
shape = analyze(value);
|
|
@@ -252,6 +275,10 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
252
275
|
unexpected.length ? `unexpected ${unexpected.join(', ')}` : '',
|
|
253
276
|
].filter(Boolean).join(', ')}`);
|
|
254
277
|
}
|
|
278
|
+
// a correct translation with a visible flaw, so a warning (Locize's soft `whitespace`)
|
|
279
|
+
if ([...source.edges].sort().join() !== [...shape.edges].sort().join()) {
|
|
280
|
+
report(`whitespace at the start or end of a pattern differs from "${primary}", MF2 shows it as text`, 'warning');
|
|
281
|
+
}
|
|
255
282
|
}
|
|
256
283
|
for (const plural of shape.plurals) {
|
|
257
284
|
const expected = pluralCategories(lng, plural.type);
|
|
@@ -268,7 +295,7 @@ async function lintMessageFormatResources(config, analyze) {
|
|
|
268
295
|
primaryShapes = shapes;
|
|
269
296
|
if (problems.length) {
|
|
270
297
|
const lineOf = await lineFinder(file);
|
|
271
|
-
issuesByFile.set(file, problems.map(({ path, text }) => ({ text, line: lineOf(path), type: 'messageFormat' })));
|
|
298
|
+
issuesByFile.set(file, problems.map(({ path, text, severity }) => ({ text, line: lineOf(path), type: 'messageFormat', severity })));
|
|
272
299
|
}
|
|
273
300
|
}
|
|
274
301
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0",
|
|
4
4
|
"description": "A unified, high-performance i18next CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"commander": "^15.0.0",
|
|
80
80
|
"execa": "^10.0.1",
|
|
81
81
|
"glob": "^13.0.6",
|
|
82
|
-
"i18next": "^26.
|
|
82
|
+
"i18next": "^26.5.0",
|
|
83
83
|
"i18next-resources-for-ts": "^2.1.1",
|
|
84
84
|
"inquirer": "^14.2.2",
|
|
85
85
|
"jiti": "^2.7.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"messageformat": "^4.1.0",
|
|
89
89
|
"minimatch": "^10.2.6",
|
|
90
90
|
"ora": "^9.4.1",
|
|
91
|
-
"react-i18next": "^17.0
|
|
91
|
+
"react-i18next": "^17.1.0",
|
|
92
92
|
"yaml": "^2.9.1"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-generator.d.ts","sourceRoot":"","sources":["../src/types-generator.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"types-generator.d.ts","sourceRoot":"","sources":["../src/types-generator.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AA6F9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GACtE,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAyLvD"}
|
package/types/types.d.ts
CHANGED
|
@@ -204,8 +204,9 @@ export interface I18nextToolkitConfig {
|
|
|
204
204
|
* With `'icu'` or `'mf2'`, `extract`, `status` and `instrument` use one key per message (no plural
|
|
205
205
|
* or context suffix keys, no `$t()` nesting) and write `{name}` / `{$name}` placeholders, `lint`
|
|
206
206
|
* parses every translation value and checks its syntax, its argument names against the primary
|
|
207
|
-
* language and its plural categories per locale, and `types` adds `parseInterpolation:
|
|
208
|
-
*
|
|
207
|
+
* language and its plural categories per locale, and `types` adds `parseInterpolation: 'icu'` /
|
|
208
|
+
* `'mf2'` (typed arguments, i18next >= 26.5.0) or `parseInterpolation: false` (older i18next) to a
|
|
209
|
+
* newly generated `i18next.d.ts`.
|
|
209
210
|
*/
|
|
210
211
|
messageFormat?: 'i18next' | 'icu' | 'mf2';
|
|
211
212
|
/**
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,oBAAoB;IACnC,iEAAiE;IACjE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,2DAA2D;IAC3D,OAAO,EAAE;QACP;;;;;;;WAOG;QACH,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAEzB,4DAA4D;QAC5D,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAE3B,mGAAmG;QACnG,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,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` / `end` when a pattern starts / ends with whitespace, which MF2 keeps as text. */
|
|
14
|
+
edges: Set<'start' | 'end'>;
|
|
13
15
|
}
|
|
14
16
|
/** Parses an ICU or MF2 message. Throws an Error with the parser's message on a syntax error. */
|
|
15
17
|
export type MessageAnalyzer = (message: string) => MessageShape;
|
|
@@ -32,17 +34,22 @@ export declare function loadMessageAnalyzer(format: 'icu' | 'mf2'): Promise<Mess
|
|
|
32
34
|
interface PluralCategories {
|
|
33
35
|
/** the locale's CLDR categories */
|
|
34
36
|
allowed: string[];
|
|
35
|
-
/** `other` plus every category a whole number
|
|
37
|
+
/** `other` plus every category a whole number below one million selects */
|
|
36
38
|
required: string[];
|
|
37
|
-
/** per required category, the whole numbers
|
|
38
|
-
numbers: Map<string,
|
|
39
|
+
/** per required category, the smallest whole numbers it selects (up to 10) and whether there are more */
|
|
40
|
+
numbers: Map<string, {
|
|
41
|
+
first: number[];
|
|
42
|
+
more: boolean;
|
|
43
|
+
}>;
|
|
39
44
|
}
|
|
40
45
|
/**
|
|
41
46
|
* The plural categories a message for `lng` may and must have: allowed are the locale's CLDR
|
|
42
|
-
* categories, required are `other` plus every category a whole number
|
|
47
|
+
* categories, required are `other` plus every category a whole number below one million selects.
|
|
43
48
|
* So ru needs one/few/many, while fr, es, it and pt may leave out `many` (from 1,000,000 only)
|
|
44
49
|
* and cs/lt `many` (fractions only). Undefined when Intl does not know the locale.
|
|
45
|
-
* Same rule as
|
|
50
|
+
* Same rule as Locize (`@inweso-dev/i18n-utils` `pluralCategories`); port a fix by hand in both directions.
|
|
51
|
+
* ponytail: samples 0..1999, not every number below one million: CLDR's whole-number rules look at
|
|
52
|
+
* small values and at n % 10, % 100 and % 1000, and a category met from 1000 on selects hundreds of numbers.
|
|
46
53
|
*/
|
|
47
54
|
export declare function pluralCategories(lng: string, type: 'cardinal' | 'ordinal'): PluralCategories | undefined;
|
|
48
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-format.d.ts","sourceRoot":"","sources":["../../src/utils/message-format.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGlE,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,4FAA4F;IAC5F,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,2HAA2H;IAC3H,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"message-format.d.ts","sourceRoot":"","sources":["../../src/utils/message-format.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGlE,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,4FAA4F;IAC5F,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjB,2HAA2H;IAC3H,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAA;IACpG,uGAAuG;IACvG,KAAK,EAAE,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,CAAA;CAC5B;AAED,iGAAiG;AACjG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,YAAY,CAAA;AAE/D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,KAAG,OACA,CAAA;AAElF;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAE,KAAK,EAAE,MAAM,E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