locize-cli 9.1.1 → 9.1.3

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,14 @@ 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
+ ## [9.1.3](https://github.com/locize/locize-cli/compare/v9.1.2...v9.1.3) - 2025-05-22
9
+
10
+ - mentioning comma separated ns argument
11
+
12
+ ## [9.1.2](https://github.com/locize/locize-cli/compare/v9.1.1...v9.1.2) - 2025-05-12
13
+
14
+ - sync: wait a bit longer to download from remote if auto-translate option is passed
15
+
8
16
  ## [9.1.1](https://github.com/locize/locize-cli/compare/v9.1.0...v9.1.1) - 2025-05-08
9
17
 
10
18
  - xlsx: fix for longer namespace names
package/bin/locize CHANGED
@@ -377,7 +377,7 @@ program
377
377
  .option('-t, --compare-modification-time <true|false>', 'while comparing the namespace content between local and remote, take the modification time of the local file and the last modified time of the remote namespace into account. (default: false)', 'false')
378
378
  .option('-l, --language <lng>', 'The language that should be targeted')
379
379
  .option('-ls, --languages <lng1,lng2>', 'The languages that should be targeted')
380
- .option('-n, --namespace <ns>', 'The namespace that should be targeted')
380
+ .option('-n, --namespace <ns>', 'The namespace that should be targeted (you can also pass a comma separated list)')
381
381
  .option('-g, --get-path <url>', `Specify the get-path url that should be used (default: ${getPathUrl})`)
382
382
  .option('-up, --unpublished <true|false>', 'Downloads the current (unpublished) translations. This will generate private download costs (default: false)', 'false')
383
383
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
@@ -479,7 +479,7 @@ program
479
479
  .option('-d, --dry <true|false>', 'Dry run (default: false)', 'false')
480
480
  .option('-R, --reference-language-only <true|false>', 'Check for changes in reference language only. (default: true)', 'true')
481
481
  .option('-l, --language <lng>', 'The language that should be targeted')
482
- .option('-n, --namespace <ns>', 'The namespace that should be targeted')
482
+ .option('-n, --namespace <ns>', 'The namespace that should be targeted (you can also pass a comma separated list)')
483
483
  .option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
484
484
  .action((options) => {
485
485
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {
package/sync.js CHANGED
@@ -527,7 +527,7 @@ const handleSync = (opt, remoteLanguages, localNamespaces, cb) => {
527
527
  });
528
528
  const shouldOmit = lngsInReqs.length > 5 || nsInReqs.length > 5;
529
529
 
530
- var wasThereSomethingToUpdate = false;
530
+ var wasThereSomethingToUpdate = opt.autoTranslate || false;
531
531
 
532
532
  function updateComparedNamespaces() {
533
533
  const now = new Date();
@@ -607,7 +607,7 @@ const handleSync = (opt, remoteLanguages, localNamespaces, cb) => {
607
607
  if (!cb) console.log(colors.green('FINISHED'));
608
608
  if (cb) cb(null);
609
609
  });
610
- }, wasThereSomethingToUpdate && !opt.dry ? 5000 : 0);
610
+ }, wasThereSomethingToUpdate && !opt.dry ? (opt.autoTranslate ? 10000 : 5000) : 0);
611
611
  }
612
612
 
613
613
  if (!shouldOmit) return down();
@@ -681,7 +681,7 @@ const sync = (opt, cb) => {
681
681
  }
682
682
  if (!opt.dry) mkdirp.sync(opt.path);
683
683
 
684
- if (opt.namespace && opt.namespace.indexOf(',') > 0) {
684
+ if (opt.namespace && opt.namespace.indexOf(',') > 0 && opt.namespace.indexOf(' ') < 0) {
685
685
  opt.namespaces = opt.namespace.split(',');
686
686
  delete opt.namespace;
687
687
  }