Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conf.py: Add support for loading localized class reference
It will look up a potential `classes/<lang>` folder in the parent repository of https://github.com/godotengine/godot-docs-l10n and use it if provided. This folder includes a pre-translated copy of the class reference XML, read to be used by Sphinx. This turned out to be a simpler approach than generating PO files for class reference strings in reStructured Text format, given that their source format is XML and the conversion on a per `msgid` basis would be quite tricky. This approach is very hacky, as Sphinx doesn't seem to support any kind of conditional statements in its `toctree` directives, so we have to outright replace the content at build time. This should typically only be done on RTD so it shouldn't end up polluting the Git history.
- Loading branch information