i18next-cli 1.82.4 → 1.83.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 +2 -3
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/translation-manager.js +16 -24
- package/dist/cjs/extractor/parsers/comment-parser.js +2 -15
- package/dist/cjs/rename-key.js +9 -16
- package/dist/cjs/status.js +7 -10
- package/dist/cjs/syncer.js +3 -3
- package/dist/cjs/utils/file-utils.js +32 -0
- package/dist/cjs/utils/message-format.js +4 -3
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/translation-manager.js +15 -23
- package/dist/esm/extractor/parsers/comment-parser.js +1 -14
- package/dist/esm/rename-key.js +11 -18
- package/dist/esm/status.js +7 -10
- package/dist/esm/syncer.js +5 -5
- package/dist/esm/utils/file-utils.js +31 -2
- package/dist/esm/utils/message-format.js +6 -5
- package/package.json +1 -1
- package/types/extractor/core/translation-manager.d.ts.map +1 -1
- package/types/extractor/parsers/comment-parser.d.ts.map +1 -1
- package/types/status.d.ts.map +1 -1
- package/types/types.d.ts +2 -1
- package/types/types.d.ts.map +1 -1
- package/types/utils/file-utils.d.ts +14 -0
- package/types/utils/file-utils.d.ts.map +1 -1
- package/types/utils/message-format.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -1017,12 +1017,13 @@ export default defineConfig({
|
|
|
1017
1017
|
// Namespaces to ignore during extraction, status, and sync operations.
|
|
1018
1018
|
// Useful for monorepos where shared namespaces are managed elsewhere.
|
|
1019
1019
|
// Keys using these namespaces will be excluded from processing.
|
|
1020
|
+
// Supports glob patterns, where `*` matches any characters: 'dev.*' ignores 'dev.tools' and 'dev.mocks'.
|
|
1020
1021
|
// An ignored namespace can still act as a `fallbackNS` source: its
|
|
1021
1022
|
// translations are read (never written) for fallback accounting. If it
|
|
1022
1023
|
// lives in its own file outside a merged output (`mergeNamespaces: true`),
|
|
1023
1024
|
// use an `output` function that maps that namespace to its path, e.g.
|
|
1024
1025
|
// output: (lng, ns) => ns === 'shared' ? `locales/${lng}/${ns}.json` : `locales/${lng}.json`
|
|
1025
|
-
ignoreNamespaces: ['shared', 'common'], // Optional
|
|
1026
|
+
ignoreNamespaces: ['shared', 'common', 'dev.*'], // Optional
|
|
1026
1027
|
|
|
1027
1028
|
// When true (default), the extractor also scans code comments for t(...) / Trans examples and will extract keys found there.
|
|
1028
1029
|
// Set to false to ignore translation-like patterns in comments (useful to avoid extracting example/documentation strings).
|
|
@@ -2145,8 +2146,6 @@ A translation management system built around the i18next ecosystem - [Locize](ht
|
|
|
2145
2146
|
|
|
2146
2147
|
**Now with a [Free plan](https://www.locize.com/pricing?utm_source=i18next_cli_readme&utm_medium=github&utm_campaign=readme) for small projects!** Perfect for hobbyists or getting started.
|
|
2147
2148
|
|
|
2148
|
-

|
|
2149
|
-
|
|
2150
2149
|
With using [Locize](https://www.locize.com/?utm_source=i18next_cli_readme&utm_medium=github&utm_campaign=readme) you directly support the future of i18next.
|
|
2151
2150
|
|
|
2152
2151
|
---
|
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.83.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)');
|
|
@@ -12,16 +12,6 @@ var messageFormat = require('../../utils/message-format.js');
|
|
|
12
12
|
var contextVariants = require('../../utils/context-variants.js');
|
|
13
13
|
|
|
14
14
|
const pluralForms = ['zero', 'one', 'two', 'few', 'many', 'other'];
|
|
15
|
-
/**
|
|
16
|
-
* Converts a glob pattern to a regular expression for matching keys
|
|
17
|
-
* @param glob - The glob pattern to convert
|
|
18
|
-
* @returns A RegExp object that matches the glob pattern
|
|
19
|
-
*/
|
|
20
|
-
function globToRegex(glob) {
|
|
21
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
22
|
-
const regexString = `^${escaped.replace(/\*/g, '.*')}$`;
|
|
23
|
-
return new RegExp(regexString);
|
|
24
|
-
}
|
|
25
15
|
/**
|
|
26
16
|
* Detects a nesting conflict for `key` against the object being built.
|
|
27
17
|
* Returns the conflicting ancestor/descendant key path as a string when a
|
|
@@ -367,7 +357,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
|
|
|
367
357
|
// Unlike preservePatterns they only keep existing keys, so code still extracts matching keys.
|
|
368
358
|
const keepRegexes = keepPatterns
|
|
369
359
|
.filter(p => !namespace || !p.ns || p.ns === '*' || p.ns === namespace)
|
|
370
|
-
.map(p => globToRegex(p.key));
|
|
360
|
+
.map(p => fileUtils.globToRegex(p.key));
|
|
371
361
|
// Helper to check if an existing key should be preserved
|
|
372
362
|
const shouldPreserveExistingKey = (key) => {
|
|
373
363
|
// 1) keys nested under a returnObjects / selector-API base key
|
|
@@ -397,7 +387,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
|
|
|
397
387
|
const [patternNs, patternKey] = rp.split(nsSep);
|
|
398
388
|
if (patternNs === namespace) {
|
|
399
389
|
// Convert the key part to regex (handle wildcards)
|
|
400
|
-
const keyRegex = globToRegex(patternKey);
|
|
390
|
+
const keyRegex = fileUtils.globToRegex(patternKey);
|
|
401
391
|
if (keyRegex.test(key)) {
|
|
402
392
|
return true;
|
|
403
393
|
}
|
|
@@ -1133,7 +1123,7 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1133
1123
|
patternsToPreserve.push(`${key}.*`);
|
|
1134
1124
|
}
|
|
1135
1125
|
}
|
|
1136
|
-
const preservePatterns = patternsToPreserve.map(globToRegex);
|
|
1126
|
+
const preservePatterns = patternsToPreserve.map(fileUtils.globToRegex);
|
|
1137
1127
|
// Group keys by namespace. If the plugin recorded the namespace as implicit
|
|
1138
1128
|
// (nsIsImplicit) AND the user set defaultNS === false we treat those keys
|
|
1139
1129
|
// as "no namespace" (will be merged at top-level). Otherwise use the stored
|
|
@@ -1150,9 +1140,10 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1150
1140
|
keysByNS.get(nsKey).push(k);
|
|
1151
1141
|
}
|
|
1152
1142
|
// Filter out ignored namespaces
|
|
1153
|
-
const
|
|
1154
|
-
for (const ns of
|
|
1155
|
-
|
|
1143
|
+
const isIgnoredNs = fileUtils.ignoredNamespaceMatcher(config);
|
|
1144
|
+
for (const ns of keysByNS.keys()) {
|
|
1145
|
+
if (isIgnoredNs(ns))
|
|
1146
|
+
keysByNS.delete(ns);
|
|
1156
1147
|
}
|
|
1157
1148
|
// Respect fallbackNS (#272): a key extracted for another namespace that is
|
|
1158
1149
|
// already translated in a fallback namespace resolves at runtime through the
|
|
@@ -1201,8 +1192,9 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1201
1192
|
? new Set([...keysByNS.keys(), ...existingKeys])
|
|
1202
1193
|
: new Set([...keysByNS.keys(), NO_NS_TOKEN]);
|
|
1203
1194
|
// Remove ignored namespaces so their section is never modified
|
|
1204
|
-
for (const ns of
|
|
1205
|
-
|
|
1195
|
+
for (const ns of namespacesToProcess) {
|
|
1196
|
+
if (isIgnoredNs(ns))
|
|
1197
|
+
namespacesToProcess.delete(ns);
|
|
1206
1198
|
}
|
|
1207
1199
|
// When nsSeparator is false, keys resolved to the defaultNS (e.g. from
|
|
1208
1200
|
// useTranslation() with no args) should be treated as top-level, not
|
|
@@ -1226,10 +1218,9 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1226
1218
|
}
|
|
1227
1219
|
}
|
|
1228
1220
|
// Preserve ignored namespaces as-is from the existing merged file
|
|
1229
|
-
for (const ns of
|
|
1230
|
-
if (ns
|
|
1221
|
+
for (const ns of existingKeys) {
|
|
1222
|
+
if (isIgnoredNs(ns))
|
|
1231
1223
|
newMergedTranslations[ns] = existingMergedFile[ns];
|
|
1232
|
-
}
|
|
1233
1224
|
}
|
|
1234
1225
|
const oldContent = JSON.stringify(existingMergedFile, null, indentation);
|
|
1235
1226
|
const newContent = JSON.stringify(newMergedTranslations, null, indentation);
|
|
@@ -1245,14 +1236,15 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1245
1236
|
const existingNsGlobPattern = existingNsPattern.replace(/\\/g, '/');
|
|
1246
1237
|
const existingNsFiles = await glob.glob(existingNsGlobPattern, { ignore: userIgnore });
|
|
1247
1238
|
for (const file of existingNsFiles) {
|
|
1248
|
-
const ns =
|
|
1239
|
+
const ns = fileUtils.getNamespaceFromOutputPath(config.extract.output, locale, file);
|
|
1249
1240
|
if (ns) {
|
|
1250
1241
|
namespacesToProcess.add(ns);
|
|
1251
1242
|
}
|
|
1252
1243
|
}
|
|
1253
1244
|
// Remove ignored namespaces so their files are never modified
|
|
1254
|
-
for (const ns of
|
|
1255
|
-
|
|
1245
|
+
for (const ns of namespacesToProcess) {
|
|
1246
|
+
if (isIgnoredNs(ns))
|
|
1247
|
+
namespacesToProcess.delete(ns);
|
|
1256
1248
|
}
|
|
1257
1249
|
// Process each namespace individually and create a result for each one
|
|
1258
1250
|
for (const ns of namespacesToProcess) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var pluralRules = require('../../utils/plural-rules.js');
|
|
4
4
|
var messageFormat = require('../../utils/message-format.js');
|
|
5
|
+
var fileUtils = require('../../utils/file-utils.js');
|
|
5
6
|
|
|
6
7
|
// Checks if a string looks like natural language (contains spaces, punctuation, etc.)
|
|
7
8
|
const naturalLanguageChars = /[ ,?!;]/;
|
|
@@ -35,7 +36,7 @@ function extractKeysFromComments(code, pluginContext, config, scopeResolver, kee
|
|
|
35
36
|
const keyRegex = new RegExp(`\\b${functionNameToFind}\\s*\\(\\s*(['"\`])(.*?)\\1`, 'g');
|
|
36
37
|
// Prepare preservePatterns for filtering
|
|
37
38
|
const rawPreservePatterns = config.extract.preservePatterns || [];
|
|
38
|
-
const preservePatterns = rawPreservePatterns.map(globToRegex);
|
|
39
|
+
const preservePatterns = rawPreservePatterns.map(fileUtils.globToRegex);
|
|
39
40
|
const nsSeparator = config.extract.nsSeparator ?? ':';
|
|
40
41
|
const matchesPreserve = (key, ns) => {
|
|
41
42
|
// 1) regex-style matches (existing behavior)
|
|
@@ -391,19 +392,5 @@ function parseOrdinalFromComment(remainder) {
|
|
|
391
392
|
return ordinalObj[1] === 'true';
|
|
392
393
|
return undefined;
|
|
393
394
|
}
|
|
394
|
-
/**
|
|
395
|
-
* Converts a glob pattern to a regular expression.
|
|
396
|
-
* Supports basic glob patterns with * wildcards.
|
|
397
|
-
*
|
|
398
|
-
* @param glob - The glob pattern to convert
|
|
399
|
-
* @returns A RegExp that matches the glob pattern
|
|
400
|
-
*
|
|
401
|
-
* @internal
|
|
402
|
-
*/
|
|
403
|
-
function globToRegex(glob) {
|
|
404
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
405
|
-
const regexString = `^${escaped.replace(/\*/g, '.*')}$`;
|
|
406
|
-
return new RegExp(regexString);
|
|
407
|
-
}
|
|
408
395
|
|
|
409
396
|
exports.extractKeysFromComments = extractKeysFromComments;
|
package/dist/cjs/rename-key.js
CHANGED
|
@@ -207,27 +207,20 @@ async function checkOldKeyExists(oldParts, config) {
|
|
|
207
207
|
async function buildNamespaceKeyMap(config) {
|
|
208
208
|
// Map namespace -> set of flattened keys present in that namespace (union across locales)
|
|
209
209
|
const map = new Map();
|
|
210
|
-
//
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
.replace(/\{\{language\}\}/g, '*')
|
|
219
|
-
.replace(/\{\{namespace\}\}/g, '*');
|
|
220
|
-
// glob expects unix-style
|
|
221
|
-
const files = await glob.glob([pat.replace(/\\/g, '/')], { nodir: true });
|
|
210
|
+
// glob each locale's files, so the namespace can be read from where the output template has it
|
|
211
|
+
const files = [];
|
|
212
|
+
for (const locale of config.locales) {
|
|
213
|
+
// glob expects unix-style
|
|
214
|
+
for (const f of await glob.glob(fileUtils.getOutputPath(config.extract.output, locale, '*').replace(/\\/g, '/'), { nodir: true })) {
|
|
215
|
+
files.push([f, fileUtils.getNamespaceFromOutputPath(config.extract.output, locale, f)]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
222
218
|
const keySeparator = config.extract.keySeparator ?? '.';
|
|
223
|
-
for (const f of files) {
|
|
219
|
+
for (const [f, ns] of files) {
|
|
224
220
|
try {
|
|
225
221
|
const translations = await fileUtils.loadTranslationFile(node_path.resolve(process.cwd(), f));
|
|
226
222
|
if (!translations)
|
|
227
223
|
continue;
|
|
228
|
-
// derive namespace name from filename: basename without extension (platform-safe)
|
|
229
|
-
const base = node_path.basename(f);
|
|
230
|
-
const ns = base.replace(/\.[^.]+$/, ''); // remove extension
|
|
231
224
|
const set = map.get(ns) ?? new Set();
|
|
232
225
|
// flatten keys recursively
|
|
233
226
|
const collect = (obj, prefix = '') => {
|
package/dist/cjs/status.js
CHANGED
|
@@ -22,10 +22,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
22
22
|
var yoctoSpinner__default = /*#__PURE__*/_interopDefault(yoctoSpinner);
|
|
23
23
|
|
|
24
24
|
const LOCIZE_SIGNUP_URL = 'https://www.locize.app/register?from=i18next_cli__status';
|
|
25
|
-
function globToRegex(glob) {
|
|
26
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
27
|
-
return new RegExp(`^${escaped.replace(/\*/g, '.*')}$`);
|
|
28
|
-
}
|
|
29
25
|
const escapeRegex = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
30
26
|
/**
|
|
31
27
|
* True for a value that may stay the same in every language: no letters once the placeholders,
|
|
@@ -204,16 +200,17 @@ async function generateStatusReport(config) {
|
|
|
204
200
|
keysByNs.get(ns).push(key);
|
|
205
201
|
}
|
|
206
202
|
// Filter out ignored namespaces
|
|
207
|
-
const
|
|
208
|
-
for (const ns of
|
|
209
|
-
|
|
203
|
+
const isIgnoredNs = fileUtils.ignoredNamespaceMatcher(config);
|
|
204
|
+
for (const ns of keysByNs.keys()) {
|
|
205
|
+
if (isIgnoredNs(ns))
|
|
206
|
+
keysByNs.delete(ns);
|
|
210
207
|
}
|
|
211
208
|
// Filter out ignored keys (`status.ignoreKeys`, glob, optional `ns:` prefix)
|
|
212
209
|
const nsSep = config.extract.nsSeparator ?? ':';
|
|
213
210
|
const ignoreKeyMatchers = (config.status?.ignoreKeys ?? []).map((pattern) => {
|
|
214
211
|
const sepAt = nsSep ? pattern.indexOf(nsSep) : -1;
|
|
215
212
|
const ns = sepAt > 0 ? pattern.slice(0, sepAt) : undefined;
|
|
216
|
-
const re = globToRegex(sepAt > 0 && nsSep ? pattern.slice(sepAt + nsSep.length) : pattern);
|
|
213
|
+
const re = fileUtils.globToRegex(sepAt > 0 && nsSep ? pattern.slice(sepAt + nsSep.length) : pattern);
|
|
217
214
|
return (k, keyNs) => (ns === undefined || ns === keyNs) && re.test(k.key);
|
|
218
215
|
});
|
|
219
216
|
if (ignoreKeyMatchers.length > 0) {
|
|
@@ -387,7 +384,7 @@ async function generateStatusReport(config) {
|
|
|
387
384
|
catalog = (await fileUtils.loadTranslationFile(nsPath)) ?? undefined;
|
|
388
385
|
}
|
|
389
386
|
}
|
|
390
|
-
if (catalog === undefined && isPrimary &&
|
|
387
|
+
if (catalog === undefined && isPrimary && isIgnoredNs(fallbackNs)) {
|
|
391
388
|
console.warn(`⚠️ fallbackNS "${fallbackNs}" is listed in ignoreNamespaces, but no translations for it were found — keys resolving through it will be reported as absent. If the namespace lives in its own file, use an \`output\` function that maps it to that path.`);
|
|
392
389
|
}
|
|
393
390
|
// If it's still not found, fall back to the top level of the merged
|
|
@@ -397,7 +394,7 @@ async function generateStatusReport(config) {
|
|
|
397
394
|
else {
|
|
398
395
|
const nsPath = node_path.resolve(process.cwd(), fileUtils.getOutputPath(config.extract.output, locale, fallbackNs));
|
|
399
396
|
const catalog = await fileUtils.loadTranslationFile(nsPath);
|
|
400
|
-
if (!catalog && isPrimary &&
|
|
397
|
+
if (!catalog && isPrimary && isIgnoredNs(fallbackNs)) {
|
|
401
398
|
console.warn(`⚠️ fallbackNS "${fallbackNs}" is listed in ignoreNamespaces, but no translations for it were found at "${nsPath}" — keys resolving through it will be reported as absent.`);
|
|
402
399
|
}
|
|
403
400
|
fallbackCatalogs.set(fallbackNs, catalog || {});
|
package/dist/cjs/syncer.js
CHANGED
|
@@ -75,12 +75,12 @@ async function runSyncer(config, options = {}) {
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
// Filter out ignored namespaces
|
|
78
|
-
const
|
|
78
|
+
const isIgnoredNs = fileUtils.ignoredNamespaceMatcher(config);
|
|
79
79
|
// 2. Loop through each primary namespace file
|
|
80
80
|
for (const primaryPath of primaryNsFiles) {
|
|
81
|
-
const ns =
|
|
81
|
+
const ns = fileUtils.getNamespaceFromOutputPath(output, primaryLanguage, primaryPath);
|
|
82
82
|
// Skip ignored namespaces
|
|
83
|
-
if (
|
|
83
|
+
if (isIgnoredNs(ns))
|
|
84
84
|
continue;
|
|
85
85
|
const primaryTranslations = await fileUtils.loadTranslationFile(primaryPath);
|
|
86
86
|
if (!primaryTranslations) {
|
|
@@ -67,6 +67,35 @@ function getOutputPath(outputTemplate, language, namespace) {
|
|
|
67
67
|
out = out.replace(/\/\/+/g, '/');
|
|
68
68
|
return node_path.normalize(out);
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The namespace of a file found with `getOutputPath(outputTemplate, language, '*')`: the part of its path
|
|
72
|
+
* where the template has the namespace, so `locales/{{namespace}}/{{language}}.json` works like
|
|
73
|
+
* `locales/{{language}}/{{namespace}}.json`. Falls back to the file name without its extension.
|
|
74
|
+
*/
|
|
75
|
+
function getNamespaceFromOutputPath(outputTemplate, language, filePath) {
|
|
76
|
+
const marker = '\u0000';
|
|
77
|
+
const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
78
|
+
// compare absolute paths: glob returns relative or absolute paths depending on the pattern
|
|
79
|
+
const [first, ...rest] = node_path.resolve(getOutputPath(outputTemplate, language, marker)).replace(/\\/g, '/').split(marker);
|
|
80
|
+
// a namespace that appears more than once in the template must be the same each time;
|
|
81
|
+
// case-insensitive like glob on macOS and Windows
|
|
82
|
+
const match = rest.length > 0 && new RegExp(`^${escape(first)}([^/]+)${rest.map(escape).join('\\1')}$`, 'i').exec(node_path.resolve(filePath).replace(/\\/g, '/'));
|
|
83
|
+
return match ? match[1] : node_path.basename(filePath, node_path.extname(filePath));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Converts a glob pattern to a regular expression: `*` matches any characters, everything else literally.
|
|
87
|
+
*/
|
|
88
|
+
function globToRegex(glob) {
|
|
89
|
+
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
90
|
+
return new RegExp(`^${escaped.replace(/\*/g, '.*')}$`);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Whether a namespace is listed in `extract.ignoreNamespaces`, whose entries may be glob patterns (`'dev.*'`).
|
|
94
|
+
*/
|
|
95
|
+
function ignoredNamespaceMatcher(config) {
|
|
96
|
+
const patterns = (config.extract.ignoreNamespaces ?? []).map(globToRegex);
|
|
97
|
+
return ns => patterns.some(re => re.test(ns));
|
|
98
|
+
}
|
|
70
99
|
/**
|
|
71
100
|
* Dynamically loads a translation file, supporting .json, .js, and .ts formats.
|
|
72
101
|
* @param filePath - The path to the translation file.
|
|
@@ -204,7 +233,10 @@ function inferFormatFromPath(filePath, defaultFormat = 'json') {
|
|
|
204
233
|
}
|
|
205
234
|
|
|
206
235
|
exports.ParseTranslationFileError = ParseTranslationFileError;
|
|
236
|
+
exports.getNamespaceFromOutputPath = getNamespaceFromOutputPath;
|
|
207
237
|
exports.getOutputPath = getOutputPath;
|
|
238
|
+
exports.globToRegex = globToRegex;
|
|
239
|
+
exports.ignoredNamespaceMatcher = ignoredNamespaceMatcher;
|
|
208
240
|
exports.inferFormatFromPath = inferFormatFromPath;
|
|
209
241
|
exports.loadRawJson5Content = loadRawJson5Content;
|
|
210
242
|
exports.loadTranslationFile = loadTranslationFile;
|
|
@@ -245,12 +245,13 @@ async function lineFinder(file) {
|
|
|
245
245
|
}
|
|
246
246
|
// Namespace discovery as in `sync`: the primary language's files
|
|
247
247
|
async function primaryNamespaces(config, primary) {
|
|
248
|
-
const { output
|
|
248
|
+
const { output } = config.extract;
|
|
249
249
|
if (typeof output === 'string' && !output.includes('{{namespace}}'))
|
|
250
250
|
return [undefined];
|
|
251
|
+
const isIgnoredNs = fileUtils.ignoredNamespaceMatcher(config);
|
|
251
252
|
return (await glob.glob(fileUtils.getOutputPath(output, primary, '*').replace(/\\/g, '/')))
|
|
252
|
-
.map(file =>
|
|
253
|
-
.filter(ns => !
|
|
253
|
+
.map(file => fileUtils.getNamespaceFromOutputPath(output, primary, file))
|
|
254
|
+
.filter(ns => !isIgnoredNs(ns));
|
|
254
255
|
}
|
|
255
256
|
/**
|
|
256
257
|
* Checks every translation value of every locale for `extract.messageFormat` `'icu'` or `'mf2'`:
|
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.83.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)');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolve
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import { naturalLanguageRegexFor, getNestedKeys, getNestedValue, setNestedValue, storedKeySeparator } from '../../utils/nested-object.js';
|
|
4
|
-
import { getOutputPath, loadTranslationFile } from '../../utils/file-utils.js';
|
|
4
|
+
import { globToRegex, ignoredNamespaceMatcher, getOutputPath, loadTranslationFile, getNamespaceFromOutputPath } from '../../utils/file-utils.js';
|
|
5
5
|
import { resolveDefaultValue } from '../../utils/default-value.js';
|
|
6
6
|
import { ConsoleLogger } from '../../utils/logger.js';
|
|
7
7
|
import { safePluralRules } from '../../utils/plural-rules.js';
|
|
@@ -10,16 +10,6 @@ import { usesMessageFormat } from '../../utils/message-format.js';
|
|
|
10
10
|
import { isContextVariantOfAcceptingKey } from '../../utils/context-variants.js';
|
|
11
11
|
|
|
12
12
|
const pluralForms = ['zero', 'one', 'two', 'few', 'many', 'other'];
|
|
13
|
-
/**
|
|
14
|
-
* Converts a glob pattern to a regular expression for matching keys
|
|
15
|
-
* @param glob - The glob pattern to convert
|
|
16
|
-
* @returns A RegExp object that matches the glob pattern
|
|
17
|
-
*/
|
|
18
|
-
function globToRegex(glob) {
|
|
19
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
20
|
-
const regexString = `^${escaped.replace(/\*/g, '.*')}$`;
|
|
21
|
-
return new RegExp(regexString);
|
|
22
|
-
}
|
|
23
13
|
/**
|
|
24
14
|
* Detects a nesting conflict for `key` against the object being built.
|
|
25
15
|
* Returns the conflicting ancestor/descendant key path as a string when a
|
|
@@ -1148,9 +1138,10 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1148
1138
|
keysByNS.get(nsKey).push(k);
|
|
1149
1139
|
}
|
|
1150
1140
|
// Filter out ignored namespaces
|
|
1151
|
-
const
|
|
1152
|
-
for (const ns of
|
|
1153
|
-
|
|
1141
|
+
const isIgnoredNs = ignoredNamespaceMatcher(config);
|
|
1142
|
+
for (const ns of keysByNS.keys()) {
|
|
1143
|
+
if (isIgnoredNs(ns))
|
|
1144
|
+
keysByNS.delete(ns);
|
|
1154
1145
|
}
|
|
1155
1146
|
// Respect fallbackNS (#272): a key extracted for another namespace that is
|
|
1156
1147
|
// already translated in a fallback namespace resolves at runtime through the
|
|
@@ -1199,8 +1190,9 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1199
1190
|
? new Set([...keysByNS.keys(), ...existingKeys])
|
|
1200
1191
|
: new Set([...keysByNS.keys(), NO_NS_TOKEN]);
|
|
1201
1192
|
// Remove ignored namespaces so their section is never modified
|
|
1202
|
-
for (const ns of
|
|
1203
|
-
|
|
1193
|
+
for (const ns of namespacesToProcess) {
|
|
1194
|
+
if (isIgnoredNs(ns))
|
|
1195
|
+
namespacesToProcess.delete(ns);
|
|
1204
1196
|
}
|
|
1205
1197
|
// When nsSeparator is false, keys resolved to the defaultNS (e.g. from
|
|
1206
1198
|
// useTranslation() with no args) should be treated as top-level, not
|
|
@@ -1224,10 +1216,9 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1224
1216
|
}
|
|
1225
1217
|
}
|
|
1226
1218
|
// Preserve ignored namespaces as-is from the existing merged file
|
|
1227
|
-
for (const ns of
|
|
1228
|
-
if (ns
|
|
1219
|
+
for (const ns of existingKeys) {
|
|
1220
|
+
if (isIgnoredNs(ns))
|
|
1229
1221
|
newMergedTranslations[ns] = existingMergedFile[ns];
|
|
1230
|
-
}
|
|
1231
1222
|
}
|
|
1232
1223
|
const oldContent = JSON.stringify(existingMergedFile, null, indentation);
|
|
1233
1224
|
const newContent = JSON.stringify(newMergedTranslations, null, indentation);
|
|
@@ -1243,14 +1234,15 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
1243
1234
|
const existingNsGlobPattern = existingNsPattern.replace(/\\/g, '/');
|
|
1244
1235
|
const existingNsFiles = await glob(existingNsGlobPattern, { ignore: userIgnore });
|
|
1245
1236
|
for (const file of existingNsFiles) {
|
|
1246
|
-
const ns =
|
|
1237
|
+
const ns = getNamespaceFromOutputPath(config.extract.output, locale, file);
|
|
1247
1238
|
if (ns) {
|
|
1248
1239
|
namespacesToProcess.add(ns);
|
|
1249
1240
|
}
|
|
1250
1241
|
}
|
|
1251
1242
|
// Remove ignored namespaces so their files are never modified
|
|
1252
|
-
for (const ns of
|
|
1253
|
-
|
|
1243
|
+
for (const ns of namespacesToProcess) {
|
|
1244
|
+
if (isIgnoredNs(ns))
|
|
1245
|
+
namespacesToProcess.delete(ns);
|
|
1254
1246
|
}
|
|
1255
1247
|
// Process each namespace individually and create a result for each one
|
|
1256
1248
|
for (const ns of namespacesToProcess) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { safePluralRules } from '../../utils/plural-rules.js';
|
|
2
2
|
import { usesMessageFormat } from '../../utils/message-format.js';
|
|
3
|
+
import { globToRegex } from '../../utils/file-utils.js';
|
|
3
4
|
|
|
4
5
|
// Checks if a string looks like natural language (contains spaces, punctuation, etc.)
|
|
5
6
|
const naturalLanguageChars = /[ ,?!;]/;
|
|
@@ -389,19 +390,5 @@ function parseOrdinalFromComment(remainder) {
|
|
|
389
390
|
return ordinalObj[1] === 'true';
|
|
390
391
|
return undefined;
|
|
391
392
|
}
|
|
392
|
-
/**
|
|
393
|
-
* Converts a glob pattern to a regular expression.
|
|
394
|
-
* Supports basic glob patterns with * wildcards.
|
|
395
|
-
*
|
|
396
|
-
* @param glob - The glob pattern to convert
|
|
397
|
-
* @returns A RegExp that matches the glob pattern
|
|
398
|
-
*
|
|
399
|
-
* @internal
|
|
400
|
-
*/
|
|
401
|
-
function globToRegex(glob) {
|
|
402
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
403
|
-
const regexString = `^${escaped.replace(/\*/g, '.*')}$`;
|
|
404
|
-
return new RegExp(regexString);
|
|
405
|
-
}
|
|
406
393
|
|
|
407
394
|
export { extractKeysFromComments };
|
package/dist/esm/rename-key.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { glob } from 'glob';
|
|
2
2
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
-
import { resolve
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
4
|
import { ConsoleLogger } from './utils/logger.js';
|
|
5
|
-
import { getOutputPath, loadTranslationFile, serializeTranslationFile } from './utils/file-utils.js';
|
|
5
|
+
import { getOutputPath, loadTranslationFile, getNamespaceFromOutputPath, serializeTranslationFile } from './utils/file-utils.js';
|
|
6
6
|
import { getNestedValue, naturalLanguageRegexFor, storedKeySeparator, setNestedValue } from './utils/nested-object.js';
|
|
7
7
|
import { shouldShowFunnel, recordFunnelShown } from './utils/funnel-msg-tracker.js';
|
|
8
8
|
import { styleText } from 'node:util';
|
|
@@ -205,27 +205,20 @@ async function checkOldKeyExists(oldParts, config) {
|
|
|
205
205
|
async function buildNamespaceKeyMap(config) {
|
|
206
206
|
// Map namespace -> set of flattened keys present in that namespace (union across locales)
|
|
207
207
|
const map = new Map();
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
.replace(/\{\{language\}\}/g, '*')
|
|
217
|
-
.replace(/\{\{namespace\}\}/g, '*');
|
|
218
|
-
// glob expects unix-style
|
|
219
|
-
const files = await glob([pat.replace(/\\/g, '/')], { nodir: true });
|
|
208
|
+
// glob each locale's files, so the namespace can be read from where the output template has it
|
|
209
|
+
const files = [];
|
|
210
|
+
for (const locale of config.locales) {
|
|
211
|
+
// glob expects unix-style
|
|
212
|
+
for (const f of await glob(getOutputPath(config.extract.output, locale, '*').replace(/\\/g, '/'), { nodir: true })) {
|
|
213
|
+
files.push([f, getNamespaceFromOutputPath(config.extract.output, locale, f)]);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
220
216
|
const keySeparator = config.extract.keySeparator ?? '.';
|
|
221
|
-
for (const f of files) {
|
|
217
|
+
for (const [f, ns] of files) {
|
|
222
218
|
try {
|
|
223
219
|
const translations = await loadTranslationFile(resolve(process.cwd(), f));
|
|
224
220
|
if (!translations)
|
|
225
221
|
continue;
|
|
226
|
-
// derive namespace name from filename: basename without extension (platform-safe)
|
|
227
|
-
const base = basename(f);
|
|
228
|
-
const ns = base.replace(/\.[^.]+$/, ''); // remove extension
|
|
229
222
|
const set = map.get(ns) ?? new Set();
|
|
230
223
|
// flatten keys recursively
|
|
231
224
|
const collect = (obj, prefix = '') => {
|
package/dist/esm/status.js
CHANGED
|
@@ -5,7 +5,7 @@ import { runExtractor } from './extractor/core/extractor.js';
|
|
|
5
5
|
import { findKeys } from './extractor/core/key-finder.js';
|
|
6
6
|
import 'glob';
|
|
7
7
|
import { getNestedKeys, getNestedValue } from './utils/nested-object.js';
|
|
8
|
-
import { loadTranslationFile, getOutputPath } from './utils/file-utils.js';
|
|
8
|
+
import { ignoredNamespaceMatcher, globToRegex, loadTranslationFile, getOutputPath } from './utils/file-utils.js';
|
|
9
9
|
import { safePluralRules } from './utils/plural-rules.js';
|
|
10
10
|
import { parseNestedReferences } from './utils/nesting.js';
|
|
11
11
|
import { usesMessageFormat } from './utils/message-format.js';
|
|
@@ -16,10 +16,6 @@ import { shouldShowFunnel, recordFunnelShown } from './utils/funnel-msg-tracker.
|
|
|
16
16
|
import { printUntranslatedFunnel } from './utils/locize-funnel.js';
|
|
17
17
|
|
|
18
18
|
const LOCIZE_SIGNUP_URL = 'https://www.locize.app/register?from=i18next_cli__status';
|
|
19
|
-
function globToRegex(glob) {
|
|
20
|
-
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
21
|
-
return new RegExp(`^${escaped.replace(/\*/g, '.*')}$`);
|
|
22
|
-
}
|
|
23
19
|
const escapeRegex = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
24
20
|
/**
|
|
25
21
|
* True for a value that may stay the same in every language: no letters once the placeholders,
|
|
@@ -198,9 +194,10 @@ async function generateStatusReport(config) {
|
|
|
198
194
|
keysByNs.get(ns).push(key);
|
|
199
195
|
}
|
|
200
196
|
// Filter out ignored namespaces
|
|
201
|
-
const
|
|
202
|
-
for (const ns of
|
|
203
|
-
|
|
197
|
+
const isIgnoredNs = ignoredNamespaceMatcher(config);
|
|
198
|
+
for (const ns of keysByNs.keys()) {
|
|
199
|
+
if (isIgnoredNs(ns))
|
|
200
|
+
keysByNs.delete(ns);
|
|
204
201
|
}
|
|
205
202
|
// Filter out ignored keys (`status.ignoreKeys`, glob, optional `ns:` prefix)
|
|
206
203
|
const nsSep = config.extract.nsSeparator ?? ':';
|
|
@@ -381,7 +378,7 @@ async function generateStatusReport(config) {
|
|
|
381
378
|
catalog = (await loadTranslationFile(nsPath)) ?? undefined;
|
|
382
379
|
}
|
|
383
380
|
}
|
|
384
|
-
if (catalog === undefined && isPrimary &&
|
|
381
|
+
if (catalog === undefined && isPrimary && isIgnoredNs(fallbackNs)) {
|
|
385
382
|
console.warn(`⚠️ fallbackNS "${fallbackNs}" is listed in ignoreNamespaces, but no translations for it were found — keys resolving through it will be reported as absent. If the namespace lives in its own file, use an \`output\` function that maps it to that path.`);
|
|
386
383
|
}
|
|
387
384
|
// If it's still not found, fall back to the top level of the merged
|
|
@@ -391,7 +388,7 @@ async function generateStatusReport(config) {
|
|
|
391
388
|
else {
|
|
392
389
|
const nsPath = resolve(process.cwd(), getOutputPath(config.extract.output, locale, fallbackNs));
|
|
393
390
|
const catalog = await loadTranslationFile(nsPath);
|
|
394
|
-
if (!catalog && isPrimary &&
|
|
391
|
+
if (!catalog && isPrimary && isIgnoredNs(fallbackNs)) {
|
|
395
392
|
console.warn(`⚠️ fallbackNS "${fallbackNs}" is listed in ignoreNamespaces, but no translations for it were found at "${nsPath}" — keys resolving through it will be reported as absent.`);
|
|
396
393
|
}
|
|
397
394
|
fallbackCatalogs.set(fallbackNs, catalog || {});
|
package/dist/esm/syncer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { styleText } from 'node:util';
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
4
|
-
import {
|
|
4
|
+
import { resolve, dirname } from 'node:path';
|
|
5
5
|
import { createSpinnerLike } from './utils/wrap-ora.js';
|
|
6
6
|
import { ConsoleLogger } from './utils/logger.js';
|
|
7
7
|
import { resolveDefaultValue } from './utils/default-value.js';
|
|
8
|
-
import { getOutputPath, loadTranslationFile, inferFormatFromPath, loadRawJson5Content, serializeTranslationFile } from './utils/file-utils.js';
|
|
8
|
+
import { getOutputPath, ignoredNamespaceMatcher, getNamespaceFromOutputPath, loadTranslationFile, inferFormatFromPath, loadRawJson5Content, serializeTranslationFile } from './utils/file-utils.js';
|
|
9
9
|
import { printUntranslatedFunnel } from './utils/locize-funnel.js';
|
|
10
10
|
import { getNestedKeys, getNestedValue, setNestedValue } from './utils/nested-object.js';
|
|
11
11
|
import { safePluralRules } from './utils/plural-rules.js';
|
|
@@ -73,12 +73,12 @@ async function runSyncer(config, options = {}) {
|
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
// Filter out ignored namespaces
|
|
76
|
-
const
|
|
76
|
+
const isIgnoredNs = ignoredNamespaceMatcher(config);
|
|
77
77
|
// 2. Loop through each primary namespace file
|
|
78
78
|
for (const primaryPath of primaryNsFiles) {
|
|
79
|
-
const ns =
|
|
79
|
+
const ns = getNamespaceFromOutputPath(output, primaryLanguage, primaryPath);
|
|
80
80
|
// Skip ignored namespaces
|
|
81
|
-
if (
|
|
81
|
+
if (isIgnoredNs(ns))
|
|
82
82
|
continue;
|
|
83
83
|
const primaryTranslations = await loadTranslationFile(primaryPath);
|
|
84
84
|
if (!primaryTranslations) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { access, readFile } from 'node:fs/promises';
|
|
2
|
-
import { resolve, normalize, extname } from 'node:path';
|
|
2
|
+
import { resolve, normalize, basename, extname } from 'node:path';
|
|
3
3
|
import { createJiti } from 'jiti';
|
|
4
4
|
import { getTsConfigAliases } from '../config.js';
|
|
5
5
|
import { JsonParser, JsonObjectNode } from '@croct/json5-parser';
|
|
@@ -61,6 +61,35 @@ function getOutputPath(outputTemplate, language, namespace) {
|
|
|
61
61
|
out = out.replace(/\/\/+/g, '/');
|
|
62
62
|
return normalize(out);
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The namespace of a file found with `getOutputPath(outputTemplate, language, '*')`: the part of its path
|
|
66
|
+
* where the template has the namespace, so `locales/{{namespace}}/{{language}}.json` works like
|
|
67
|
+
* `locales/{{language}}/{{namespace}}.json`. Falls back to the file name without its extension.
|
|
68
|
+
*/
|
|
69
|
+
function getNamespaceFromOutputPath(outputTemplate, language, filePath) {
|
|
70
|
+
const marker = '\u0000';
|
|
71
|
+
const escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
72
|
+
// compare absolute paths: glob returns relative or absolute paths depending on the pattern
|
|
73
|
+
const [first, ...rest] = resolve(getOutputPath(outputTemplate, language, marker)).replace(/\\/g, '/').split(marker);
|
|
74
|
+
// a namespace that appears more than once in the template must be the same each time;
|
|
75
|
+
// case-insensitive like glob on macOS and Windows
|
|
76
|
+
const match = rest.length > 0 && new RegExp(`^${escape(first)}([^/]+)${rest.map(escape).join('\\1')}$`, 'i').exec(resolve(filePath).replace(/\\/g, '/'));
|
|
77
|
+
return match ? match[1] : basename(filePath, extname(filePath));
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Converts a glob pattern to a regular expression: `*` matches any characters, everything else literally.
|
|
81
|
+
*/
|
|
82
|
+
function globToRegex(glob) {
|
|
83
|
+
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
84
|
+
return new RegExp(`^${escaped.replace(/\*/g, '.*')}$`);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Whether a namespace is listed in `extract.ignoreNamespaces`, whose entries may be glob patterns (`'dev.*'`).
|
|
88
|
+
*/
|
|
89
|
+
function ignoredNamespaceMatcher(config) {
|
|
90
|
+
const patterns = (config.extract.ignoreNamespaces ?? []).map(globToRegex);
|
|
91
|
+
return ns => patterns.some(re => re.test(ns));
|
|
92
|
+
}
|
|
64
93
|
/**
|
|
65
94
|
* Dynamically loads a translation file, supporting .json, .js, and .ts formats.
|
|
66
95
|
* @param filePath - The path to the translation file.
|
|
@@ -197,4 +226,4 @@ function inferFormatFromPath(filePath, defaultFormat = 'json') {
|
|
|
197
226
|
return defaultFormat || 'json';
|
|
198
227
|
}
|
|
199
228
|
|
|
200
|
-
export { ParseTranslationFileError, getOutputPath, inferFormatFromPath, loadRawJson5Content, loadTranslationFile, serializeTranslationFile };
|
|
229
|
+
export { ParseTranslationFileError, getNamespaceFromOutputPath, getOutputPath, globToRegex, ignoredNamespaceMatcher, inferFormatFromPath, loadRawJson5Content, loadTranslationFile, serializeTranslationFile };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
3
|
import { glob } from 'glob';
|
|
4
4
|
import { parseTree, findNodeAtLocation } from 'jsonc-parser';
|
|
5
|
-
import { getOutputPath, loadTranslationFile } from './file-utils.js';
|
|
5
|
+
import { getOutputPath, loadTranslationFile, ignoredNamespaceMatcher, getNamespaceFromOutputPath } from './file-utils.js';
|
|
6
6
|
import { parseNestedReferences } from './nesting.js';
|
|
7
7
|
|
|
8
8
|
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
@@ -243,12 +243,13 @@ async function lineFinder(file) {
|
|
|
243
243
|
}
|
|
244
244
|
// Namespace discovery as in `sync`: the primary language's files
|
|
245
245
|
async function primaryNamespaces(config, primary) {
|
|
246
|
-
const { output
|
|
246
|
+
const { output } = config.extract;
|
|
247
247
|
if (typeof output === 'string' && !output.includes('{{namespace}}'))
|
|
248
248
|
return [undefined];
|
|
249
|
+
const isIgnoredNs = ignoredNamespaceMatcher(config);
|
|
249
250
|
return (await glob(getOutputPath(output, primary, '*').replace(/\\/g, '/')))
|
|
250
|
-
.map(file =>
|
|
251
|
-
.filter(ns => !
|
|
251
|
+
.map(file => getNamespaceFromOutputPath(output, primary, file))
|
|
252
|
+
.filter(ns => !isIgnoredNs(ns));
|
|
252
253
|
}
|
|
253
254
|
/**
|
|
254
255
|
* Checks every translation value of every locale for `extract.messageFormat` `'icu'` or `'mf2'`:
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAwsC9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,oBAAoB,EAC5B,EACE,uBAA+B,EAC/B,OAAe,EACf,oBAA4B,EAC5B,MAA4B,EAC5B,YAAiB,EAClB,GAAE;IACD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA2K9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-parser.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/comment-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"comment-parser.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/comment-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AASvF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EAC3F,YAAY,CAAC,EAAE,YAAY,EAAE,GAC5B,IAAI,CA0KN"}
|
package/types/status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAmC,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAmC,MAAM,YAAY,CAAA;AA8BvF;;GAEG;AACH,UAAU,aAAa;IACrB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAkID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,SAAS,CAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,GAAE,aAAkB,iBAoDzF;AAssBD;;GAEG;AACH,UAAU,aAAa;IACrB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,GAAE,aAAkB,iBAuE/F"}
|
package/types/types.d.ts
CHANGED
|
@@ -144,7 +144,8 @@ export interface I18nextToolkitConfig {
|
|
|
144
144
|
* Array of namespace names to ignore during extraction, status, and sync operations.
|
|
145
145
|
* Keys using these namespaces will be excluded from processing.
|
|
146
146
|
* Useful for monorepos where shared namespaces are managed elsewhere.
|
|
147
|
-
*
|
|
147
|
+
* Supports glob patterns, where `*` matches any characters (`'dev.*'`).
|
|
148
|
+
* @example ['shared', 'common', 'dev.*']
|
|
148
149
|
*/
|
|
149
150
|
ignoreNamespaces?: string[];
|
|
150
151
|
/**
|
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,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AM,CAAA;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,iBAAiB,EAAE,CAAA;IAC/B,0CAA0C;IAC1C,mBAAmB,EAAE,kBAAkB,EAAE,CAAA;IACzC,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IACP,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;CACrB,KACE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA"}
|
|
@@ -60,6 +60,20 @@ export declare function writeFileAsync(filePath: string, data: string): Promise<
|
|
|
60
60
|
* - Normalizes duplicate slashes and returns a platform-correct path.
|
|
61
61
|
*/
|
|
62
62
|
export declare function getOutputPath(outputTemplate: string | ((language: string, namespace?: string) => string) | undefined, language: string, namespace?: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* The namespace of a file found with `getOutputPath(outputTemplate, language, '*')`: the part of its path
|
|
65
|
+
* where the template has the namespace, so `locales/{{namespace}}/{{language}}.json` works like
|
|
66
|
+
* `locales/{{language}}/{{namespace}}.json`. Falls back to the file name without its extension.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getNamespaceFromOutputPath(outputTemplate: Parameters<typeof getOutputPath>[0], language: string, filePath: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Converts a glob pattern to a regular expression: `*` matches any characters, everything else literally.
|
|
71
|
+
*/
|
|
72
|
+
export declare function globToRegex(glob: string): RegExp;
|
|
73
|
+
/**
|
|
74
|
+
* Whether a namespace is listed in `extract.ignoreNamespaces`, whose entries may be glob patterns (`'dev.*'`).
|
|
75
|
+
*/
|
|
76
|
+
export declare function ignoredNamespaceMatcher(config: Pick<I18nextToolkitConfig, 'extract'>): (ns: string) => boolean;
|
|
63
77
|
/**
|
|
64
78
|
* Dynamically loads a translation file, supporting .json, .js, and .ts formats.
|
|
65
79
|
* @param filePath - The path to the translation file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.d.ts","sourceRoot":"","sources":["../../src/utils/file-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAKvD;;;;;;GAMG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;aACrB,QAAQ,EAAE,MAAM;aAAkB,KAAK,CAAC,EAAE,OAAO;gBAAjD,QAAQ,EAAE,MAAM,EAAkB,KAAK,CAAC,EAAE,OAAO,YAAA;CAK/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,cAAc,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,EACvF,QAAQ,EAAE,MAAM,EAChB,SAAS,CA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