Skip to content

Add zh-HK translations so heading references use Traditional Chinese - #8765

Closed
BetterAndBetterII wants to merge 3 commits into
typst:mainfrom
BetterAndBetterII:cursor/heading-ref-zh-hk-9669
Closed

BetterAndBetterII wants to merge 3 commits into
typst:mainfrom
BetterAndBetterII:cursor/heading-ref-zh-hk-9669

Conversation

@BetterAndBetterII

Copy link
Copy Markdown

Heading references with lang: \"zh\", region: \"HK\" fell back to the zh bundle (Simplified 小节) because there was no zh-HK translation file.

Add zh-HK.txt (Traditional forms, including heading = 小節) and register it in TRANSLATIONS.

Fixes #8756

zh-HK was falling back to Simplified zh, so heading supplements
became 小节 instead of 小節.

Co-authored-by: Yuzhong Zhang <[email protected]>
@cady-b

cady-b commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Hi, thank you for taking the time to look into this!

I see that Cursor Agent is attributed as a primary author. Could you please state to what extent it was used and if you've reviewed the changes? That would help maintainers judge if they do or do not wish to accept this (once they get around to it) given the statements on AI in the contribution guidelines.

I did see by your profile that you're definitely well versed in the language you're contributing to, which is great for localization work :)

@BetterAndBetterII

Copy link
Copy Markdown
Author

Yeah, I went through it. It's a small change — just the zh-HK translations and a couple of tests. Looks good to me.

@BetterAndBetterII

BetterAndBetterII commented Aug 20, 2026 •

Copy link
Copy Markdown
Author
image

Also compiled this branch locally. With lang: zh, region: CN the heading ref is 小节; with region: HK it's 小節.

Comment thread crates/typst-library/src/text/lang.rs Resolved
@saecki saecki added the i18n About language- or script-specific features. May need attention from native speakers. label Aug 24, 2026
@laurmaedje laurmaedje added the waiting-on-review This PR is waiting to be reviewed. label Aug 26, 2026
@laurmaedje

Copy link
Copy Markdown
Member

With the co-authorship and even the later one-sentence messages showing signs of AI, I'm not certain enough this was actually carefully checked by a human. I can't prove it either way, but given the commit attribution and our general policy, I will close this.

I'm open for a new PR from someone else without AI attribution (even with the same changes1) where I have more more confidence that I'm interacting with a human.

Footnotes

  1. I don't think the changes reach the threshold of originality anyway. ↩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n About language- or script-specific features. May need attention from native speakers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heading references uses incorrect language and region

6 participants