sphinx-doc / sphinx-doc/sphinx
Allow overrideable, multiple language sources (not translations files) and build localised outputs
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.
Sphinx's current translation/localisation mechanism is not very user-friendly (to technical writers, not to programmers who are likely to be writing source materials)
Describe the solution you'd like
Allow multiple lanugage source directories to be created, with the default language specified in the conf.py being the 'master' language.
When running a build, user could specify an output language (which would be in source_fr or intl/fr/source) to create the sources from instead of the default.
The key process would be that the default sources are built, replacing any documents in the default language which has a replacement specified in the alternative language with the source from source_fr (or whatever)
Describe alternatives you've considered
Hugo handles this very well, but only handles static web pages. I chose Sphinx because it uses reStructuredText and because web pages aren't the only target, but miss this feature of Hugo.
Additional context
Obviously this is no small task and would be a fundamental change to the current mechanism. Also, labels etc would still need to be in the 'default' language for the inter-linking to work (meaning the french version would still have to have to define a label called _contents like the english version would, but the heading would contain 'Contenu'
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 by examining Sphinx's current translation/localisation mechanism and how conf.py defines the default language. Trace how builds select source documents and how labels and inter-links are handled. Done means supporting overrideable language source directories such as source_fr or intl/fr/source, selecting an output language, and preserving cross-language labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, localization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100