i18next-cli 1.61.0 → 1.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/cli.js +2 -2
- package/dist/cjs/locize.js +7 -2
- package/dist/esm/cli.js +2 -2
- package/dist/esm/locize.js +7 -2
- package/package.json +1 -1
- package/types/locize.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -543,7 +543,7 @@ npx i18next-cli locize-sync [options]
|
|
|
543
543
|
|
|
544
544
|
**Options:**
|
|
545
545
|
- `--update-values`: Update values of existing translations on locize
|
|
546
|
-
- `--src-lng-only
|
|
546
|
+
- `--src-lng-only <true|false>`: Check for changes in source language only (default: `true`). Pass `--src-lng-only false` to sync all languages
|
|
547
547
|
- `--compare-mtime`: Compare modification times when syncing
|
|
548
548
|
- `--dry-run`: Run the command without making any changes
|
|
549
549
|
|
package/dist/cjs/cli.js
CHANGED
|
@@ -32,7 +32,7 @@ const program = new commander.Command();
|
|
|
32
32
|
program
|
|
33
33
|
.name('i18next-cli')
|
|
34
34
|
.description('A unified, high-performance i18next CLI.')
|
|
35
|
-
.version('1.61.
|
|
35
|
+
.version('1.61.1'); // This string is replaced with the actual version at build time by rollup
|
|
36
36
|
// new: global config override option
|
|
37
37
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
38
38
|
program
|
|
@@ -290,7 +290,7 @@ program
|
|
|
290
290
|
.command('locize-sync')
|
|
291
291
|
.description('Synchronize local translations with your Locize project.')
|
|
292
292
|
.option('--update-values', 'Update values of existing translations on Locize.')
|
|
293
|
-
.option('--src-lng-only', 'Check for changes in source language only.')
|
|
293
|
+
.option('--src-lng-only <true|false>', 'Check for changes in source language only. (default: true)')
|
|
294
294
|
.option('--compare-mtime', 'Compare modification times when syncing.')
|
|
295
295
|
.option('--dry-run', 'Run the command without making any changes.')
|
|
296
296
|
.option('--cdn-type <standard|pro>', 'Specify the cdn endpoint that should be used (depends on which cdn type you\'ve in your locize project)')
|
package/dist/cjs/locize.js
CHANGED
|
@@ -165,9 +165,14 @@ function buildArgs(command, config, cliOptions) {
|
|
|
165
165
|
const updateValues = cliOptions.updateValues ?? locizeConfig.updateValues;
|
|
166
166
|
if (updateValues)
|
|
167
167
|
commandArgs.push('--update-values', 'true');
|
|
168
|
+
// `--reference-language-only` defaults to `true` in locize-cli, so we only
|
|
169
|
+
// forward it when explicitly set – passing `false` is the whole point, as it
|
|
170
|
+
// is the only way to opt out of the source-language-only behavior.
|
|
168
171
|
const srcLngOnly = cliOptions.srcLngOnly ?? locizeConfig.sourceLanguageOnly;
|
|
169
|
-
if (srcLngOnly)
|
|
170
|
-
|
|
172
|
+
if (srcLngOnly !== undefined) {
|
|
173
|
+
const referenceLanguageOnly = srcLngOnly === true || srcLngOnly === 'true';
|
|
174
|
+
commandArgs.push('--reference-language-only', String(referenceLanguageOnly));
|
|
175
|
+
}
|
|
171
176
|
const compareMtime = cliOptions.compareMtime ?? locizeConfig.compareModificationTime;
|
|
172
177
|
if (compareMtime)
|
|
173
178
|
commandArgs.push('--compare-modification-time', 'true');
|
package/dist/esm/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ const program = new Command();
|
|
|
30
30
|
program
|
|
31
31
|
.name('i18next-cli')
|
|
32
32
|
.description('A unified, high-performance i18next CLI.')
|
|
33
|
-
.version('1.61.
|
|
33
|
+
.version('1.61.1'); // This string is replaced with the actual version at build time by rollup
|
|
34
34
|
// new: global config override option
|
|
35
35
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
36
36
|
program
|
|
@@ -288,7 +288,7 @@ program
|
|
|
288
288
|
.command('locize-sync')
|
|
289
289
|
.description('Synchronize local translations with your Locize project.')
|
|
290
290
|
.option('--update-values', 'Update values of existing translations on Locize.')
|
|
291
|
-
.option('--src-lng-only', 'Check for changes in source language only.')
|
|
291
|
+
.option('--src-lng-only <true|false>', 'Check for changes in source language only. (default: true)')
|
|
292
292
|
.option('--compare-mtime', 'Compare modification times when syncing.')
|
|
293
293
|
.option('--dry-run', 'Run the command without making any changes.')
|
|
294
294
|
.option('--cdn-type <standard|pro>', 'Specify the cdn endpoint that should be used (depends on which cdn type you\'ve in your locize project)')
|
package/dist/esm/locize.js
CHANGED
|
@@ -163,9 +163,14 @@ function buildArgs(command, config, cliOptions) {
|
|
|
163
163
|
const updateValues = cliOptions.updateValues ?? locizeConfig.updateValues;
|
|
164
164
|
if (updateValues)
|
|
165
165
|
commandArgs.push('--update-values', 'true');
|
|
166
|
+
// `--reference-language-only` defaults to `true` in locize-cli, so we only
|
|
167
|
+
// forward it when explicitly set – passing `false` is the whole point, as it
|
|
168
|
+
// is the only way to opt out of the source-language-only behavior.
|
|
166
169
|
const srcLngOnly = cliOptions.srcLngOnly ?? locizeConfig.sourceLanguageOnly;
|
|
167
|
-
if (srcLngOnly)
|
|
168
|
-
|
|
170
|
+
if (srcLngOnly !== undefined) {
|
|
171
|
+
const referenceLanguageOnly = srcLngOnly === true || srcLngOnly === 'true';
|
|
172
|
+
commandArgs.push('--reference-language-only', String(referenceLanguageOnly));
|
|
173
|
+
}
|
|
169
174
|
const compareMtime = cliOptions.compareMtime ?? locizeConfig.compareModificationTime;
|
|
170
175
|
if (compareMtime)
|
|
171
176
|
commandArgs.push('--compare-modification-time', 'true');
|
package/package.json
CHANGED
package/types/locize.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locize.d.ts","sourceRoot":"","sources":["../src/locize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"locize.d.ts","sourceRoot":"","sources":["../src/locize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAsTtD,eAAO,MAAM,aAAa,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAiD,CAAA;AAC7H,eAAO,MAAM,iBAAiB,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAqD,CAAA;AACrI,eAAO,MAAM,gBAAgB,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAoD,CAAA"}
|