Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix save translation to match the rest of plone in plone 4 / 5 #554

Merged
merged 1 commit into from Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/HISTORY.txt
Expand Up @@ -6,6 +6,7 @@ Changelog
------------------

- Add ftw.theming:default (upgrade step not provided). [busykoala]
- Unify "Save" translation across content types and plone versions [Nachtalb]


2.2.0 (2019-10-30)
Expand Down
6 changes: 3 additions & 3 deletions ftw/simplelayout/browser/ajax/edit_block.py
Expand Up @@ -7,7 +7,7 @@
from plone.dexterity.events import EditCancelledEvent
from plone.dexterity.events import EditFinishedEvent
from plone.dexterity.interfaces import IDexterityEditForm
from Products.CMFPlone import PloneMessageFactory
from plone.dexterity.i18n import MessageFactory as DXMF
from Products.Five.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from z3c.form import button
Expand Down Expand Up @@ -36,7 +36,7 @@ class EditForm(DefaultEditForm):

_finished_edit = False

@button.buttonAndHandler(PloneMessageFactory(u'Save'), name='save')
@button.buttonAndHandler(DXMF(u'Save'), name='save')
def handleApply(self, action):
data, errors = self.extractData()
if errors:
Expand All @@ -53,7 +53,7 @@ def handleApply(self, action):

self._finished_edit = True

@button.buttonAndHandler(PloneMessageFactory(u'Cancel'), name='cancel')
@button.buttonAndHandler(DXMF(u'Cancel'), name='cancel')
def handleCancel(self, action):
notify(EditCancelledEvent(self.context))

Expand Down