Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing heading in translated online class reference #85877

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Dec 7, 2023

The RST format has a quirk that requires the section header's marker to be at least the same visual length as the header's text. We can't use the text's length to generate markers because, for example, east Asian wide and fullwidth characters take twice the visual length.

Currently, the "Resources" section is missing in the index of zh_CN class reference:

ksnip_20231207-111049

Because the name becomes two characters after translation, but requires four =s.

资源
====

We made a dedicated make_heading() function that simply doubles the marker's length to solve this problem 😝

@timothyqiu timothyqiu added this to the 4.3 milestone Dec 7, 2023
@timothyqiu timothyqiu requested a review from a team as a code owner December 7, 2023 03:48
@akien-mga akien-mga added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Dec 7, 2023
@akien-mga akien-mga merged commit c52cf09 into godotengine:master Dec 7, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the classref-heading branch December 7, 2023 09:25
@akien-mga
Copy link
Member

Cherry-picked for 4.2.1.

@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants