4 #TODO : translate messages
5 #from Products.PlacelessTranslationService.MessageID import MessageIDFactory
6 #_ = MessageIDFactory('default', as_unicode=True)
7 _
= lambda x
: lambda : x
9 subset_ids
= [ obj
.getId() for obj
in context
.listFolderContents() ]
12 attempt
= context
.moveObjectsToBottom(ids
, subset_ids
=subset_ids
)
15 attempt
= context
.moveObjectsToBottom(ids
)
17 msg
= _(attempt
== 1 and \
18 '%d item moved to bottom.' or \
19 '%d items moved to bottom.')().encode('utf-8') % attempt
20 return context
.setStatus( True, msg
)
22 return context
.setStatus(False, 'Nothing to change.')
23 except ValueError, errmsg
:
24 return context
.setStatus(False, 'ValueError: %s' % errmsg
)