Skip to content

[codex] add default language sync for control panel#2021

Open
sneridagh wants to merge 1 commit into
mainfrom
codex/defaultlanguage-plone-site-sync
Open

[codex] add default language sync for control panel#2021
sneridagh wants to merge 1 commit into
mainfrom
codex/defaultlanguage-plone-site-sync

Conversation

@sneridagh

@sneridagh sneridagh commented Jun 10, 2026

Copy link
Copy Markdown
Member

What changed

  • Added a control-panel-only field deserializer for ILanguageSchema.default_language.
  • Syncs the site language when @controlpanels/language changes default_language on non-multilingual sites.
  • Leaves multilingual sites untouched.
  • Split the language-specific tests into test_services_controlpanel_language.py and added a towncrier fragment.

Why

  • Control panel deserialization uses a fake Dexterity context, so the language control panel needed request-scoped behavior to update the actual portal language.

Validation

  • `.venv/bin/zope-testrunner --all --test-path=src -s plone.restapi -m 'test_services_controlpanel_language|test_services_controlpanels'

📚 Documentation preview 📚: https://plonerestapi--2021.org.readthedocs.build/

@mister-roboto

Copy link
Copy Markdown

@sneridagh thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@sneridagh

Copy link
Copy Markdown
Member Author

@jenkins-plone-org please run jobs

@sneridagh sneridagh requested a review from davisagli June 10, 2026 10:41
@sneridagh sneridagh marked this pull request as ready for review June 10, 2026 10:54
@sneridagh

Copy link
Copy Markdown
Member Author

@davisagli No clue why all these failures...

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.

2 participants