From 9960db5abf10bb2e27483ce4b8913e33457a7d40 Mon Sep 17 00:00:00 2001 From: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> Date: Thu, 19 Mar 2026 18:37:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Tweak=20translation=20workflow?= =?UTF-8?q?=20and=20translation=20fixer=20tool=20(#15166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/doc_parsing_utils.py | 2 +- scripts/translate.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/doc_parsing_utils.py b/scripts/doc_parsing_utils.py index 1cd2299e66..88ff2c50bd 100644 --- a/scripts/doc_parsing_utils.py +++ b/scripts/doc_parsing_utils.py @@ -17,7 +17,7 @@ MARKDOWN_LINK_RE = re.compile( r"(?P[^)\s]+)" # url (no spaces and `)`) r'(?:\s+["\'](?P.*?)["\'])?' # 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>") diff --git a/scripts/translate.py b/scripts/translate.py index ddcfa311d6..1bfa92f887 100644 --- a/scripts/translate.py +++ b/scripts/translate.py @@ -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")