locize-cli 12.0.9 → 12.1.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/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  Project versioning adheres to [Semantic Versioning](http://semver.org/).
6
6
  Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
7
7
 
8
+ ## [12.1.0](https://github.com/locize/locize-cli/compare/v12.0.10...v12.1.0) - 2026-04-13
9
+
10
+ - sync: introduce `--auto-translate-review true` option
11
+
12
+ ## [12.0.10](https://github.com/locize/locize-cli/compare/v12.0.9...v12.0.10) - 2026-04-08
13
+
14
+ - sync: handle optional autotranslate=false
15
+ - update dependencies
16
+
8
17
  ## [12.0.9](https://github.com/locize/locize-cli/compare/v12.0.8...v12.0.9) - 2026-03-02
9
18
 
10
19
  - improve --download option for migrate command
package/dist/cjs/cli.js CHANGED
@@ -50,7 +50,7 @@ const program = new commander.Command();
50
50
 
51
51
  program
52
52
  .description('The official locize CLI.')
53
- .version('12.0.9'); // This string is replaced with the actual version at build time by rollup
53
+ .version('12.1.0'); // This string is replaced with the actual version at build time by rollup
54
54
  // .option('-a, --api-endpoint <url>', `Specify the api-endpoint url that should be used (default: ${defaultApiEndpoint})`)
55
55
  // .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`);
56
56
 
@@ -418,6 +418,7 @@ program
418
418
  .option('--cf, --clean-local-files <true|false>', 'Removes all local files without removing any folder (default: false)', 'false')
419
419
  .option('-u, --update-values <true|false>', 'This will update values of existing translations. (default: false)', 'false')
420
420
  .option('--auto-translate <true|false>', 'This will trigger auto-translation of updated translations. (default: false)', 'false')
421
+ .option('--auto-translate-review <true|false>', 'When auto-translating, route results through the review workflow for languages that have review enabled. (default: false)', 'false')
421
422
  .option('-S, --skip-delete <true|false>', 'This will skip the removal of keys on locize. (default: false)', 'false')
422
423
  .option('-D, --delete-remote-namespace <true|false>', 'This will delete a complete namespace on locize, if a local file in reference language was deleted. (default: false)', 'false')
423
424
  .option('-m, --path-mask <mask>', 'This will define the folder and file structure; do not add a file extension (default: {{language}}/{{namespace}})', `{{language}}${path.sep}{{namespace}}`)
@@ -473,7 +474,8 @@ program
473
474
  const cleanLocalFiles = options.cleanLocalFiles === 'true';
474
475
  const dry = options.dry === 'true';
475
476
  const updateValues = options.updateValues === 'true';
476
- const autoTranslate = options.autoTranslate === 'true';
477
+ const autoTranslate = options.autoTranslate === 'true' ? true : options.autoTranslate === 'false' ? false : undefined;
478
+ const autoTranslateReview = options.autoTranslateReview === 'true';
477
479
  const skipDelete = options.skipDelete === 'true';
478
480
  const deleteRemoteNamespace = options.deleteRemoteNamespace === 'true';
479
481
  const languageFolderPrefix = options.languageFolderPrefix || '';
@@ -497,6 +499,7 @@ program
497
499
  format: options.format,
498
500
  updateValues,
499
501
  autoTranslate,
502
+ autoTranslateReview,
500
503
  skipDelete,
501
504
  deleteRemoteNamespace,
502
505
  languageFolderPrefix,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "12.0.9",
3
+ "version": "12.1.0",
4
4
  "type": "commonjs"
5
5
  }
@@ -39,7 +39,7 @@ async function request (url, options) {
39
39
  }
40
40
 
41
41
  options.headers = options.headers || {};
42
- options.headers['User-Agent'] = `locize-cli/v12.0.9 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
42
+ options.headers['User-Agent'] = `locize-cli/v12.1.0 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
43
43
  options.headers['X-User-Agent'] = options.headers['User-Agent'];
44
44
  if (options.body || options.method !== 'get') options.headers['Content-Type'] = 'application/json';
