Commit 220516a4 authored by Jérome Perrin's avatar Jérome Perrin

- don't include (s) in messages, use plural ("If you are not sure whether a

  noun should be singular or plural, use plural" from
  http://www.erp5.org/GuidelinesForNamingConvention )
- use Base_redirect



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29523 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 858aaa7b
......@@ -65,10 +65,12 @@ request=context.REQUEST\n
\n
if uids != []:\n
context.manage_copyObjects(uids=uids, REQUEST=request, RESPONSE=request.RESPONSE)\n
message = Base_translateString("Item(s) copied.")\n
message = Base_translateString("Items copied.")\n
else:\n
message = Base_translateString("Please select one or more items to copy first.")\n
return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=message))\n
</string> </value>
</item>
<item>
......@@ -79,7 +81,7 @@ return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?p
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id, uids=[], listbox_uid=[],selection_name=\'\'</string> </value>
<value> <string>form_id, uids=[], listbox_uid=[], selection_name=\'\'</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......@@ -122,6 +124,7 @@ return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?p
<string>selected_uids</string>
<string>request</string>
<string>message</string>
<string>dict</string>
</tuple>
</value>
</item>
......
......@@ -96,10 +96,11 @@ if uids != []:\n
qs = \'?portal_status_message=%s\' % message \n
else:\n
context.manage_cutObjects(uids=uids, REQUEST=request)\n
message = Base_translateString("Item(s) cut.")\n
message = Base_translateString("Items cut.")\n
else:\n
message = Base_translateString("Please select one or more items to cut first.")\n
return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
\n
return context.Base_redirect(form_id, keep_items=dict(portal_status_message=message))\n
]]></string> </value>
......@@ -112,7 +113,7 @@ return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?p
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id,selection_name=\'\',uids=[],listbox_uid=[]</string> </value>
<value> <string>form_id, selection_name=\'\', uids=[], listbox_uid=[]</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -159,6 +160,7 @@ return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?p
<string>message</string>
<string>repr</string>
<string>qs</string>
<string>dict</string>
</tuple>
</value>
</item>
......
......@@ -70,21 +70,23 @@ if context.cb_dataValid:\n
for portal_type in portal_type_list:\n
if portal_type not in allowed_type_list:\n
error_message = Base_translateString(\'Sorry, you can not paste these items here.\')\n
\n
if context.cb_dataValid and error_message==\'\':\n
try:\n
new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n
except KeyError:\n
msg = Base_translateString(\'Nothing to paste.\')\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % msg)\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=Base_translateString(\'Nothing to paste.\')))\n
else:\n
new_id_list = [i[\'new_id\'] for i in new_item_list]\n
msg = Base_translateString(\'Item(s) paste in progress.\')\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % msg)\n
elif context.cb_dataValid and error_message!=\'\':\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % error_message)\n
else:\n
error_message = Base_translateString(\'Copy or cut one or more items to paste first.\')\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % error_message)\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=Base_translateString(\'Items paste in progress.\')))\n
\n
elif context.cb_dataValid and error_message != \'\':\n
return context.Base_redirect(form_id, keep_items=dict(portal_status_message=error_message))\n
\n
error_message = Base_translateString(\'Copy or cut one or more items to paste first.\')\n
return context.Base_redirect(form_id, keep_items=dict(portal_status_message=error_message))\n
</string> </value>
</item>
<item>
......@@ -139,7 +141,7 @@ else:\n
<string>_getitem_</string>
<string>new_item_list</string>
<string>KeyError</string>
<string>msg</string>
<string>dict</string>
<string>i</string>
<string>new_id_list</string>
</tuple>
......
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