locize-cli 9.1.3 → 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 CHANGED
@@ -5,6 +5,10 @@ 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
+
8
12
  ## [9.1.3](https://github.com/locize/locize-cli/compare/v9.1.2...v9.1.3) - 2025-05-22
9
13
 
10
14
  - mentioning comma separated ns argument
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "9.1.3",
3
+ "version": "9.1.4",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {