Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/translations-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ jobs:
upload_translations: false

download_translations: false
- name: crowdin-action
uses: crowdin/[email protected]
Comment on lines +35 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: YAML syntax error prevents workflow execution.

The indentation is incorrect, causing a YAML parsing error. The new step is nested too deeply (14 spaces) when it should be at the job step level (4 spaces).

Additionally, this appears to duplicate the existing crowdin/github-action step at line 22, but with a different version (v1.15.2 vs 1.5.1).

Apply this diff to fix the syntax error:

-              - name: crowdin-action
-                uses: crowdin/[email protected]
+    - name: crowdin-action
+      uses: crowdin/[email protected]

However, please clarify:

  1. Is this step intended to replace the existing step at line 22, or run as a separate step?
  2. If separate, what configuration should this step use (missing with: block)?
  3. Should the version be upgraded for both steps?

🏁 Script executed:

#!/bin/bash
echo "Showing lines 1-60 of the workflow file:"
sed -n '1,60p' .github/workflows/translations-upload.yml | nl -ba
echo
echo "Occurrences of crowdin/github-action:"
rg -n "crowdin/github-action" .github/workflows/translations-upload.yml

Length of output: 218


Correct YAML indentation and clarify duplicate step

The crowdin-action step at lines 35–36 is over-indented (should be at 4 spaces, not 14). Apply:

-              - name: crowdin-action
-                uses: crowdin/[email protected]
+    - name: crowdin-action
+      uses: crowdin/[email protected]

Please clarify:
• Replace the existing step at line 22 or run both?
• If separate, what with: configuration is needed?
• Should both steps use the same version?

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: crowdin-action
uses: crowdin/[email protected]
- name: crowdin-action
uses: crowdin/[email protected]
🧰 Tools
🪛 actionlint (1.7.7)

35-35: could not parse as YAML: yaml: line 35: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 35-35: syntax error: mapping values are not allowed here

(syntax)

🤖 Prompt for AI Agents
In .github/workflows/translations-upload.yml around lines 35–36, the
crowdin-action step is over-indented and appears duplicated; fix the indentation
to align with other steps (4 spaces), then remove or consolidate the duplicate
instead of keeping both: either replace the existing step at line 22 with this
corrected one or merge their responsibilities into a single step. If you must
keep two distinct steps, give each a unique name and provide a full with:
configuration (at minimum Crowdin token/auth, project_id, and files/globs or
upload pattern) for each step so they do different work, and ensure both
reference the same action version (or explicitly state why versions differ).
Ensure the step names, indentation, and with: keys match the repository’s other
workflow conventions.


16 changes: 16 additions & 0 deletions web_configurator_crossconfigurator2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import PresetsRepoIndexed from "./PresetsRepoIndexed";

export default class PresetsWebsiteRepo extends PresetsRepoIndexed {
constructor(url, official, name) {
let correctUrl = url.trim();

if (!correctUrl.endsWith("/")) {
correctUrl += "/";
}

const urlRaw = correctUrl;
const urlViewOnline = correctUrl;

super(urlRaw, urlViewOnline, official, name);
}
}
Comment on lines +1 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: Inconsistent indentation and questionable file placement.

This file has multiple issues:

  1. Indentation: Mixed tabs and spaces with excessive indentation throughout (ESLint flags 7 violations). This will fail linting checks.

  2. File location: The file is at the repository root, but similar files (e.g., PresetsRepoIndexed.js) are in src/tabs/presets/. This is inconsistent with the project structure.

  3. File naming: The name web_configurator_crossconfigurator2.js is unusual - the "2" suffix suggests a duplicate or test file, and "crossconfigurator" appears redundant.

  4. PR scope: This file has no relation to translation updates (the stated PR objective).

Apply this diff to fix indentation:

 import PresetsRepoIndexed from "./PresetsRepoIndexed";
 
-export default class PresetsWebsiteRepo extends PresetsRepoIndexed { 
-	       constructor(url, official, name) {
-		            let correctUrl = url.trim();
-
-                    if (!correctUrl.endsWith("/")) { 
-                    	    correctUrl += "/";
-                    }
-                    
-                    const urlRaw = correctUrl;
-                    const urlViewOnline = correctUrl;
-                    
-                    super(urlRaw, urlViewOnline, official, name);
-            }
- }
+export default class PresetsWebsiteRepo extends PresetsRepoIndexed {
+    constructor(url, official, name) {
+        let correctUrl = url.trim();
+
+        if (!correctUrl.endsWith("/")) {
+            correctUrl += "/";
+        }
+
+        const urlRaw = correctUrl;
+        const urlViewOnline = correctUrl;
+
+        super(urlRaw, urlViewOnline, official, name);
+    }
+}

