locize-cli 9.1.2 → 9.1.4
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 +8 -0
- package/bin/locize +2 -2
- package/download.js +8 -2
- package/package.json +1 -1
- package/sync.js +1 -1
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.4](https://github.com/locize/locize-cli/compare/v9.1.3...v9.1.4) - 2025-06-30
|
|
9
|
+
|
|
10
|
+
- download: fix issue with reversed pathMask in combination with no languageFolderPrefix
|
|
11
|
+
|
|
12
|
+
## [9.1.3](https://github.com/locize/locize-cli/compare/v9.1.2...v9.1.3) - 2025-05-22
|
|
13
|
+
|
|
14
|
+
- mentioning comma separated ns argument
|
|
15
|
+
|
|
8
16
|
## [9.1.2](https://github.com/locize/locize-cli/compare/v9.1.1...v9.1.2) - 2025-05-12
|
|
9
17
|
|
|
10
18
|
- sync: wait a bit longer to download from remote if auto-translate option is passed
|
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/download.js
CHANGED
|
@@ -157,7 +157,10 @@ function handleDownload(opt, url, err, res, downloads, cb) {
|
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
if (filledMask.indexOf(path.sep) > 0) filledMask = filledMask.replace(opt.languageFolderPrefix + language, '');
|
|
160
|
+
if (opt.languageFolderPrefix && filledMask.indexOf(path.sep) > 0) filledMask = filledMask.replace(opt.languageFolderPrefix + language, '');
|
|
161
|
+
// if (opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`) > opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`) && filledMask.lastIndexOf(path.sep) > 0) {
|
|
162
|
+
// mkdirp.sync(path.join(opt.path, filledMask.substring(0, filledMask.lastIndexOf(path.sep))));
|
|
163
|
+
// }
|
|
161
164
|
const parentDir = path.dirname(path.join(opt.path, filledMask));
|
|
162
165
|
mkdirp.sync(parentDir);
|
|
163
166
|
fs.writeFile(path.join(opt.path, filledMask), fileContent, clb);
|
|
@@ -283,7 +286,10 @@ function handlePull(opt, toDownload, cb) {
|
|
|
283
286
|
return;
|
|
284
287
|
}
|
|
285
288
|
|
|
286
|
-
if (filledMask.indexOf(path.sep) > 0) filledMask = filledMask.replace(opt.languageFolderPrefix + lng, '');
|
|
289
|
+
if (opt.languageFolderPrefix && filledMask.indexOf(path.sep) > 0) filledMask = filledMask.replace(opt.languageFolderPrefix + lng, '');
|
|
290
|
+
// if (opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`) > opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`) && filledMask.lastIndexOf(path.sep) > 0) {
|
|
291
|
+
// mkdirp.sync(path.join(opt.path, filledMask.substring(0, filledMask.lastIndexOf(path.sep))));
|
|
292
|
+
// }
|
|
287
293
|
const parentDir = path.dirname(path.join(opt.path, filledMask));
|
|
288
294
|
mkdirp.sync(parentDir);
|
|
289
295
|
fs.writeFile(path.join(opt.path, filledMask), fileContent, clb);
|
package/package.json
CHANGED
package/sync.js
CHANGED
|
@@ -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
|
}
|