Repository navigation
Test translations for reST syntax errors - #1431
Conversation
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
The po file name used for sphinx-lint was wrong, probably due to a copy and paste error between my tests and the actual pull request. Fixed along with jeanas suggestion. |
|
@rffontenelle I wonder if using GHA matchers could surface the errors in the PR UI. This could be interesting to explore.. |
|
@webknjaz Seems feasible. Each job could store Sphinx warning logs and upload as artifact, then another job could use download-artifacts to download multiple logs (if present) and handle the content to print a comment in the pull request using e.g. thollander/actions-comment-pull-request. I'll work on that when possible. |
|
That sounds unnecessarily complicated. I was thinking of https://github.com/sphinx-doc/github-problem-matcher / https://github.com/actions/toolkit/blob/main/docs%2Fproblem-matchers.md |
|
I thought you wanted something in the PR history/comments, but I see now what you mean. In my test rffontenelle#3, I didn't get those fancy boxes as shown in the github-problem-matcher README, but I've got annotations in the job output. See the workflow run below. Does this help? |
|
They are on the summary page: https://github.com/rffontenelle/packaging.python.org/actions/runs/7304303724 |
|
I think they don't show up in the PR because they're mapped to rst files that are unchanged. |
|
It'd be nice to add the matcher to other Sphinx jobs too. |
|
Agreed. I'm looking for a problem matcher for sphinx-lint. It might need to be created, but I'd rather avoid reinventing the wheel. |
|
Changes proposed in #1469 |

This workflow is intended for a centralized and easy to find point of syntax errors in translation files.
Currently, one can only find syntax errors by browsing the logs in Read The Docs, and each language is its own separated rtd project. I doubt anyone will do that, except for me.
Translation file update triggers in both push and pull request events. E.g. When Weblate files a pull request with new translations.
Examples of runs:
📚 Documentation preview 📚: https://python-packaging-user-guide--1431.org.readthedocs.build/en/1431/