FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Test translations for reST syntax errors by rffontenelle · Pull Request #1431 · pypa/packaging.python.org · GitHub

Repository navigation

Test translations for reST syntax errors - #1431

Merged
webknjaz merged 4 commits into
pypa:mainfrom
rffontenelle:patch-1
Dec 22, 2023
Merged

webknjaz merged 4 commits into
pypa:mainfrom
rffontenelle:patch-1

Conversation

rffontenelle commented Dec 3, 2023 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

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/

Comment thread .github/workflows/test-translations.yml Resolved

Copy link
Copy Markdown
Contributor Author

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.

webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

webknjaz added this pull request to the merge queue Dec 22, 2023

Copy link
Copy Markdown
Member

@rffontenelle I wonder if using GHA matchers could surface the errors in the PR UI. This could be interesting to explore..

Merged via the queue into pypa:main with commit f34c6d1 Dec 22, 2023
rffontenelle deleted the patch-1 branch December 22, 2023 19:38

Copy link
Copy Markdown
Contributor Author

@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.

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor Author

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?

Copy link
Copy Markdown
Member

They are on the summary page: https://github.com/rffontenelle/packaging.python.org/actions/runs/7304303724

Copy link
Copy Markdown
Member

I think they don't show up in the PR because they're mapped to rst files that are unchanged.

Copy link
Copy Markdown
Member

It'd be nice to add the matcher to other Sphinx jobs too.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

Changes proposed in #1469

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL