Skip to content

Preserve configlet title i18n Messages on edits - fixes #4344#4345

Open
szakitibi wants to merge 1 commit into
plone:masterfrom
szakitibi:4344-fix_configlet_title_translations
Open

Preserve configlet title i18n Messages on edits - fixes #4344#4345
szakitibi wants to merge 1 commit into
plone:masterfrom
szakitibi:4344-fix_configlet_title_translations

Conversation

@szakitibi

Copy link
Copy Markdown
Contributor
  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

GenericSetup controlpanel.xml allows configlets to be registered with translated titles (i18n:attributes="title"). This works in multilingual sites and Site Setup on classic UI show translated configlets.

However using ZMI/portal_controlpanel/manage_editActionsForm breaks translations here:

name = str(properties.get("name_%d" % index, ""))

The zope.i18n.message.Message is replaced with a plain str.

This PR fixes the issue by restoring the i18n Message from the stored action if there is no change to the name.

Closes #4344

@mister-roboto

Copy link
Copy Markdown

Tibor Szakmany the email address in your commit does not match an email in your GitHub account. Thus it is impossible to determine whether you have signed the Plone Contributor Agreement, which is required to merge this pull request.

Learn about the Plone Contributor Agreement: https://plone.org/foundation/contributors-agreement

If you have sent in your Plone Contributor Agreement, and received and accepted an invitation to join the Plone GitHub organization, then you might need to either add the email address on your Agreement to your GitHub account or change the email address in your commits. If you need to do the latter, then you should squash the commits with your matching email and push them.

Add more emails to your GitHub account:
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account

Change the email address in your commits:
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address

@mister-roboto

Copy link
Copy Markdown

@szakitibi 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!

@szakitibi szakitibi force-pushed the 4344-fix_configlet_title_translations branch from b336924 to 1fa8723 Compare June 26, 2026 10:47
@szakitibi

Copy link
Copy Markdown
Contributor Author

Regarding the force-push, it switched commit author to the one with signed Plone Contributor Agreement.

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.

ZMI/portal_controlpanel/manage_editActionsForm brakes translations

2 participants