gtx-cli 1.2.11 → 1.2.12
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.
|
@@ -96,12 +96,12 @@ function buildJSXTree(importAliases, node, unwrappedExpressions, updates, errors
|
|
|
96
96
|
typeName = null;
|
|
97
97
|
}
|
|
98
98
|
// Convert from alias to original name
|
|
99
|
-
const
|
|
99
|
+
const componentType = importAliases[typeName ?? ''];
|
|
100
100
|
// If this JSXElement is one of the recognized variable components,
|
|
101
|
-
const elementIsVariable = VARIABLE_COMPONENTS.includes(
|
|
101
|
+
const elementIsVariable = VARIABLE_COMPONENTS.includes(componentType);
|
|
102
102
|
const props = {};
|
|
103
|
-
const elementIsPlural =
|
|
104
|
-
const elementIsBranch =
|
|
103
|
+
const elementIsPlural = componentType === 'Plural';
|
|
104
|
+
const elementIsBranch = componentType === 'Branch';
|
|
105
105
|
element.openingElement.attributes.forEach((attr) => {
|
|
106
106
|
if (t.isJSXAttribute(attr)) {
|
|
107
107
|
const attrName = attr.name.name;
|
|
@@ -128,7 +128,7 @@ function buildJSXTree(importAliases, node, unwrappedExpressions, updates, errors
|
|
|
128
128
|
if (elementIsVariable) {
|
|
129
129
|
parseJSXElement(importAliases, element, updates, errors, file);
|
|
130
130
|
return {
|
|
131
|
-
type:
|
|
131
|
+
type: componentType,
|
|
132
132
|
props,
|
|
133
133
|
};
|
|
134
134
|
}
|
|
@@ -142,7 +142,7 @@ function buildJSXTree(importAliases, node, unwrappedExpressions, updates, errors
|
|
|
142
142
|
props.children = children;
|
|
143
143
|
}
|
|
144
144
|
return {
|
|
145
|
-
type:
|
|
145
|
+
type: componentType,
|
|
146
146
|
props,
|
|
147
147
|
};
|
|
148
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtx-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": "dist/main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"localization",
|
|
54
54
|
"cli"
|
|
55
55
|
],
|
|
56
|
-
"author": "",
|
|
56
|
+
"author": "General Translation, Inc.",
|
|
57
57
|
"license": "FSL-1.1-ALv2",
|
|
58
58
|
"bugs": {
|
|
59
59
|
"url": "https://github.com/generaltranslation/gt/issues"
|