Skip to content

fix(links): repair the broken links on the Japanese site - #4739

Open
thetaPC wants to merge 1 commit into
translation/jpfrom
broken-links-jp
Open

thetaPC wants to merge 1 commit into
translation/jpfrom
broken-links-jp

Conversation

@thetaPC

@thetaPC thetaPC commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

The Japanese site renders 152 broken links, and none of them are visible from this branch. It builds as a single locale at /docs/, so the defect only appears once this content is consumed as the ja locale of the main site, where the baseUrl is /docs/ja/.

That is the cause: links hardcode the /docs baseUrl, so Docusaurus prepends the locale's own and the prefix doubles into /docs/ja/docs/theming/basics.

What is the new behavior?

0 broken links. 129 link fixes across 41 files.

Rather than re-deriving the rules, I extracted the old to new mapping from main's own diff in #4736, 97 distinct rewrites, and applied it here. Two of them map the same source to different targets depending on context, /docs/components becoming /components in a JSX href but /components.mdx in a markdown link, so they are applied context-aware.

That covered 123. The remaining 6 have no counterpart on main:

  • react.mdx is jp-only, and its "Add Ionic to Existing React App" card pointed at a page renamed upstream long ago. The page here is react/add-to-existing.mdx.
  • troubleshooting/build.mdx pointed at /docs/faq/runtime#provider-, a page that does not exist.
  • api/app.mdx linked ./リップルエフェクト, which does not exist. The page is api/ripple-effect.mdx.
  • api/item.mdx had href="useBaseUrl('api/modal')" quoted where it needed braces.

Does this introduce a breaking change?

  • Yes
  • No

Other information

145 broken anchors are left in place on purpose, and 103 of them are a single heading: ### 仮想プロパティ needs {/* #virtual-properties */}. Main's English heading carries no pinned id, so this branch mirrors main until we settle whether headings should carry explicit ids. The other 42 are the same class, translated headings whose slugs cannot match the English anchor.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Sep 16, 2026 10:27pm UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review September 16, 2026 22:34
@thetaPC
thetaPC requested a review from a team as a code owner September 16, 2026 22:34
@thetaPC
thetaPC requested review from OS-jacobbell and removed request for a team September 16, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant