sphinx-doc/sphinx

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

Open

#7.618 geöffnet am 5. Mai 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Python (1.985 Forks)batch import
help wantedinternals:internationalisationtype:enhancement

Repository-Metriken

Stars
 (5.625 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 11h) (11 gemergte PRs in 30 T)

Beschreibung

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