Closed rffontenelle closed 5 months ago
https://readthedocs.org/api/v2/build/24311043.txt
loading translations [pt-br]... WARNING: reading error: /home/docs/checkouts/readthedocs.org/user_builds/sphinx-pt-br/checkouts/38/locale/pt-br/LC_MESSAGES/sphinx.po, expected only letters, got 'pt-br'
@AA-Turner Would you like to review this? Asking just to know if I wait or merge
This greatly improves the CI workflow of sphinx-doc-translations, by simplify some statements in CI workflow, removing obsolete PO files and removing obsolete Transifex resources.
Notable changes to
main.yml
:generate_templates.sh
(POT and .tx/config generation) andupdates.sh
(tx push and tx pull). This was required for the cleanup of POT and Transifex resources.²locale/lock-translations.py
added to find obsolete resources in Transifex, lock for 3 days (time to a manual check) and then remove the resource if it still locked.³update
New workflow file
test-translations.yml
5:Footnotes:
¹ Example of issue: In pull requests, changes to updates.sh in the branch would not be used because
git checkout master
was changing the current branch during the workflow run, effectively making the workflow use updates.sh from master branch.² locking resources needed POT and .tx/config generated, but not the translations pulled. So splitting seemed to be the best alternative. Other alternative was to set up another GHA job in same file and duplicate lines of statements checkout, dependencies installation, etc.
³ Fixes #40
4 Fixes #42
5 Fixes #41