locize-cli 9.0.0 → 9.0.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,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.0.1](https://github.com/locize/locize-cli/compare/v9.0.0...v9.0.1) - 2025-04-04
9
+
10
+ - optimize xcstrings format [106](https://github.com/locize/locize-cli/issues/106)
11
+
8
12
  ## [9.0.0](https://github.com/locize/locize-cli/compare/v8.7.1...v9.0.0) - 2025-04-03
9
13
 
10
14
  - the format `yaml-rails-ns`/`yml-rails-ns` is the old `yaml-rails`/`yml-rails`
package/download.js CHANGED
@@ -79,8 +79,7 @@ function handleDownload(opt, url, err, res, downloads, cb) {
79
79
  if (err) return clb(err);
80
80
 
81
81
  try {
82
- const result = locize2xcstrings(locizeData);
83
- const converted = JSON.stringify(result, null, 2);
82
+ const converted = locize2xcstrings(locizeData);
84
83
 
85
84
  var filledMask = opt.pathMask.replace(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`, '').replace(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`, ns) + reversedFileExtensionsMap[opt.format];
86
85
  var mkdirPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "ini": "4.1.3",
24
24
  "js-yaml": "4.1.0",
25
25
  "laravelphp": "2.0.4",
26
- "locize-xcstrings": "1.0.0",
26
+ "locize-xcstrings": "2.0.0",
27
27
  "lodash.clonedeep": "4.5.0",
28
28
  "mkdirp": "3.0.1",
29
29
  "node-fetch": "2.7.0",
@@ -141,7 +141,7 @@ const parseLocalLanguage = (opt, lng, cb) => {
141
141
 
142
142
  if (opt.format === 'xcstrings') { // 1 file per namespace including all languages
143
143
  try {
144
- const content = xcstrings2locize(JSON.parse(data));
144
+ const content = xcstrings2locize(data);
145
145
 
146
146
  fs.stat(fPath, (err, stat) => {
147
147
  if (err) return clb(err);
package/sync.js CHANGED
@@ -258,8 +258,7 @@ const downloadAll = (opt, remoteLanguages, omitRef, manipulate, cb) => {
258
258
  if (err) return clb(err);
259
259
 
260
260
  try {
261
- const result = locize2xcstrings(locizeData);
262
- const converted = JSON.stringify(result, null, 2);
261
+ const converted = locize2xcstrings(locizeData);
263
262
 
264
263
  const filledMask = opt.pathMask.replace(`${opt.pathMaskInterpolationPrefix}language${opt.pathMaskInterpolationSuffix}`, '').replace(`${opt.pathMaskInterpolationPrefix}namespace${opt.pathMaskInterpolationSuffix}`, namespace) + reversedFileExtensionsMap[opt.format];
265
264
  if (opt.dry) return clb(null);