Commit 206cd26f authored by Jérome Perrin's avatar Jérome Perrin

core: store a message instance in workflow history when converting to base format

Messages are translated when displayed, Base_translateString translates
once and for all with the current language.
parent 4e48b8b6
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Message import translateString
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from OFS.Image import Pdata from OFS.Image import Pdata
from io import BytesIO from io import BytesIO
...@@ -62,7 +63,7 @@ class BaseConvertableFileMixin: ...@@ -62,7 +63,7 @@ class BaseConvertableFileMixin:
return return
message = self._convertToBaseFormat() # Call implemetation method message = self._convertToBaseFormat() # Call implemetation method
if message is None: if message is None:
message = self.Base_translateString('Converted to ${mime_type}.', message = translateString('Converted to ${mime_type}.',
mapping={'mime_type': self.getBaseContentType()}) mapping={'mime_type': self.getBaseContentType()})
# if processing_status_workflow is associated # if processing_status_workflow is associated
workflow_tool = getToolByName(self.getPortalObject(), 'portal_workflow') workflow_tool = getToolByName(self.getPortalObject(), 'portal_workflow')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment