diff --git a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml index db47bf12d400334a9e6fa745b34a873dc487e5e4..8546c7e6e3eab6fff1c412d749683d4c4836bea5 100644 --- a/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml +++ b/bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_gadget/ERP5Site_getWorklistObjectList.xml @@ -50,17 +50,21 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>from Products.ERP5Type.Document import newTempDocument\n + <value> <string>from Products.ERP5Type.Message import translateString\n +from Products.ERP5Type.Document import newTempDocument\n return_list = []\n i = 1\n portal = context.getPortalObject()\n for worklist in context.portal_workflow.listActionInfos():\n + # XXX worklist translation process is a bit tricky. We translate only the first part of "XXX to Validate (count)"\n + title = worklist[\'title\']\n + title, count = title.split(\' (\', 1)\n + title = "%s (%s" % ( translateString(title), count )\n o = newTempDocument(portal, str(i))\n o.edit(\n count=worklist[\'count\'],\n - title=worklist[\'title\'],\n - worklist_url=worklist[\'url\'],\n - \n + title=title,\n + worklist_url=worklist[\'url\']\n )\n return_list.append(o)\n i+=1\n