Skip to content

i18n(ja): align heading anchors with the English source#23325

Draft
yahonda wants to merge 1 commit into
pingcap:i18n-ja-release-8.5from
yahonda:i18n-ja-fix-heading-anchors
Draft

i18n(ja): align heading anchors with the English source#23325
yahonda wants to merge 1 commit into
pingcap:i18n-ja-release-8.5from
yahonda:i18n-ja-fix-heading-anchors

Conversation

@yahonda

@yahonda yahonda commented Jul 21, 2026

Copy link
Copy Markdown
Member

What is changed, added or deleted? (Required)

Anchor links across the ja docs do not resolve. The translation pipeline rewrote heading anchors into a hyphenated scheme, while the links kept pointing at the anchor the English heading generates:

EN   : ### SET_VAR(VAR_NAME=VAR_VALUE)                        -> #set_varvar_namevar_value
JA   : ### SET_VAR(変数名=変数値) {#set-var-var-name-var-value}
link : optimizer-hints.md#set_varvar_namevar_value            -> resolves to nothing

That one heading alone is the target of 499 links.

This PR re-derives each anchor from the English heading and pins it on the Japanese heading. Heading text is not touched — only the {#…} part.

928 lines across 123 files.

unresolved anchor links
i18n-ja-release-8.5 as it stands 1,965
with the other open ja PRs applied 581
with this PR as well 4

The drop from 1,965 to 581 is mostly a side effect of #23295, which removed the rewritten anchors from system-variables.md so the headings fall back to their English-derived form.

How it was checked

  • Anchors were computed with the site's own rules, including the duplicate-suffix rule: `->` and `->>` both reduce to -, so the second becomes --1. Getting this wrong silently collapses two distinct headings onto one anchor — an earlier draft of this change did exactly that, which is why the numbers above differ from a naive count.
  • Slashes count as separators (Leaders/regionsleaders-regions), matching the anchors the ja file already had.
  • Heading counts were confirmed to match between the ja and en file before mapping positionally; the one file where they differ (statistics.md, 4 links) was skipped.
  • Zero links are newly broken by this change, verified by diffing the full set of unresolved links before and after.

What is left

4 links still do not resolve, each needing its target heading looked at individually (statistics.md#control-analyze-concurrency, manage-user-access.md#remove-a-project-member, backup-and-restore-serverless.md#perform-the-restore). They are listed in the PR discussion.

19 headings in the base carry a duplicated {#a} {#a} anchor. That is pre-existing and untouched here.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot

ti-chi-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef7fd76c-f4fa-47dd-b261-71db363b22e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kissmydb for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added area/develop This PR relates to the area of TiDB App development. missing-translation-status This PR does not have translation status info. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 21, 2026
@yahonda
yahonda force-pushed the i18n-ja-fix-heading-anchors branch from 002072c to 135d6dd Compare July 21, 2026 09:06
The translation pipeline rewrote heading anchors into its own scheme while the links
kept pointing at the anchor the English heading produces, so those links resolve to
nothing:

  EN   : ### SET_VAR(VAR_NAME=VAR_VALUE)              -> #set_varvar_namevar_value
  JA   : ### SET_VAR(変数名=変数値) {#set-var-var-name-var-value}
  link : optimizer-hints.md#set_varvar_namevar_value  -> dead

Re-derive each anchor from the English heading and pin it on the Japanese heading.
Heading text is untouched. Three ja-internal links that pointed at the old ja anchors
are updated to match.

928 lines across 123 files. Unresolved anchor links drop from 581 to 3, none newly broken.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yahonda
yahonda force-pushed the i18n-ja-fix-heading-anchors branch from 135d6dd to abc4167 Compare July 21, 2026 09:07
@qiancai qiancai added translation/no-need No need to translate this PR. and removed missing-translation-status This PR does not have translation status info. labels Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/develop This PR relates to the area of TiDB App development. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. translation/no-need No need to translate this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants