gtx-cli 2.0.13 → 2.0.15
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 +12 -0
- package/dist/formats/json/mergeJson.js +5 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#510](https://github.com/generaltranslation/gt/pull/510) [`e69c23b`](https://github.com/generaltranslation/gt/commit/e69c23bb55062e91804f52379e231626573df30f) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - fix: backwards compatability
|
|
8
|
+
|
|
9
|
+
## 2.0.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#508](https://github.com/generaltranslation/gt/pull/508) [`5375e2c`](https://github.com/generaltranslation/gt/commit/5375e2c1b17fba3ca52291e7d79f8d78a585ed49) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add zh-Hans and zh-Hant
|
|
14
|
+
|
|
3
15
|
## 2.0.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -30,7 +30,9 @@ export function mergeJson(originalContent, filePath, options, targets, defaultLo
|
|
|
30
30
|
continue;
|
|
31
31
|
JSONPointer.set(mergedJson, jsonPointer, translatedValue);
|
|
32
32
|
}
|
|
33
|
-
catch
|
|
33
|
+
catch {
|
|
34
|
+
/* empty */
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
output.push(JSON.stringify(mergedJson, null, 2));
|
|
36
38
|
}
|
|
@@ -57,8 +59,8 @@ export function mergeJson(originalContent, filePath, options, targets, defaultLo
|
|
|
57
59
|
// Get source item for default locale
|
|
58
60
|
const matchingDefaultLocaleItems = findMatchingItemArray(defaultLocale, sourceObjectOptions, sourceObjectPointer, sourceObjectValue);
|
|
59
61
|
if (!Object.keys(matchingDefaultLocaleItems).length) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
logWarning(`Matching sourceItems not found at path: ${sourceObjectPointer}. Please check your JSON file includes the key field. Skipping this target`);
|
|
63
|
+
continue;
|
|
62
64
|
}
|
|
63
65
|
const matchingDefaultLocaleItemKeys = new Set(Object.keys(matchingDefaultLocaleItems));
|
|
64
66
|
// For each target:
|