Please clarify:

  1. Is this file intended for this PR, or was it included accidentally?
  2. What is the correct location and name for this file?
  3. Should the import path be updated once the file is moved?

🏁 Script executed:

#!/bin/bash
set -e
# Find PresetsRepoIndexed definition and its file path
rg -nP "class\s+PresetsRepoIndexed" -C2 --glob "*.js"
# Locate the file web_configurator_crossconfigurator2.js
fd web_configurator_crossconfigurator2.js

Length of output: 512


Relocate, rename and fix import/indentation for PresetsWebsiteRepo

  • Move web_configurator_crossconfigurator2.js into src/tabs/presets/PresetsWebsiteRepo/PresetsWebsiteRepo.js (removing the _crossconfigurator2 suffix).
  • Update the import to point at the actual class location.
  • Apply consistent 4-space indentation (spaces only) as per ESLint.
  • Confirm whether this file is intended for this PR (it’s unrelated to translation updates).
-import PresetsRepoIndexed from "./PresetsRepoIndexed";
+import PresetsRepoIndexed from "../PresetsRepoIndexed/PresetsRepoIndexed";
 
-export default class PresetsWebsiteRepo extends PresetsRepoIndexed { 
-    constructor(url, official, name) {
-        let correctUrl = url.trim();
-
-        if (!correctUrl.endsWith("/")) {
-            correctUrl += "/";
-        }
-
-        const urlRaw = correctUrl;
-        const urlViewOnline = correctUrl;
-
-        super(urlRaw, urlViewOnline, official, name);
-    }
-}
+export default class PresetsWebsiteRepo extends PresetsRepoIndexed {
+    constructor(url, official, name) {
+        let correctUrl = url.trim();
+
+        if (!correctUrl.endsWith("/")) {
+            correctUrl += "/";
+        }
+
+        const urlRaw = correctUrl;
+        const urlViewOnline = correctUrl;
+
+        super(urlRaw, urlViewOnline, official, name);
+    }
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import PresetsRepoIndexed from "./PresetsRepoIndexed";
export default class PresetsWebsiteRepo extends PresetsRepoIndexed {
constructor(url, official, name) {
let correctUrl = url.trim();
if (!correctUrl.endsWith("/")) {
correctUrl += "/";
}
const urlRaw = correctUrl;
const urlViewOnline = correctUrl;
super(urlRaw, urlViewOnline, official, name);
}
}
import PresetsRepoIndexed from "../PresetsRepoIndexed/PresetsRepoIndexed";
export default class PresetsWebsiteRepo extends PresetsRepoIndexed {
constructor(url, official, name) {
let correctUrl = url.trim();
if (!correctUrl.endsWith("/")) {
correctUrl += "/";
}
const urlRaw = correctUrl;
const urlViewOnline = correctUrl;
super(urlRaw, urlViewOnline, official, name);
}
}
🧰 Tools
🪛 ESLint

[error] 7-7: Expected indentation of 8 spaces but found 20.

(indent)


[error] 9-9: Expected indentation of 8 spaces but found 20.

(indent)


[error] 11-11: Expected indentation of 8 spaces but found 20.

(indent)


[error] 12-12: Expected indentation of 8 spaces but found 20.

(indent)


[error] 14-14: Expected indentation of 8 spaces but found 20.

(indent)


[error] 15-15: Expected indentation of 4 spaces but found 12.

(indent)


[error] 16-16: Expected indentation of 0 spaces but found 1.

(indent)

🤖 Prompt for AI Agents
In web_configurator_crossconfigurator2.js (lines 1-16): move and rename the file
to src/tabs/presets/PresetsWebsiteRepo/PresetsWebsiteRepo.js, update the top
import to the correct relative path for PresetsRepoIndexed from the new
location, change the file and default export to PresetsWebsiteRepo (remove the
_crossconfigurator2 suffix), reformat the entire file to use 4-space indentation
(spaces only) and fix inconsistent indentation inside the constructor, and
update any modules that import this file to use the new path/name; finally
confirm with the PR author whether this file belongs in this translation-related
PR and remove it from the PR if it’s unrelated.