ADR: translate adr-ko/ to Korean, fix ADR-0013 slug, refine Status check
Follow-up to the bilingual-structure commit: docs/adr-ko/ now holds only Korean versions (24 files translated from English placeholders), ADR-0013 slug uses kebab-case in both folders, and the verify tool allows translated parenthetical commentary in the Status block. - Translate 24 English files in docs/adr-ko/ to Korean. The previous bilingual-structure commit had left these as English copies because their source content was already English; this commit fulfills the policy that docs/adr-ko/ contains only Korean. - Rename ADR-0013 in both adr/ and adr-ko/ from ver-verification_strategy.md to ver-verification-strategy.md (kebab-case consistency with other ADRs). - CLAUDE.md (ADR Translation Discipline): clarify that only the Status lifecycle keyword (Accepted / Proposed / Stub / Draft / Superseded by ADR-NNNN / Merged into ADR-NNNN) must match across EN and KO; parenthetical commentary and trailing list items may be translated. - tools/verify_adr_lang_pairs.py: replace byte-equal Status check with normalize_status_keyword() which strips parenthetical commentary and takes only the first non-empty line. - tests/test_verify_adr_lang_pairs.py: update existing test names, add coverage for translated parenthetical, translated trailing list, and Superseded-by-NNNN keyword equality. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,35 @@ def test_status_mismatch_fails(tmp_path: Path) -> None:
|
||||
_make_adr(tmp_path / "docs/adr/ADR-0001-foo-bar.md", "0001", status="Accepted")
|
||||
_make_adr(tmp_path / "docs/adr-ko/ADR-0001-foo-bar.md", "0001", status="Proposed")
|
||||
errs = v.verify(tmp_path)
|
||||
assert any("Status block mismatch" in e for e in errs)
|
||||
assert any("Status keyword mismatch" in e for e in errs)
|
||||
|
||||
|
||||
def test_status_parenthetical_translation_passes(tmp_path: Path) -> None:
|
||||
"""Parenthetical commentary in Status may be translated; only the
|
||||
lifecycle keyword needs to match across EN/KO."""
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr/ADR-0001-foo-bar.md", "0001",
|
||||
status="Accepted (Revision 2 - concrete bit layout)",
|
||||
)
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr-ko/ADR-0001-foo-bar.md", "0001",
|
||||
status="Accepted (Revision 2 - 비트 레이아웃 확정)",
|
||||
)
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
def test_status_list_after_keyword_passes(tmp_path: Path) -> None:
|
||||
"""Trailing bullet list in Status may be translated; only first-line
|
||||
keyword is compared."""
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr/ADR-0011-foo-bar.md", "0011",
|
||||
status="Accepted.\n\n- VA model: implemented (default).",
|
||||
)
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr-ko/ADR-0011-foo-bar.md", "0011",
|
||||
status="Accepted.\n\n- VA 모델: 구현됨 (기본값).",
|
||||
)
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
def test_title_id_mismatch_fails(tmp_path: Path) -> None:
|
||||
@@ -77,6 +105,21 @@ def test_multiline_status_with_parenthetical_passes(tmp_path: Path) -> None:
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
def test_superseded_keyword_must_match(tmp_path: Path) -> None:
|
||||
"""Multi-word lifecycle keywords like 'Superseded by ADR-NNNN' must
|
||||
match in full (the ADR ref is part of the keyword)."""
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr/ADR-0001-foo-bar.md", "0001",
|
||||
status="Superseded by ADR-0031",
|
||||
)
|
||||
_make_adr(
|
||||
tmp_path / "docs/adr-ko/ADR-0001-foo-bar.md", "0001",
|
||||
status="Superseded by ADR-0099",
|
||||
)
|
||||
errs = v.verify(tmp_path)
|
||||
assert any("Status keyword mismatch" in e for e in errs)
|
||||
|
||||
|
||||
def test_crlf_normalization(tmp_path: Path) -> None:
|
||||
"""KO has CRLF, EN has LF; Status content is otherwise identical -> pass."""
|
||||
en = tmp_path / "docs/adr/ADR-0001-foo-bar.md"
|
||||
@@ -105,9 +148,10 @@ def test_em_dash_title_separator_recognized(tmp_path: Path) -> None:
|
||||
|
||||
|
||||
def test_underscore_in_slug_recognized(tmp_path: Path) -> None:
|
||||
"""ADR-0013 uses an underscore in its slug; the regex must accept it."""
|
||||
_make_adr(tmp_path / "docs/adr/ADR-0013-ver-verification_strategy.md", "0013")
|
||||
_make_adr(tmp_path / "docs/adr-ko/ADR-0013-ver-verification_strategy.md", "0013")
|
||||
"""Defensive: slug regex must accept underscores even though current
|
||||
ADRs use kebab-case (in case future ADRs reintroduce them)."""
|
||||
_make_adr(tmp_path / "docs/adr/ADR-0099-cat-foo_bar.md", "0099")
|
||||
_make_adr(tmp_path / "docs/adr-ko/ADR-0099-cat-foo_bar.md", "0099")
|
||||
assert v.verify(tmp_path) == []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user