We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My sphinx build complains:
xxx.rst:: WARNING: rST localisation for language "zh" not found.
There is no way to suppress this, because the type and subtype here are both none:
def is_suppressed_warning(type: str, subtype: str, suppress_warnings: List[str]) -> bool:
The warning comes from RstLanguageImporter in docutils (v0.17.1). There is a warning-suppresser in sphinx for LanguageImporter:
@contextmanager def patched_get_language() -> Generator[None, None, None]:
but the suppresser doesn't work for RstLanguageImporter.
I believe this is a bug. A simple fix can be patching RstLanguageImporter in patched_get_language as well.
RstLanguageImporter
patched_get_language
$ git clone https://github.com/microsoft/nni $ cd nni $ git checkout 04781745b9986076591f43b9b7a47dc8e5b6f3de $ pip install -r dependencies/develop.txt $ pip install -r dependencies/required.txt $ pip install -r dependencies/required_extra.txt $ pip install -r dependencies/recommended.txt $ cd docs $ make -e SPHINXOPTS="-W --keep-going -T -D language='zh'" html
The build should complete with no warning.
https://github.com/microsoft/nni/tree/04781745b9986076591f43b9b7a47dc8e5b6f3de/docs
https://msrasrg.visualstudio.com/NNIOpenSource/_build/results?buildId=32185&view=logs&j=c732a39c-9d2c-544b-001e-d0b8721ee1cc&t=978da1c7-9944-5976-065b-459f57f62524
Ubuntu
3.8
4.4.0
No response
Note that I have custom extensions to handle i18n.
The text was updated successfully, but these errors were encountered:
I figured a patch through extension here. This issue is resolved on my side.
PR: microsoft/nni#4522
https://github.com/microsoft/nni/blob/e1daf50ce3a61cf0e27d3dac45b4ca65e118fb6a/docs/extension/patch_docutils.py
Sorry, something went wrong.
Your patch looks nice. Could you send a PR for us?
Successfully merging a pull request may close this issue.
Describe the bug
My sphinx build complains:
There is no way to suppress this, because the type and subtype here are both none:
The warning comes from RstLanguageImporter in docutils (v0.17.1). There is a warning-suppresser in sphinx for LanguageImporter:
but the suppresser doesn't work for RstLanguageImporter.
I believe this is a bug. A simple fix can be patching
RstLanguageImporter
inpatched_get_language
as well.How to Reproduce
Expected behavior
The build should complete with no warning.
Your project
https://github.com/microsoft/nni/tree/04781745b9986076591f43b9b7a47dc8e5b6f3de/docs
Screenshots
https://msrasrg.visualstudio.com/NNIOpenSource/_build/results?buildId=32185&view=logs&j=c732a39c-9d2c-544b-001e-d0b8721ee1cc&t=978da1c7-9944-5976-065b-459f57f62524
OS
Ubuntu
Python version
3.8
Sphinx version
4.4.0
Sphinx extensions
No response
Extra tools
No response
Additional context
Note that I have custom extensions to handle i18n.
The text was updated successfully, but these errors were encountered: