Skip to content

Move locales dir #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

rffontenelle
Copy link
Contributor

@rffontenelle rffontenelle commented Mar 4, 2025

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/

@python-cla-bot

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant