Commit e76adbc8 authored by Jérome Perrin's avatar Jérome Perrin

knowledge_pad: translate worklists names

parent ce03d16f
...@@ -50,17 +50,21 @@ ...@@ -50,17 +50,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 return_list = []\n
i = 1\n i = 1\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
for worklist in context.portal_workflow.listActionInfos():\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 = newTempDocument(portal, str(i))\n
o.edit(\n o.edit(\n
count=worklist[\'count\'],\n count=worklist[\'count\'],\n
title=worklist[\'title\'],\n title=title,\n
worklist_url=worklist[\'url\'],\n worklist_url=worklist[\'url\']\n
\n
)\n )\n
return_list.append(o)\n return_list.append(o)\n
i+=1\n i+=1\n
......
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