45
45
  if (options.body) {
package/dist/cjs/sync.js CHANGED
@@ -426,9 +426,14 @@ async function update (opt, lng, ns, shouldOmit = false) {
426
426
 
427
427
  async function send (d, so) {
428
428
  const queryParams = new URLSearchParams();
429
- if (opt.autoTranslate && lng === opt.referenceLanguage) {
430
- /** @See https://www.locize.com/docs/api#optional-autotranslate */
429
+ if (opt.autoTranslate === true && lng === opt.referenceLanguage) {
430
+ /** @See https://www.locize.com/docs/integration/api/#update-or-remove-translations (Optional autotranslate) */
431
431
  queryParams.append('autotranslate', 'true');
432
+ } else if (opt.autoTranslate === false && lng === opt.referenceLanguage) {
433
+ queryParams.append('autotranslate', 'false');
434
+ }
435
+ if (opt.autoTranslateReview && lng === opt.referenceLanguage) {
436
+ queryParams.append('autotranslatereview', 'true');
432
437
  }
433
438
  if (so) {
434
439
  queryParams.append('omitstatsgeneration', 'true');
package/dist/esm/cli.js CHANGED
@@ -48,7 +48,7 @@ const program = new Command();
48
48
 
49
49
  program
50
50
  .description('The official locize CLI.')
51
- .version('12.0.9'); // This string is replaced with the actual version at build time by rollup
51
+ .version('12.1.0'); // This string is replaced with the actual version at build time by rollup
52
52
  // .option('-a, --api-endpoint <url>', `Specify the api-endpoint url that should be used (default: ${defaultApiEndpoint})`)
53
53
  // .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`);
54
54
 
@@ -416,6 +416,7 @@ program
416
416
  .option('--cf, --clean-local-files <true|false>', 'Removes all local files without removing any folder (default: false)', 'false')
417
417
  .option('-u, --update-values <true|false>', 'This will update values of existing translations. (default: false)', 'false')
418
418
  .option('--auto-translate <true|false>', 'This will trigger auto-translation of updated translations. (default: false)', 'false')
419
+ .option('--auto-translate-review <true|false>', 'When auto-translating, route results through the review workflow for languages that have review enabled. (default: false)', 'false')
419
420
  .option('-S, --skip-delete <true|false>', 'This will skip the removal of keys on locize. (default: false)', 'false')
420
421
  .option('-D, --delete-remote-namespace <true|false>', 'This will delete a complete namespace on locize, if a local file in reference language was deleted. (default: false)', 'false')
421
422
  .option('-m, --path-mask <mask>', 'This will define the folder and file structure; do not add a file extension (default: {{language}}/{{namespace}})', `{{language}}${path.sep}{{namespace}}`)
@@ -471,7 +472,8 @@ program
471
472
  const cleanLocalFiles = options.cleanLocalFiles === 'true';
472
473
  const dry = options.dry === 'true';
473
474
  const updateValues = options.updateValues === 'true';
474
- const autoTranslate = options.autoTranslate === 'true';
475
+ const autoTranslate = options.autoTranslate === 'true' ? true : options.autoTranslate === 'false' ? false : undefined;
476
+ const autoTranslateReview = options.autoTranslateReview === 'true';
475
477
  const skipDelete = options.skipDelete === 'true';
476
478
  const deleteRemoteNamespace = options.deleteRemoteNamespace === 'true';
477
479
  const languageFolderPrefix = options.languageFolderPrefix || '';
@@ -495,6 +497,7 @@ program
495
497
  format: options.format,
496
498
  updateValues,
497
499
  autoTranslate,
500
+ autoTranslateReview,
498
501
  skipDelete,
499
502
  deleteRemoteNamespace,
500
503
  languageFolderPrefix,
@@ -37,7 +37,7 @@ async function request (url, options) {
37
37
  }
38
38
 
39
39
  options.headers = options.headers || {};
40
- options.headers['User-Agent'] = `locize-cli/v12.0.9 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
40
+ options.headers['User-Agent'] = `locize-cli/v12.1.0 (node/${process.version}; ${process.platform} ${process.arch})`; // This string is replaced with the actual version at build time by rollup
41
41
  options.headers['X-User-Agent'] = options.headers['User-Agent'];
42
42
  if (options.body || options.method !== 'get') options.headers['Content-Type'] = 'application/json';
43
43
  if (options.body) {
package/dist/esm/sync.js CHANGED
@@ -424,9 +424,14 @@ async function update (opt, lng, ns, shouldOmit = false) {
424
424
 
425
425
  async function send (d, so) {
426
426
  const queryParams = new URLSearchParams();
427
- if (opt.autoTranslate && lng === opt.referenceLanguage) {
428
- /** @See https://www.locize.com/docs/api#optional-autotranslate */
427
+ if (opt.autoTranslate === true && lng === opt.referenceLanguage) {
428
+ /** @See https://www.locize.com/docs/integration/api/#update-or-remove-translations (Optional autotranslate) */
429
429
  queryParams.append('autotranslate', 'true');
430
+ } else if (opt.autoTranslate === false && lng === opt.referenceLanguage) {
431
+ queryParams.append('autotranslate', 'false');
432
+ }
433
+ if (opt.autoTranslateReview && lng === opt.referenceLanguage) {
434
+ queryParams.append('autotranslatereview', 'true');
430
435
  }
431
436
  if (so) {
432
437
  queryParams.append('omitstatsgeneration', 'true');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "12.0.9",
3
+ "version": "12.1.0",
4
4
  "description": "locize cli to import locales",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -30,8 +30,8 @@
30
30
  "cacheable-lookup": "6.1.0",
31
31
  "colors": "1.4.0",
32
32
  "commander": "14.0.3",
33
- "diff": "8.0.3",
34
- "dotenv": "17.3.1",
33
+ "diff": "8.0.4",
34
+ "dotenv": "17.4.2",
35
35
  "fast-csv": "5.0.5",
36
36
  "flat": "5.0.2",
37
37
  "fluent_conv": "3.3.0",
@@ -48,18 +48,18 @@
48
48
  "tmexchange": "2.0.6",
49
49
  "xliff": "6.3.0",
50
50
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
51
- "yaml": "2.8.2"
51
+ "yaml": "2.8.3"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@rollup/plugin-replace": "6.0.3",
55
55
  "@rollup/plugin-terser": "0.4.4",
56
- "@yao-pkg/pkg": "6.14.1",
56
+ "@yao-pkg/pkg": "6.14.2",
57
57
  "eslint": "9.39.2",
58
58
  "eslint-plugin-import": "2.32.0",
59
59
  "gh-release": "7.0.2",
60
60
  "neostandard": "0.13.0",
61
- "rollup": "4.59.0",
62
- "vitest": "4.0.18"
61
+ "rollup": "4.60.1",
62
+ "vitest": "4.1.4"
63
63
  },
64
64
  "scripts": {
65
65
  "lint": "eslint .",