gtx-cli 1.2.10 → 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.
@@ -71,7 +71,8 @@ async function translateFiles(filePaths, placeholderPaths, transformPaths, dataF
71
71
  return;
72
72
  }
73
73
  if (options.dryRun) {
74
- (0, console_1.logSuccess)('Dry run: No files were sent to General Translation.');
74
+ const fileNames = allFiles.map((file) => `- ${file.fileName}`).join('\n');
75
+ (0, console_1.logSuccess)(`Dry run: No files were sent to General Translation. Found files:\n${fileNames}`);
75
76
  return;
76
77
  }
77
78
  // Validate required settings are present
@@ -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 alias = importAliases[typeName ?? ''];
99
+ const componentType = importAliases[typeName ?? ''];
100
100
  // If this JSXElement is one of the recognized variable components,
101
- const elementIsVariable = VARIABLE_COMPONENTS.includes(alias);
101
+ const elementIsVariable = VARIABLE_COMPONENTS.includes(componentType);
102
102
  const props = {};
103
- const elementIsPlural = alias === 'Plural';
104
- const elementIsBranch = alias === 'Branch';
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: typeName,
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: typeName,
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.10",
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"