Fix: repair 139 broken relative links across the nine translations - #72
Merged
Conversation
A user reported one broken link in a translated document. A repo-wide scan found 139. Every translated document lives in docs/i18n/, two directories below the English source it was translated from, and the relative paths were carried over verbatim, so each resolved two levels too shallow: 54 ](docs/X.md) in all 9 README.<lang>.md 81 ](../X) in all 9 getting_started.<lang>.md 4 ](i18n/X.pt-BR.md) stray prefix Same defect class as the License badge repaired earlier, which was fixed as a single symptom rather than generalised. Links now follow the reader: a document that has a translation points at the translated sibling, code/spec/example paths point at the repo root via ../../, and releasing.md keeps pointing at English because it is deliberately untranslated. Independent per-language review then caught three things a path scan cannot see, one of them introduced by this repair: - Retargeting left the visible text reading "docs/sessions.md" while the target became sessions.<lang>.md -- a working link with a lying label, in all 9 files. Text agrees with target again, as in English. - README.ru.md had a CommonMark bug unique to Russian: --- sat directly under a paragraph, making it a setext H2 underline rather than a rule. - Four stale one-language index blocks sent readers to the Portuguese document and asserted the translation itself was authoritative, contradicting line 1 of the same file. Removed. Measured: 139 broken before, 0 broken across 296 links after. All 8 external URLs return 200; all 9 translated READMEs retain their 3 badges. Left open deliberately: 34 of 36 translated files carry no language index, so a reader on a translated page cannot reach a sibling language. That is a convention decision across 36 files, not a broken link. CHG-0075, accepted, documentation kind, no spec change.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A user reported one broken link in a translated document. A repo-wide scan found 139.
Every translated document lives in
docs/i18n/, two directories below the English source it was translated from. The relative paths were carried over verbatim, so each resolved two levels too shallow:](docs/X.md)in all 9README.<lang>.mddocs/i18n/docs/X.md](../X)in all 9getting_started.<lang>.mddocs/Xinstead of the repo root](i18n/X.pt-BR.md)in 4 filesdocs/i18n/i18n/X.pt-BR.mdSame defect class as the License badge repaired earlier, which was fixed as a single symptom rather than generalised.
Repair policy
Links follow the reader rather than being mechanically re-rooted:
../../releasing.mdโ English, because it is deliberately untranslated as an internal maintainer docThree defects a path scan cannot see
Independent per-language review ran after the path repair, which is how it caught one this repair introduced:
[docs/sessions.md](docs/sessions.md)has text equal to target. Retargeting left the visible text readingdocs/sessions.mdwhile the target becamesessions.<lang>.mdโ a working link with a lying label, in all 9 files.README.ru.mdhad a CommonMark bug unique to Russian โ---sat directly under a paragraph with no blank line, making it a setext H2 underline rather than a horizontal rule. The paragraph rendered as a giant heading and the section rule vanished.pty_architecture.{ar,es,zh-CN}.md,sessions.fr.md) listed 1 of 9 languages, sent readers to the Portuguese document, and asserted the translation itself was authoritative โ contradicting line 1 of the same file. The path repair had turned these into working links to the wrong place.Measured
&needed separate handlingThe checker recomputes GitHub heading slugs and was validated against two known-working English anchors before being trusted against Arabic, Devanagari, CJK and Cyrillic headings โ a slug function wrong about non-ASCII would silently report every translated anchor as broken.
Left open deliberately
34 of 36 translated files carry no language index at all. Only the four English sources have the 9-language block, so a reader on a translated page cannot reach a sibling language. Two independent reviewers flagged it. That is a convention decision across 36 files, not a broken link, so it is not folded into a repair.
Untranslated link text also remains in
README.hi.md(7 labels) andREADME.ru.md(4), where every target is correct โ translation completeness, not link breakage.Test Plan
specsync change verifypassed (4 commands)specsync check: lifecycle valid, 32/32 file coverage, 7440/7440 LOC coverageCHG-0075, accepted,
documentationkind, no spec change.๐ค Generated with Claude Code
https://claude.ai/code/session_018rf59AtQmJcodUJ6vXDZNY