翻译

To begin translating this documentation into other languages, please start by referring to the 开发 guide, which will help you set up a suitable development environment. Afterward, navigate to the docs folder using the following command:

cd docs

生成 .pot 文件

Before creating translations in your desired languages, you need to generate the source .pot files. This can be accomplished using the following command:

sphinx-build -b gettext . _build/gettext

更新语言包

下一步,使用 sphinx-intl 这个工具来生成你需要的语言的 .po 文件:

sphinx-intl update -p _build/gettext -l de

在这个例子中,我们使用语言代码 de 代表德语。

更新翻译文件

Following the previous command, the .po files will be generated within the locales/de/LC_MESSAGES directory. You can now edit these files to add the German translations accordingly.