Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

Apply suggestions from code review

zenobit89cb4bbb8cbc
diff --git a/package.json b/package.json
index 3a2bf902ea..1c3524a9ac 100644
--- a/package.json
+++ b/package.json
@@ -115,6 +115,7 @@
"uuid": "^13.0.0",
"wreq-js": "^2.0.1",
"yazl": "^3.3.1",
+ "js-yaml": "^4.1.0",
"zod": "^4.3.6",
"zustand": "^5.0.10"
},
diff --git a/scripts/i18n/generate-qa-checklist.mjs b/scripts/i18n/generate-qa-checklist.mjs
index 1d6cdaef25..749e1b2f76 100644
--- a/scripts/i18n/generate-qa-checklist.mjs
+++ b/scripts/i18n/generate-qa-checklist.mjs
@@ -209,9 +209,9 @@ async function runAutomatedChecks() {
let anchorLineRemoved = true;
let brAppendixRemoved = true;
- // Check RTL languages (ar, ja) for legacy content
- const rtlLanguages = ["ar", "ja"];
- for (const code of rtlLanguages) {
+ // Check specific languages (ar, ja) for legacy content
+ const legacyCheckLocales = ["ar", "ja"];
+ for (const code of legacyCheckLocales) {
const readmePath = path.join(I18N_README_DIR, code, "README.md");
try {
const content = await fs.readFile(readmePath, "utf8");
diff --git a/scripts/validate_translation.py b/scripts/validate_translation.py
index 985127a78d..a5920eeb0c 100755
--- a/scripts/validate_translation.py
+++ b/scripts/validate_translation.py
@@ -263,9 +263,11 @@ def find_placeholder_issues(source: Dict, trans: Dict) -> List[Tuple[str, str, s
# Only extract top-level placeholders: {name}, {count}, {day}, NOT {# X} inside ICU
import re
- # Match {name} but NOT {# inside ICU plural
- source_placeholders = set(re.findall(r'\{[a-zA-Z][^}]*\}', source_val))
- trans_placeholders = set(re.findall(r'\{[a-zA-Z][^}]*\}', trans_val))
+ # Extract variable names from placeholders (e.g., 'name' from '{name}' or 'count' from '{count, plural, ...}')
+ # This avoids false positives on ICU strings where the internal text is translated.
+ placeholder_regex = r'\{\s*([a-zA-Z][a-zA-Z0-9_]*)'
+ source_placeholders = set(re.findall(placeholder_regex, source_val))
+ trans_placeholders = set(re.findall(placeholder_regex, trans_val))
# Check for missing placeholders
missing = source_placeholders - trans_placeholders