1 ##parameters=ids, new_ids, **kw
2 ##title=Rename objects in a folder
4 from Products
.CMFDefault
.exceptions
import CopyError
5 from Products
.Plinn
.utils
import translate
6 _
= lambda msg
: translate(msg
, context
)
10 skiped
= context
.manage_renameObjects(ids
, new_ids
)
13 return context
.setStatus(True, _(u
'Item renamed.'))
15 return context
.setStatus(True, _(u
'Items renamed.'))
18 return context
.setStatus(True, _( u
'This item has not been renamed: "%s"') % ids
[0] )
20 return context
.setStatus(True
21 , _( u
'These items have not been renamed: %s') % \
22 ', '.join(['"%s"' % id for id in ids
]) )
24 return context
.setStatus(False, _(u
'Rename failed.'))
26 return context
.setStatus(False, _(u
'Nothing to change.'))