]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔨 Tweak translation workflow and translation fixer tool (#15166)
authorMotov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Thu, 19 Mar 2026 17:37:41 +0000 (18:37 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2026 17:37:41 +0000 (18:37 +0100)
scripts/doc_parsing_utils.py
scripts/translate.py

index 1cd2299e66933d1a4f767c58db7bf590cdcfdf66..88ff2c50bdd375579d2b23f96d1a0f6a1284f8a8 100644 (file)
@@ -17,7 +17,7 @@ MARKDOWN_LINK_RE = re.compile(
     r"(?P<url>[^)\s]+)"  # url (no spaces and `)`)
     r'(?:\s+["\'](?P<title>.*?)["\'])?'  # optional title in "" or ''
     r"\)"
-    r"(?:\s*\{(?P<attrs>[^}]*)\})?"  # optional attributes in {}
+    r"(?:\{(?P<attrs>[^}]*)\})?"  # optional attributes in {}
 )
 
 HTML_LINK_RE = re.compile(r"<a\s+[^>]*>.*?</a>")
index ddcfa311d66ce5a7358eee81cb820fbb45862962..1bfa92f8878577d402b16cc96f1a67584866454e 100644 (file)
@@ -142,7 +142,6 @@ def translate_page(
             continue  # Retry if not reached max attempts
     else:  # Max retry attempts reached
         print(f"Translation failed for {out_path} after {MAX_ATTEMPTS} attempts")
-        raise typer.Exit(code=1)
 
     print(f"Saving translation to {out_path}")
     out_path.write_text(out_content, encoding="utf-8", newline="\n")