gt 2.10.0 → 2.10.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
@@ -1,5 +1,11 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1105](https://github.com/generaltranslation/gt/pull/1105) [`952a515`](https://github.com/generaltranslation/gt/commit/952a51528c298ad2466ca6cb73302eae06f56c45) Thanks [@brian-lou](https://github.com/brian-lou)! - Fix --force behavior
8
+
3
9
  ## 2.10.0
4
10
 
5
11
  ### Minor Changes
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.10.0";
1
+ export declare const PACKAGE_VERSION = "2.10.1";
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
- export const PACKAGE_VERSION = '2.10.0';
2
+ export const PACKAGE_VERSION = '2.10.1';
@@ -23,26 +23,30 @@ export class PollTranslationJobsStep extends WorkflowStep {
23
23
  filePropertiesMap.set(`${item.branchId}:${item.fileId}:${item.versionId}:${item.locale}`, item);
24
24
  });
25
25
  // Initial query to check which files already have translations
26
- const initialFileData = await this.gt.queryFileData({
27
- translatedFiles: fileQueryData.map((item) => ({
28
- fileId: item.fileId,
29
- versionId: item.versionId,
30
- branchId: item.branchId,
31
- locale: item.locale,
32
- })),
33
- });
34
- const existingTranslations = initialFileData.translatedFiles || [];
35
- // Mark all existing translations as completed
36
- existingTranslations.forEach((translation) => {
37
- if (!translation.completedAt) {
38
- return;
39
- }
40
- const fileKey = `${translation.branchId}:${translation.fileId}:${translation.versionId}:${translation.locale}`;
41
- const fileProperties = filePropertiesMap.get(fileKey);
42
- if (fileProperties) {
43
- fileTracker.completed.set(fileKey, fileProperties);
44
- }
45
- });
26
+ // Skip when force retranslation is enabled, since the server
27
+ // no longer marks force-retranslated files as incomplete
28
+ if (!forceRetranslation) {
29
+ const initialFileData = await this.gt.queryFileData({
30
+ translatedFiles: fileQueryData.map((item) => ({
31
+ fileId: item.fileId,
32
+ versionId: item.versionId,
33
+ branchId: item.branchId,
34
+ locale: item.locale,
35
+ })),
36
+ });
37
+ const existingTranslations = initialFileData.translatedFiles || [];
38
+ // Mark all existing translations as completed
39
+ existingTranslations.forEach((translation) => {
40
+ if (!translation.completedAt) {
41
+ return;
42
+ }
43
+ const fileKey = `${translation.branchId}:${translation.fileId}:${translation.versionId}:${translation.locale}`;
44
+ const fileProperties = filePropertiesMap.get(fileKey);
45
+ if (fileProperties) {
46
+ fileTracker.completed.set(fileKey, fileProperties);
47
+ }
48
+ });
49
+ }
46
50
  // Build a map of jobs for quick lookup:
47
51
  // branchId:fileId:versionId:locale -> job
48
52
  const jobMap = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [
@@ -110,9 +110,9 @@
110
110
  "unified": "^11.0.5",
111
111
  "unist-util-visit": "^5.0.0",
112
112
  "yaml": "^2.8.0",
113
- "@generaltranslation/python-extractor": "0.1.2",
114
113
  "generaltranslation": "8.1.16",
115
- "gt-remark": "1.0.5"
114
+ "gt-remark": "1.0.5",
115
+ "@generaltranslation/python-extractor": "0.1.2"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@babel/types": "^7.28.4",