Skip to content
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

pt_BR and zh_CN: Documentation is built in English because RTD is unable to find PO files #35

Closed
rffontenelle opened this issue Apr 24, 2024 · 4 comments · Fixed by #37

Comments

@rffontenelle
Copy link
Collaborator

rffontenelle commented Apr 24, 2024

.readthedocs.yml sets -D language=$READTHEDOCS_LANGUAGE and the environment variable $READTHEDOCS_LANGUAGE in Read The Docs gives pt-br and zh-cn (all lowercase, dash instead of underscore). This causes the docs build to not find the translation files (since there is a pt_BR/ directory, not a pt-br/).

One solution is to map the language codes so that pt_BR in Transifex is downloaded as pt-br, etc. Another solution is to convert pt_BR -> pt-br when running in readthedocs

@rffontenelle
Copy link
Collaborator Author

@AA-Turner Could you please configure pull request builds in sphinx-pt-br project at Read the Docs? I would like to test mapping language & renaming directory pt_BR to pt-br in a pull request, and I this preview build would be very handy

@AA-Turner
Copy link
Member

I tried to add you but rffontenelle isn't a user on RTD.

A

@rffontenelle
Copy link
Collaborator Author

I tried to add you but rffontenelle isn't a user on RTD.

A

rafaelff is my username in RTD.

@rffontenelle
Copy link
Collaborator Author

https://blog.readthedocs.com/language-codes-are-now-normalized/

The following language codes are now normalized to be lowercase and use a dash as a separator instead of an underscore:
pt_BR is now pt-br
zh_CN is now zh-cn

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 a pull request may close this issue.

2 participants