Commit 87b1f298 authored by Tristan Cavelier's avatar Tristan Cavelier

Folder_viewSearchDialog: force translateString to return str.

Fixes rendering when using Chameleon:
  ValueError: only strings can be translated, not: <ERP5Type.Message.Message for ...
parent 8056ec16
...@@ -30,10 +30,12 @@ from Products.ERP5Type.Globals import get_request ...@@ -30,10 +30,12 @@ from Products.ERP5Type.Globals import get_request
from Products.Formulator.TALESField import TALESMethod from Products.Formulator.TALESField import TALESMethod
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString as translateStringAsMessage
from Products.ERP5Form.Form import ERP5Form from Products.ERP5Form.Form import ERP5Form
from Products.ERP5Form.ListBox import ListBoxListRenderer from Products.ERP5Form.ListBox import ListBoxListRenderer
def translateString(*args, **kw):
return str(translateStringAsMessage(*args, **kw))
def getSearchDialog(self, REQUEST=None): def getSearchDialog(self, REQUEST=None):
"""Generate a dynamic search dialog from a listbox. """Generate a dynamic search dialog from a listbox.
......
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