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 @@ ...@@ -69,13 +69,13 @@
request=context.REQUEST\n request=context.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n Base_translateString = portal.Base_translateString\n
\n \n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
\n \n
if uids == []:\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 qs = \'?portal_status_message=%s\' % message\n
return request.RESPONSE.redirect( context.absolute_url() + \'/\' + form_id + qs )\n return request.RESPONSE.redirect( context.absolute_url() + \'/\' + form_id + qs )\n
\n \n
...@@ -153,7 +153,7 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n ...@@ -153,7 +153,7 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>Base_translateString</string>
<string>selected_uids</string> <string>selected_uids</string>
<string>message</string> <string>message</string>
<string>qs</string> <string>qs</string>
...@@ -187,6 +187,12 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n ...@@ -187,6 +187,12 @@ return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request)\n
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Delete objects from a folder</string> </value> <value> <string>Delete objects from a folder</string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -65,9 +65,8 @@ ...@@ -65,9 +65,8 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
request = context.REQUEST\n request = context.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
...@@ -93,7 +92,7 @@ context.activate(after_tag=tag).getTitle()\n ...@@ -93,7 +92,7 @@ context.activate(after_tag=tag).getTitle()\n
\n \n
return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n
context.absolute_url(), form_id,\n context.absolute_url(), form_id,\n
N_("Workflow Modification in Progress")))\n translateString("Workflow Modification in Progress")))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -147,8 +146,7 @@ return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n ...@@ -147,8 +146,7 @@ return request.RESPONSE.redirect( \'%s/%s?portal_status_message=%s\' % (\n
<string>form_id</string> <string>form_id</string>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>N_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>REQUEST=context.REQUEST\n <value> <string>REQUEST=context.REQUEST\n
error_message = \'\'\n error_message = \'\'\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
\n \n
if context.cb_dataValid:\n if context.cb_dataValid:\n
# We first look if the content of objects to paste is allowed\n # We first look if the content of objects to paste is allowed\n
...@@ -76,24 +76,24 @@ if context.cb_dataValid:\n ...@@ -76,24 +76,24 @@ if context.cb_dataValid:\n
try:\n try:\n
portal_type_list = [x.getPortalType() for x in object_list]\n portal_type_list = [x.getPortalType() for x in object_list]\n
except AttributeError:\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 else:\n
allowed_type_list = [x for x in context.getVisibleAllowedContentTypeList()]\n allowed_type_list = [x for x in context.getVisibleAllowedContentTypeList()]\n
for portal_type in portal_type_list:\n for portal_type in portal_type_list:\n
if portal_type not in allowed_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 if context.cb_dataValid and error_message==\'\':\n
try:\n try:\n
new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n
except KeyError:\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 return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % msg)\n
else:\n else:\n
new_id_list = [i[\'new_id\'] for i in new_item_list]\n new_id_list = [i[\'new_id\'] for i in new_item_list]\n
for my_id in new_id_list:\n for my_id in new_id_list:\n
context[my_id].flushActivity(invoke=0, method_id=\'immediateReindexObject\')\n context[my_id].flushActivity(invoke=0, method_id=\'immediateReindexObject\')\n
context[my_id].recursiveImmediateReindexObject()\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 return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % msg)\n
elif context.cb_dataValid and error_message!=\'\':\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 return REQUEST.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % error_message)\n
...@@ -146,7 +146,7 @@ else:\n ...@@ -146,7 +146,7 @@ else:\n
<string>context</string> <string>context</string>
<string>REQUEST</string> <string>REQUEST</string>
<string>error_message</string> <string>error_message</string>
<string>N_</string> <string>Base_translateString</string>
<string>object_list</string> <string>object_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
944 945
\ No newline at end of file \ 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