Commit 737a1971 authored by Jérome Perrin's avatar Jérome Perrin

knowledge_pad/worklist gadget: support displaying a worklist that does not...

knowledge_pad/worklist gadget: support displaying a worklist that does not respect the (%(count)s) convention
parent 3294fe7c
......@@ -4,10 +4,11 @@ return_list = []
i = 1
portal = context.getPortalObject()
for worklist in context.portal_workflow.listActionInfos():
# XXX worklist translation process is a bit tricky. We translate only the first part of "XXX to Validate (count)"
title = worklist['title']
title, count = title.split(' (', 1)
title = "%s (%s" % ( translateString(title), count )
if ' (' in title:
# Worklist translation process is a bit tricky. We translate only the first part of "X to Validate (count)"
title, count = title.split(' (', 1)
title = "%s (%s" % ( translateString(title), count )
o = newTempDocument(portal, str(i))
o.edit(
count=worklist['count'],
......
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