quarto-dev / quarto-dev/quarto-cli
`lang: zh-Hant` falls back to Simplified UI strings instead of Traditional
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Quarto's subtag-prefix resolution splits lang on - and loads most-general-first:
For lang: zh-Hant this loads _language-zh.yml (Simplified) and then looks for _language-zh-Hant.yml (doesn't exist). Result: Traditional-script readers get Simplified UI strings — wrong script.
Quarto's _language-zh-TW.yml is Traditional in script but uses Taiwan-specific vocabulary (added deliberately in #6512 — OpenCC script conversion followed by manual region-specific corrections). A generic zh-Hant file does not exist.
Design question
How should lang: zh-Hant resolve?
- (a) Fallback rule: if
_language-zh-Hant.ymldoesn't exist, try_language-zh-TW.yml. Taiwan vocabulary is closer to HK/MO than Simplified is, and this matches Pandoc's posture of shipping one genericzh-Hantfile. Could be documented as best-effort until a proper generic file exists. - (b) Wait for a contributed generic
_language-zh-Hant.yml. - (c) Add
_language-zh-Hant.ymlas a copy of the TW file. Behaviorally equivalent to (a) but less honest about regional scope.
Repro
---
lang: zh-Hant
format: html
---
Inspect generated UI strings (TOC title, "Copy to clipboard" tooltip, section titles in HTML article). They render in Simplified Chinese.
From quarto-dev/quarto-cli#14409. Related: #14416.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/core/language.ts at the subtag-prefix resolution described in the issue, then inspect _language-zh.yml and _language-zh-TW.yml. Reproduce the lang: zh-Hant example and compare the generated UI strings. Done means the selected resolution behavior is agreed, documented, and the repro renders Traditional Chinese strings without regressing existing locale behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- internationalization, localization
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100