Skip to content

Green, i18n-ready scaffolding + language subtemplate#7

Closed
MrTango wants to merge 1 commit into
mainfrom
feature/declarative-spec-green-scaffolding
Closed

Green, i18n-ready scaffolding + language subtemplate#7
MrTango wants to merge 1 commit into
mainfrom
feature/declarative-spec-green-scaffolding

Conversation

@MrTango
Copy link
Copy Markdown
Contributor

@MrTango MrTango commented May 26, 2026

Summary

  • Generated tree is ruff-clean out of the box: Plone-style isort config (force-single-line, order-by-type=false, lines-after-imports=2), import-order fixes, dropped unused imports, and locales/update.py rewritten without shell=True.
  • Content-type tests honour global_allow=false (create parent container, assert allowedContentTypes()); restapi_service service_for scans the package's own interfaces (+ <enter manually>).
  • i18n: _ MessageFactory in i18n.py (not __init__.py), zope_i18n_compile_mo_files in dev zope.conf and the test layer, and a new language subtemplate that scaffolds a locale .po catalog.
  • Fix behavior test to look up the real registered IBehavior name.
  • zope-setup full Plone version derived from the addon's minor in the composite; copier invoked via sys.executable -m copier; track .pot, ignore only .mo.

Pairs with plone/plonecli#111 (declarative apply spec consuming these templates).

Test plan

  • uv run --extra dev pytest -m "not integration" — 332 passed
  • uv run ruff check . — clean
  • New tests: e2e generated-tree ruff-clean, subtemplate idempotency, language, version derivation

- generated tree is ruff-clean out of the box (isort config + import fixes,
  drop unused imports, no shell=True in locales/update.py)
- ct tests honour global_allow=false; restapi service_for scans the package's
  own interfaces (+ manual entry)
- i18n: MessageFactory in i18n.py (not __init__), zope_i18n_compile_mo_files in
  dev zope.conf + test layer, new language subtemplate for locale .po catalogs
- fix behavior test to look up the real registered IBehavior name
- zope-setup full version derived from the addon minor; copier invoked via
  sys.executable -m copier; track .pot, ignore only .mo
- tests: e2e ruff-clean generation, subtemplate idempotency, version derivation
@MrTango MrTango closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant