Add a GH action to update the translation issues when .po files change - #789
Add a GH action to update the translation issues when .po files change#789flpm wants to merge 3 commits into
Conversation
| refresh: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 |
There was a problem hiding this comment.
| - uses: actions/setup-python@v5 | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
lwasser
left a comment
There was a problem hiding this comment.
@flpm this looks good to me but i have NOT tested it locally! my big ask is to pin the ci action steps I did a few of them from our other action :)
IN a separate PR can we please document this new process / infra for others as well? i'm excited to see it in action
| run: python -m pip install babel | ||
|
|
||
| - name: Collect the issues that track each language | ||
| uses: actions/github-script@v7 |
There was a problem hiding this comment.
can we please pin / harden this with a hash?
| fi | ||
|
|
||
| - name: Rewrite them | ||
| uses: actions/github-script@v7 |
There was a problem hiding this comment.
This as well please harden with a hash.
|
|
||
| - name: Report anything that needs a maintainer | ||
| if: steps.render.outputs.report == 'true' | ||
| uses: actions/github-script@v7 |
There was a problem hiding this comment.
One last one to harden - any others just grab the release commit and then dependabot will keep it current using a version specific hash
|
Good catch! I will pin the versions and check the other action already merged to make sure it's pinned. I plan to make some changes so I made it a draft for now. I will add the last script and the documentation the process here too before marking PR ready for review again. The overall goal is to make it simple to use and to understand/maintain. It will make more sense when I document the big picture. |
This is part 4 of the work to create scripts to help maintain translations and their GH issues.
1) Create a translation maintenance issue to track of translation maintenance work and subscribe to Slack #translations#7802) Create a GH action to monitor when the English source of the guide and post a comment on the translation maintenance issue#7813) Split the computation of translation stats from the Sphinx extension so scripts can use it#7864) Create a GH action to keep the translation issues used by contributors up to date when po files change
5) Create a script to create new issues when a new language (or a new .po file) is created
6) Create a simple
create-new-language.pyscript that maintainers can call to take all actions required to add a new language to the guide: creates the po files, adds the language to the list of languages, create the GH issues, etc.7) Document everything in TRANSLATING.md, in a section for maintainers, explaining how this all works and how to use it.
What was done
.pofiles change on main. Checks all locales.refresh_translation_issues.py, called by the actiontest_refresh_translation_issues.pyparent_issue_template.md- See an example of parent issue: Help translate the Python Packaging Guide into Greek #715child_issue_template.md- See an example of sub-issue: Translateindex.pointo Greek #752noxfile.pyso thetest-translation-scriptsaction works with the new testsHow to test
Run
nox -s test-translation-scriptsAI disclosure
Claude code help me to write this code, I reviewed everything the AI wrote and take full responsibility for how it works.