Regenerate the README language tables when Weblate's translations land #1044
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1044
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
README.mdand.github/README.mdcarry a language table written byscripts/readme_languages.py(and copied byscripts/github_readme.py). It lists every language with a translated tagline, so it changes whenever Weblate translates or edits that string, or a language crosses the line into the table.tests/test_readme.py::test_the_language_table_is_current(andtest_the_github_readme_is_current) then fail on the Weblate pull request, and someone has to regenerate both files by hand and push to theweblatebranch. That does not stick: Weblate rebases its branch ontomainbefore pushing, and drops the hand-made commit. It happened twice on #1041 (6f2e55f26and8fcfe3868were dropped;473b17669is the third copy).What we want
The tables are brought up to date without anyone running the scripts, and a Weblate PR is not red only because of them.
Constraints
mainrequires signed commits. Forgejo signs its own merge and squash commits, and Weblate signs its own, but a commit made by a CI job is unsigned. If that commit reachesmainthrough a merge commit (the way Weblate PRs are merged), the merge is refused.Options
mainruns both scripts. If anything changed, it opens a PR from a bot branch, which is squash-merged and so signed by Forgejo. The two README tests are skipped on PRs whose head isweblate(or turned into a warning there), so Weblate PRs stay green.pull_requestfromweblatecommits the regenerated files to the branch. This needs a signing key as a CI secret, and still loses the commit when Weblate next rebases. Not recommended.Option 1 looks like the smallest change that works with how Weblate already behaves.
wiki_site.py stale --strictor builds the translated pages, so a moved English source is noticed only by hand #1147