Commit 4d55436c authored by Yusei Tahara's avatar Yusei Tahara

2008-08-28 yusei

* Use Base_translateString or translateString instead of N_.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23247 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0979d2bd
......@@ -69,13 +69,13 @@
request=context.REQUEST\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
Base_translateString = portal.Base_translateString\n
\n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
\n
if uids == []:\n
message = N_("Please+select+one+or+more+items+to+delete+first.")\n
message = Base_translateString("Please+select+one+or+more+items+to+delete+first.")\n
qs = \'?portal_status_message=%s\' % message\n
return request.RESPONSE.redirect( context.absolute_url() + \'/\' + form_id + qs )\n
\n
......@@ -153,7 +153,7 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n
<string>context</string>
<string>request</string>
<string>portal</string>
<string>N_</string>
<string>Base_translateString</string>
<string>selected_uids</string>
<string>message</string>
<string>qs</string>
......@@ -187,6 +187,12 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n
<key> <string>title</string> </key>
<value> <string>Delete objects from a folder</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -65,9 +65,8 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import Message\n
<value> <string>from Products.ERP5Type.Message import translateString\n
\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
request = context.REQUEST\n
portal = context.getPortalObject()\n
\n
......@@ -93,7 +92,7 @@ context.activate(after_tag=tag).getTitle()\n
\n
return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n
context.absolute_url(), form_id,\n
N_("Workflow Modification in Progress")))\n
translateString("Workflow Modification in Progress")))\n
</string> </value>
</item>
<item>
......@@ -147,8 +146,7 @@ return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n
<string>form_id</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>N_</string>
<string>translateString</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
......
......@@ -67,7 +67,7 @@
<key> <string>_body</string> </key>
<value> <string>REQUEST=context.REQUEST\n
error_message = \'\'\n
N_ = context.Base_translateString\n
Base_translateString = context.Base_translateString\n
\n
if context.cb_dataValid:\n
# We first look if the content of objects to paste is allowed\n
......@@ -76,24 +76,24 @@ if context.cb_dataValid:\n
try:\n
portal_type_list = [x.getPortalType() for x in object_list]\n
except AttributeError:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
error_message = Base_translateString(\'Sorry+you+can+not+paste+theses+Items+here\')\n
else:\n
allowed_type_list = [x for x in context.getVisibleAllowedContentTypeList()]\n
for portal_type in portal_type_list:\n
if portal_type not in allowed_type_list:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
error_message = Base_translateString(\'Sorry+you+can+not+paste+theses+Items+here\')\n
if context.cb_dataValid and error_message==\'\':\n
try:\n
new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n
except KeyError:\n
msg = N_(\'Nothing+To+Paste.\')\n
msg = Base_translateString(\'Nothing+To+Paste.\')\n
return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % msg)\n
else:\n
new_id_list = [i[\'new_id\'] for i in new_item_list]\n
for my_id in new_id_list:\n
context[my_id].flushActivity(invoke=0, method_id=\'immediateReindexObject\')\n
context[my_id].recursiveImmediateReindexObject()\n
msg = N_(\'Item(s)+Pasted.\')\n
msg = Base_translateString(\'Item(s)+Pasted.\')\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
......@@ -146,7 +146,7 @@ else:\n
<string>context</string>
<string>REQUEST</string>
<string>error_message</string>
<string>N_</string>
<string>Base_translateString</string>
<string>object_list</string>
<string>append</string>
<string>$append0</string>
......
944
\ No newline at end of file
945
\ No newline at end of file
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