locize-cli 7.8.0 → 7.8.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/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ 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
+ ## [7.8.1](https://github.com/locize/locize-cli/compare/v7.8.0...v7.8.1) - 2022-02-10
9
+
10
+ - sync: optimize handling if pathmask does not include namespace
11
+
12
+
8
13
  ## [7.8.0](https://github.com/locize/locize-cli/compare/v7.7.2...v7.8.0) - 2022-01-13
9
14
 
10
15
  - sync: introduce --delete-remote-namespace option
package/README.md CHANGED
@@ -91,7 +91,7 @@ locize download --project-id my-project-id-93e1-442a-ab35-24331fa294ba --ver lat
91
91
  By using the sync command, you can keep your existing code setup and synchronize the translations with locize.
92
92
  An example on how this could look like can be seen in [this tutorial](https://github.com/locize/react-tutorial#step-1---keep-existing-code-setup-but-synchronize-with-locize).
93
93
 
94
- **⚠️ Since the remote source are the published translations, make sure the desired version is set to standard publish mode, or alternatively [publish](#publish-version) that version before you execute the cli command. ⚠️**
94
+ **⚠️ Since the remote source are the published translations, make sure the desired version is set to standard/auto publish mode, or alternatively [publish](#publish-version) that version before you execute the cli command. ⚠️**
95
95
 
96
96
  ### Step 1: Go near to your translation files
97
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "7.8.0",
3
+ "version": "7.8.1",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@js.properties/properties": "0.5.4",
11
11
  "android-string-resource": "2.3.4",
12
- "async": "3.2.2",
12
+ "async": "3.2.3",
13
13
  "colors": "1.4.0",
14
14
  "commander": "7.2.0",
15
15
  "csvjson": "5.1.0",
@@ -23,18 +23,18 @@
23
23
  "laravelphp": "2.0.3",
24
24
  "lodash.clonedeep": "4.5.0",
25
25
  "mkdirp": "1.0.4",
26
- "node-fetch": "2.6.6",
26
+ "node-fetch": "2.6.7",
27
27
  "resx": "2.0.3",
28
28
  "rimraf": "3.0.2",
29
29
  "strings-file": "0.0.5",
30
30
  "tmexchange": "2.0.4",
31
- "xliff": "5.7.2",
32
- "xlsx": "0.17.4"
31
+ "xliff": "6.0.1",
32
+ "xlsx": "0.18.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "eslint": "7.32.0",
36
36
  "gh-release": "6.0.1",
37
- "pkg": "5.5.1"
37
+ "pkg": "5.5.2"
38
38
  },
39
39
  "scripts": {
40
40
  "lint": "eslint .",
@@ -20,6 +20,7 @@ const getDirectories = (srcpath) => {
20
20
  };
21
21
 
22
22
  const parseLocalLanguage = (opt, lng, cb) => {
23
+ const hasNamespaceInPath = opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`) > -1;
23
24
  const filledLngMask = opt.pathMask.replace(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`, lng);
24
25
  var firstPartLngMask, lastPartLngMask;
25
26
  if (opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`) > opt.pathMask.indexOf(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`)) {
@@ -114,6 +115,8 @@ const parseLocalLanguage = (opt, lng, cb) => {
114
115
  } else {
115
116
  namespace = dirPath.substring(filledNsMask.indexOf(nsMask));
116
117
  }
118
+ } else if (!hasNamespaceInPath && startNsIndex < 0) {
119
+ namespace = opt.namespace;
117
120
  }
118
121
  var fPath = path.join(opt.path, lngPath || '', file);
119
122
  if (dirPath && lngPath.indexOf(nsMask) > -1) {