Commit 9e96031e authored by Jérome Perrin's avatar Jérome Perrin

translation_service returns an unicode string, we need to encode it to utf8.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4365 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6de6cc7a
...@@ -95,7 +95,7 @@ class TranslatedGetter(Getter): ...@@ -95,7 +95,7 @@ class TranslatedGetter(Getter):
translation_service = getToolByName(instance, 'translation_service') translation_service = getToolByName(instance, 'translation_service')
wf = portal_workflow.getWorkflowById(self._key) wf = portal_workflow.getWorkflowById(self._key)
state_id = wf._getWorkflowStateOf(instance, id_only=1) state_id = wf._getWorkflowStateOf(instance, id_only=1)
return translation_service.translate('ui', state_id) return translation_service.translate('ui', state_id).encode('utf8')
psyco.bind(__call__) psyco.bind(__call__)
...@@ -109,6 +109,6 @@ class TranslatedTitleGetter(TitleGetter): ...@@ -109,6 +109,6 @@ class TranslatedTitleGetter(TitleGetter):
translation_service = getToolByName(instance, 'translation_service') translation_service = getToolByName(instance, 'translation_service')
wf = portal_workflow.getWorkflowById(self._key) wf = portal_workflow.getWorkflowById(self._key)
state_title = wf._getWorkflowStateOf(instance).title state_title = wf._getWorkflowStateOf(instance).title
return translation_service.translate('ui', state_title) return translation_service.translate('ui', state_title).encode('utf8')
psyco.bind(__call__) psyco.bind(__call__)
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