docs: fix broken API reference links in zh/ja/ko translations - #4734
docs: fix broken API reference links in zh/ja/ko translations#4734Tym216 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc000a469a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ``` | ||
|
|
||
| コールバックの全機能については、[Lifecycle API リファレンス](ref/lifecycle.md)を参照してください。 | ||
| コールバックの全機能については、[Lifecycle API リファレンス](../ref/lifecycle.md)を参照してください。 |
There was a problem hiding this comment.
Make the link correction in the translation generator
When any corresponding English page is retranslated, translate_docs.py recreates this generated file from the English source, whose URL remains ref/lifecycle.md, and the translation prompt explicitly preserves link URLs; this will therefore overwrite the added prefix and reintroduce the broken link. Implement the relative-link adjustment in the translation pipeline and regenerate the localized pages rather than editing generated translations directly.
AGENTS.md reference: AGENTS.md:L178-L179
Useful? React with 👍 / 👎.
|
This could only happen with preview on github.com; the live document site doesn't have the issue at all. |
Summary
Fix 27 broken relative links in the translated docs (
docs/zh,docs/ja,docs/ko).The API reference pages live under
docs/ref/(English only). From a page underdocs/{zh,ja,ko}/, the currentref/...links resolve to a non-existentdocs/{zh,ja,ko}/ref/path, which 404s on the published site (for example,docs/zh/testing.md→ref/testing.mdresolves to/zh/ref/testing.md).This PR adds the missing
../prefix so the links resolve to the shared English reference pages (../ref/...).Test plan
docs/ref/(e.g.ref/testing.md,ref/mcp/manager.md,ref/extensions/experimental/codex/*.md)](ref/links underdocs/zh,docs/ja,docs/koIssue number
N/A
Checks
.agents/skills/code-change-verification/scripts/run.sh(skipped: docs-only change)/reviewbefore submitting this PR