El martes, 10 de octubre de 2023 21:23:10 (CST) Maren Hachmann escribió:
Readthedocs has some documentation about how it works with their website here: https://docs.readthedocs.io/en/stable/guides/manage-translations-sphinx.html
Probably you've already seen that, though?
Maren
I have, yeah. However the paths are different from the ReadTheDocs tutorials, and I think I've got it: First of all, we need to add the locale_dirs variable to source/conf.py:
locale_dirs = ["../locale"]
The command to generate gettext files and generate a new language is:
make gettext sphinx-intl update -p build/gettext -l <LANGUAGE_CODE> and the command to generate translated html documents is:
sphinx-build -b html -D language=zh_TW source/ build/html/zh_TW
I think we could also modify the makefile to take e.g. "make translations" and run the command above, but that may be for another day.
Is it OK to create a merge request with these modifications for review?
Cheers, ltlnx