sphinx-doc / sphinx-doc/sphinx
VersionChange directives (changeset) do not allow translating punctuations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
The VersionChange directives (versionadded, versionchanged, deprecated) use hardcoded punctuations formatting '%s: ' % text and '%s.' % text, which ends up looking weird in Chinese and Japanese where full-width colon ":" and fullstop "。" are usually expected.
Describe the solution you'd like
These punctuations should be made translatable in some way.
Describe alternatives you've considered
n/a
Additional context
- [e.g. URL or Ticket]
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 sphinx/domains/changeset.py around line 88, where the VersionChange directives format their punctuation. Inspect how Sphinx makes directive text translatable, then apply that approach to the punctuation used by versionadded, versionchanged, and deprecated. Done means Chinese and Japanese translations can use full-width punctuation without changing the default formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, internationalization, localization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100