mirror of
https://github.com/Comfy-Org/embedded-docs.git
synced 2026-11-05 00:17:31 +00:00
[PR #190] [MERGED] fix: catch technical-translation preambles under the H1 #187
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/embedded-docs#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/embedded-docs/pull/190
Author: @comfyui-wiki
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @comfyui-wiki
Base:
main← Head:cursor/ja-preamble-detector-8c7c📝 Commits (4)
050bef9fix: catch technical-translation preambles under the H1184b7bbfix: keep ordinary translation descriptions under the H19543f57fix: require affirmative translation-preamble claimse92a057fix: end 以下是…译文 at a sentence boundary📊 Changes
3 files changed (+279 additions, -8 deletions)
View changed files
📝
comfyui_embedded_docs/docs/MagnificImageRelightNode/zh-TW.md(+0 -2)📝
docs-generation/scripts/fix_translation_preamble.py(+21 -6)➕
docs-generation/tests/test_translation_preamble.py(+258 -0)📄 Description
Summary
PR #189 removed this Japanese lead from
SAM3_TrackToMask/ja.md:strip_leakmissed it.PREAMBLE_SENTENCES["ja"]only matched以下が日本語訳at line start (^). On that line the clause comes after。, and the opener isこれは…技術翻訳です, which no pattern covered. The same gap exists for the Chinese and Korean "this is a technical translation of the ComfyUI node docs" shape.PREAMBLE_SENTENCESnow also matches, still only as a strong marker directly under the H1:これは…技術翻訳at the start of a sentence (a followingではありません/じゃないdoes not count),技術翻訳です。, and以下が日本語訳after。as well as at line start这是/本文是…技术翻译and這是/本文是…技術翻譯, plus a sentence that ends on以下是…翻译/译文(and the Traditional Chinese equivalent, including以下是繁體中文翻譯結果:)기술 번역입니다,이것은/이 문서는…기술 번역, and다음은 한국어 번역after a periodAn overview that only mentions translation or docs, a negated "this is not a technical translation", or the same sentence later in the body is left in place.
Extra leak of the same class
A full-tree
strip_leakscan found one published page with this shape. It is removed in this PR:comfyui_embedded_docs/docs/MagnificImageRelightNode/zh-TW.mdopened with以下是繁體中文翻譯結果:No other
技術翻訳/技术翻译/技術翻譯/기술 번역hits remain in published docs. Those phrases still appear in the translator prompt templates.Verification
python3 -m unittest docs-generation.tests.test_translation_preamble docs-generation.tests.test_language_inventorystrip_leakreturned removed count4.--check-onlyon that file exited1. A second pass removed nothing.check_doc_structure.py --changed-onlyandcheck_md_format.py --changed-onlyagainstorigin/mainboth passed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.