sphinx-doc / sphinx-doc-translations

translated docs for sphinx official document
Other
21 stars 16 forks source link

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

Closed rffontenelle closed 2 months ago

rffontenelle commented 2 months ago

.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 commented 2 months ago

@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 commented 2 months ago

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

A

rffontenelle commented 2 months ago

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

A

rafaelff is my username in RTD.

rffontenelle commented 2 months ago

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