sphinx-doc/sphinx

Allow overrideable, multiple language sources (not translations files) and build localised outputs

Open

#7,618 创建于 2020年5月5日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Python (1,985 fork)batch import
help wantedinternals:internationalisationtype:enhancement

仓库指标

Star
 (5,625 star)
PR 合并指标
 (平均合并 10天 11小时) (30 天内合并 11 个 PR)

描述

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'

贡献者指南