Hold the drafts left out of the catalogues to a per-language ratchet (#910) #1076

Merged
tiagoagueda merged 1 commit from 910-draft-ratchet into main 2026-10-29 18:20:15 +00:00
Owner

A draft that fails a check -- a lost placeholder, a plural form that drops the count, broken
markup -- is not compiled, so the page shows it in English. Nothing counted them: Weblate's
LibreTranslate add-on once left 1,684, and a new one was one more warning line among many.

messages.py check now counts them per catalogue set and language and compares the counts
with src/postulo/locale/excluded-drafts.txt, one <set> <language> <count> line each, a pair
not listed being zero (so a plugin repository without the file is held at zero). More than
recorded fails the check, naming the language and both numbers; it runs in CI on every pull
request, Weblate's included. Fewer than recorded is printed with the line to write, but does
not fail: the fix arrives in Weblate's pull request, which carries only catalogues, so the
commit after it lowers the number. The baseline is today's: ur 51, sw 19, id 1.

docs/TRANSLATING.md no longer says Weblate drafts new strings by machine (the add-on is off):
a new or changed string waits for a speaker, and the ratchet is described under The tool.

The 71 drafts themselves are Weblate work for speakers of Urdu, Swahili and Indonesian, so
the issue stays open for them.

Refs #910

Notes for review

  • The ratchet: messages.py check counts, per catalogue set and language, the drafts left out of the .mo files, and compares them with src/postulo/locale/excluded-drafts.txt (today postulo id 1, postulo sw 19, postulo ur 51).
    • More than recorded fails, naming the language and both numbers.
    • Fewer prints the line to write. It does not fail, because Weblate's pull request, which carries only .po files, is what brings the fixes.
    • A missing file means zero.
  • Docs: docs/TRANSLATING.md no longer says Weblate drafts by machine (four places), and it describes the ratchet.
  • The issue stays open for the Weblate work: 71 drafts, all in the core component. Most need rewriting by a speaker.
  • Watch: postulo-apprise has 30 excluded drafts of its own and will fail check when it repins, until it commits its own locale/excluded-drafts.txt.

🤖 Generated with Claude Code

A draft that fails a check -- a lost placeholder, a plural form that drops the count, broken markup -- is not compiled, so the page shows it in English. Nothing counted them: Weblate's LibreTranslate add-on once left 1,684, and a new one was one more warning line among many. `messages.py check` now counts them per catalogue set and language and compares the counts with src/postulo/locale/excluded-drafts.txt, one `<set> <language> <count>` line each, a pair not listed being zero (so a plugin repository without the file is held at zero). More than recorded fails the check, naming the language and both numbers; it runs in CI on every pull request, Weblate's included. Fewer than recorded is printed with the line to write, but does not fail: the fix arrives in Weblate's pull request, which carries only catalogues, so the commit after it lowers the number. The baseline is today's: ur 51, sw 19, id 1. docs/TRANSLATING.md no longer says Weblate drafts new strings by machine (the add-on is off): a new or changed string waits for a speaker, and the ratchet is described under The tool. The 71 drafts themselves are Weblate work for speakers of Urdu, Swahili and Indonesian, so the issue stays open for them. Refs #910 ## Notes for review - **The ratchet:** `messages.py check` counts, per catalogue set and language, the drafts left out of the `.mo` files, and compares them with `src/postulo/locale/excluded-drafts.txt` (today `postulo id 1`, `postulo sw 19`, `postulo ur 51`). - More than recorded fails, naming the language and both numbers. - Fewer prints the line to write. It does not fail, because Weblate's pull request, which carries only `.po` files, is what brings the fixes. - A missing file means zero. - **Docs:** `docs/TRANSLATING.md` no longer says Weblate drafts by machine (four places), and it describes the ratchet. - **The issue stays open** for the Weblate work: 71 drafts, all in the core component. Most need rewriting by a speaker. - **Watch:** postulo-apprise has 30 excluded drafts of its own and will fail `check` when it repins, until it commits its own `locale/excluded-drafts.txt`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Hold the drafts left out of the catalogues to a per-language ratchet (#910)
Some checks failed
Every Python / Unit tests (Python 3.12) (push) Successful in 14m29s
Every Python / Unit tests (Python 3.13) (push) Successful in 13m9s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m0s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m42s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m5s
CI / Security audit (pull_request) Successful in 1m2s
CI / Browser tests (Chromium) (pull_request) Successful in 31m4s
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m59s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m36s
CI / Database tests on PostgreSQL (push) Successful in 3m36s
CI / Security audit (push) Successful in 1m4s
CI / Browser tests (Chromium) (push) Failing after 32m23s
765710db5a
A draft that fails a check -- a lost placeholder, a plural form that drops the count, broken
markup -- is not compiled, so the page shows it in English. Nothing counted them: Weblate's
LibreTranslate add-on once left 1,684, and a new one was one more warning line among many.

`messages.py check` now counts them per catalogue set and language and compares the counts
with src/postulo/locale/excluded-drafts.txt, one `<set> <language> <count>` line each, a pair
not listed being zero (so a plugin repository without the file is held at zero). More than
recorded fails the check, naming the language and both numbers; it runs in CI on every pull
request, Weblate's included. Fewer than recorded is printed with the line to write, but does
not fail: the fix arrives in Weblate's pull request, which carries only catalogues, so the
commit after it lowers the number. The baseline is today's: ur 51, sw 19, id 1.

docs/TRANSLATING.md no longer says Weblate drafts new strings by machine (the add-on is off):
a new or changed string waits for a speaker, and the ratchet is described under The tool.

The 71 drafts themselves are Weblate work for speakers of Urdu, Swahili and Indonesian, so
the issue stays open for them.

Refs #910

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiagoagueda force-pushed 910-draft-ratchet from 765710db5a
Some checks failed
Every Python / Unit tests (Python 3.12) (push) Successful in 14m29s
Every Python / Unit tests (Python 3.13) (push) Successful in 13m9s
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m0s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m42s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m5s
CI / Security audit (pull_request) Successful in 1m2s
CI / Browser tests (Chromium) (pull_request) Successful in 31m4s
CI / Unit tests and coverage (Python 3.14) (push) Successful in 12m59s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m36s
CI / Database tests on PostgreSQL (push) Successful in 3m36s
CI / Security audit (push) Successful in 1m4s
CI / Browser tests (Chromium) (push) Failing after 32m23s
to 9c72e146fa
All checks were successful
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m44s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m47s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m3s
CI / Security audit (pull_request) Successful in 1m9s
CI / Browser tests (Chromium) (pull_request) Successful in 34m1s
2026-10-29 10:23:48 +00:00
Compare
tiagoagueda force-pushed 910-draft-ratchet from 9c72e146fa
All checks were successful
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 12m44s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m47s
CI / Database tests on PostgreSQL (pull_request) Successful in 4m3s
CI / Security audit (pull_request) Successful in 1m9s
CI / Browser tests (Chromium) (pull_request) Successful in 34m1s
to d04675dc89
All checks were successful
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 13m16s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m35s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m47s
CI / Security audit (pull_request) Successful in 1m3s
CI / Browser tests (Chromium) (pull_request) Successful in 34m31s
2026-10-29 18:19:13 +00:00
Compare
tiagoagueda deleted branch 910-draft-ratchet 2026-10-29 18:20:16 +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!1076
No description provided.