python-docs-theme
python-docs-theme copied to clipboard
Move locales dir
Locales directory needs to be inside the package directory to be installed, so changing the script to place translation files inside seems the best choice. I also added Brazilian Portuguese translation to use as tests.
However, I wasn't able to see the translated theme, so I'm placing this as draft and asking for help.
I tried:
1- building the binary translation file (msgfmt path/to/file.po -o path/to/file.mo); and then
2- building the doc:
git clone https://github.com/python/docsbuild-scripts
python ./docsbuild-scripts/build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group "$(id -g)" --skip-cache-invalidation --theme "$(pwd)" --language pt-br --branch 3.13
I even can see the binary translation file installed:
$ find build_root -name messages.mo
build_root/venv-3.13/lib/python3.13/site-packages/python_docs_theme/locales/pt_BR/LC_MESSAGES/messages.mo
📚 Documentation preview 📚: https://python-docs-theme-previews--224.org.readthedocs.build/