Write the languages each release selects once, and hold every release gate to them #1038

Merged
tiagoagueda merged 3 commits from 347-selected-languages into main 2026-10-23 19:22:20 +00:00
Owner

Closes #347

What changed

  • One list of the languages each release selects (point 1): SELECTED in src/postulo/core/messages_tool.py, by release line, so 0.5.0 and every 0.5.x share one. It is a plain literal, so scripts/release_tools.py, which imports nothing, can read it too.
    • 0.4: the 39 the core carried filled when the decision was taken (#269).
    • 0.5: 0.4's 39, plus fr-CA, en-CA, es-MX, be, cnr, fo, nn, rm, az, kk, zh-Hans, zh-Hant and ar, 52 in all (decided 2026-10-23).
    • selected(version=None) returns a version's list; with no version it uses the core's own, which is what a plugin pinned beside it wants. A line with no list is refused rather than guessed.
  • The release gate reads it (point 3).
    • tests/test_translations.py's release test, now test_every_selected_language_is_complete, holds every catalogue set to selected() instead of the fixed EUROPEAN_UNION tuple, which is gone.
    • scripts/messages.py gate --release [X.Y.Z] gates exactly those languages.
    • scripts/release_tools.py check refuses a tag whose line has no list.
  • New checks on every commit, in tests/test_translations.py:
    • every listed language is known and has a catalogue in every set;
    • a later line keeps every language of the one before;
    • the version in the checkout has a list, so a version bump to a new line without one fails at once;
    • a patch or pre-release version maps to its line;
    • gate --release reads the list.
  • CONTRIBUTING.md (Making a release): step 1 now runs gate --release X.Y.Z, which works before the version is bumped, and names the one list. docs/TRANSLATING.md gives the concrete 0.4 and 0.5 lists and the rule that a later line keeps the earlier one's languages.

Points 2 (the development gate, gate fr-FR pt-PT on Weblate's pull request, adapted to #706) and 4 (every language scaffolded, 84 catalogues) were already on main, as was point 5's description in TRANSLATING.md.

Where the translations stand

The code is the subject here, not the translations. On today's main, gate --release 0.4.0 names 2,052 empty strings and gate --release 0.5.0 names 3,296, across the selected languages. They are to be translated in Weblate before 0.5.0 is tagged; machine drafting is off for now.

Tests

  • tests/test_translations.py, tests/test_release_tools.py, tests/test_changelog.py, the handbook, message-tool and language tests: 592 passed, 28 skipped.
  • ruff clean.

Library check

None needed.

🤖 Generated with Claude Code

Closes #347 ## What changed - **One list of the languages each release selects** (point 1): `SELECTED` in `src/postulo/core/messages_tool.py`, by release line, so 0.5.0 and every 0.5.x share one. It is a plain literal, so `scripts/release_tools.py`, which imports nothing, can read it too. - **0.4**: the 39 the core carried filled when the decision was taken (#269). - **0.5**: 0.4's 39, plus fr-CA, en-CA, es-MX, be, cnr, fo, nn, rm, az, kk, zh-Hans, zh-Hant and ar, 52 in all (decided 2026-10-23). - `selected(version=None)` returns a version's list; with no version it uses the core's own, which is what a plugin pinned beside it wants. A line with no list is refused rather than guessed. - **The release gate reads it** (point 3). - `tests/test_translations.py`'s release test, now `test_every_selected_language_is_complete`, holds every catalogue set to `selected()` instead of the fixed `EUROPEAN_UNION` tuple, which is gone. - `scripts/messages.py gate --release [X.Y.Z]` gates exactly those languages. - `scripts/release_tools.py check` refuses a tag whose line has no list. - **New checks on every commit**, in `tests/test_translations.py`: - every listed language is known and has a catalogue in every set; - a later line keeps every language of the one before; - the version in the checkout has a list, so a version bump to a new line without one fails at once; - a patch or pre-release version maps to its line; - `gate --release` reads the list. - **`CONTRIBUTING.md`** (*Making a release*): step 1 now runs `gate --release X.Y.Z`, which works before the version is bumped, and names the one list. **`docs/TRANSLATING.md`** gives the concrete 0.4 and 0.5 lists and the rule that a later line keeps the earlier one's languages. Points 2 (the development gate, `gate fr-FR pt-PT` on Weblate's pull request, adapted to #706) and 4 (every language scaffolded, 84 catalogues) were already on `main`, as was point 5's description in TRANSLATING.md. ## Where the translations stand The code is the subject here, not the translations. On today's `main`, `gate --release 0.4.0` names 2,052 empty strings and `gate --release 0.5.0` names 3,296, across the selected languages. They are to be translated in Weblate before 0.5.0 is tagged; machine drafting is off for now. ## Tests - `tests/test_translations.py`, `tests/test_release_tools.py`, `tests/test_changelog.py`, the handbook, message-tool and language tests: 592 passed, 28 skipped. - `ruff` clean. ## Library check None needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Write the languages each release selects once, and hold every release gate to them
Some checks failed
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m30s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m41s
Every Python / Unit tests (Python 3.12) (push) Successful in 14m21s
CI / Security audit (pull_request) Failing after 1m13s
Every Python / Unit tests (Python 3.13) (push) Successful in 14m16s
CI / Browser tests (Chromium) (pull_request) Successful in 30m19s
CI / Database tests on PostgreSQL (pull_request) Failing after 2m34s
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m56s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m30s
CI / Database tests on PostgreSQL (push) Failing after 2m17s
CI / Security audit (push) Failing after 58s
CI / Browser tests (Chromium) (push) Successful in 29m58s
e6e39ceec5
SELECTED in postulo.core.messages_tool lists, by release line, the languages a release must
carry complete, a draft counting: 0.4's 39, and 0.5 adding fr-CA, en-CA, es-MX, be, cnr, fo,
nn, rm, az, kk, zh-Hans, zh-Hant and Arabic (maintainer, 2026-10-23). The release test, the
new gate --release, release_tools.py check and the plugin repositories read it instead of
the fixed European Union tuple.

Closes #347

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into 347-selected-languages
Some checks failed
CI / Unit tests and coverage (Python 3.14) (push) Successful in 18m4s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 3m34s
CI / Browser tests (Chromium) (push) Successful in 36m10s
CI / Database tests on PostgreSQL (push) Successful in 12m46s
CI / Security audit (push) Successful in 7m14s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 27m16s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 4m36s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m42s
CI / Security audit (pull_request) Successful in 1m20s
CI / Browser tests (Chromium) (pull_request) Failing after 43m26s
Every Python / Unit tests (Python 3.12) (push) Has been cancelled
Every Python / Unit tests (Python 3.13) (push) Has been cancelled
2f77658953
Run CI again: the pull-request browser run failed where the push run on the same commit passed
All checks were successful
CI / Unit tests and coverage (Python 3.14) (push) Successful in 13m7s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m29s
CI / Database tests on PostgreSQL (push) Successful in 3m35s
CI / Security audit (push) Successful in 52s
CI / Browser tests (Chromium) (push) Successful in 31m54s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m59s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m34s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m23s
CI / Security audit (pull_request) Successful in 46s
CI / Browser tests (Chromium) (pull_request) Successful in 30m49s
Every Python / Unit tests (Python 3.12) (push) Successful in 15m11s
Every Python / Unit tests (Python 3.13) (push) Successful in 15m13s
a5defb3da6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiagoagueda deleted branch 347-selected-languages 2026-10-23 19:22:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo!1038
No description provided.