Skip to content

Adjust nox config for building the translated site versions#974

Merged
webknjaz merged 2 commits intopypa:mainfrom
webknjaz:maintenance/localized-builds
Sep 2, 2021
Merged

Adjust nox config for building the translated site versions#974
webknjaz merged 2 commits intopypa:mainfrom
webknjaz:maintenance/localized-builds

Conversation

@webknjaz
Copy link
Copy Markdown
Member

@webknjaz webknjaz commented Sep 2, 2021

I was playing with building the localized sites on RTD and noticed that the *.po files are not being picked up. So I dug deeper and now realized that Sphinx looks for the locales/ dir relative to conf.py and fixed that.

Additionally, since there was no way to invoke nox locally for building the docs in other languages, I've adjusted the nox file to bypass any posargs to the underlying invocation of sphinx-build and now it's possible to do this. For example:

$ python -m nox -s build -- -D language=uk
nox > Running session build
nox > Creating virtual environment (virtualenv) using python3 in .nox/build
nox > python -m pip install -r requirements.txt
nox > sphinx-build --color --keep-going -j auto -b html -n -W -D language=uk source build
Running Sphinx v4.0.3
loading translations [uk]... done
...

@webknjaz webknjaz added type: bug A confirmed bug or unintended behavior type: enhancement A self-contained enhancement or new feature labels Sep 2, 2021
@webknjaz webknjaz enabled auto-merge September 2, 2021 14:38
@webknjaz webknjaz merged commit f6a4e8d into pypa:main Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A confirmed bug or unintended behavior type: enhancement A self-contained enhancement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants