Commit 729c63ce authored by Romain Courteaud's avatar Romain Courteaud

Modify traduction.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6002 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 86d928af
......@@ -155,6 +155,7 @@ try:\n
dialog_form = getattr(context, dialog_method, None)\n
for k, v in kw.items() : \n
request.set(k, v)\n
context.log("Base_callDialogMethod : dialog_form", dialog_form)\n
return dialog_form(**kw)\n
# else fallback to url argument passing (we remove None values, as it doesn\'t work with make_query)\n
cleanedup_kw = {}\n
......
......@@ -68,6 +68,9 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
if not action_select : return\n
\n
is_list = int(is_list)\n
......@@ -99,9 +102,11 @@ elif doAction0 == \'add\':\n
new_content = context.newContent(portal_type=type_name,\n
container=context,\n
id=str(new_id))\n
redirect_url = \'%s/%s?%s\' % ( new_content.absolute_url() \n
message = N_("Object+Created.")\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( \n
new_content.absolute_url() \n
, \'view\'\n
, \'portal_status_message=Object+Created.\')\n
, message)\n
return request.RESPONSE.redirect( redirect_url )\n
# Otherwise, check if this is an automatic menu (template)\n
elif doAction0 == \'template\':\n
......@@ -118,9 +123,10 @@ elif doAction0 == \'template\':\n
, \'view\'\n
, \'portal_status_message=Template+Created.\')\n
else: \n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
message = N_("Template+Does+not+Exist.")\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( context.absolute_url()\n
, \'view\'\n
, \'portal_status_message=Template+Does+not+Exist.\')\n
, message)\n
return request.RESPONSE.redirect( redirect_url )\n
\n
return getattr(context,form_id)(request)\n
......@@ -180,12 +186,14 @@ return getattr(context,form_id)(request)\n
<string>listbox_uid</string>
<string>md5_object_uid_list</string>
<string>is_list</string>
<string>int</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>int</string>
<string>Base_doAction</string>
<string>_getitem_</string>
<string>doAction0</string>
<string>context</string>
<string>request</string>
<string>uri</string>
<string>None</string>
......@@ -193,6 +201,7 @@ return getattr(context,form_id)(request)\n
<string>type_name</string>
<string>str</string>
<string>new_content</string>
<string>message</string>
<string>redirect_url</string>
<string>template_relative_url</string>
<string>template</string>
......
......@@ -70,6 +70,8 @@
# Updates attributes of an Zope document\n
# which is in a class inheriting from ERP5 Base\n
portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
from Products.Formulator.Errors import ValidationError, FormValidationError\n
\n
......@@ -77,7 +79,8 @@ request=context.REQUEST\n
o = context.portal_catalog.getObject(object_uid)\n
\n
if o is None:\n
return "Sorrry, Error, the calling object was not catalogued. Do not know how to do ?"\n
message = N_(\'Sorrry, Error, the calling object was not catalogued. Do not know how to do ?\')\n
return message\n
\n
if listbox_uid is not None:\n
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)\n
......@@ -185,14 +188,17 @@ return context.Base_edit(form_id, selection_index=old_request.get(\'selection_in
<string>object_uid</string>
<string>listbox_uid</string>
<string>batch_mode</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>Products.Formulator.Errors</string>
<string>ValidationError</string>
<string>FormValidationError</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>o</string>
<string>None</string>
<string>message</string>
<string>selected_uids</string>
<string>previous_form_id</string>
<string>getattr</string>
......
......@@ -66,20 +66,29 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>search_method = getattr(context, \'get%sRelatedValueList\' %\n
<value> <string>portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n
\n
search_method = getattr(context, \'get%sRelatedValueList\' %\n
string.join([string.capitalize(x) for x in base_category.split(\'_\')], \'\'))\n
related_object_list = search_method(portal_type=portal_type)\n
\n
if len(related_object_list)==0:\n
url = context.absolute_url()\n
message = \'No+%s+related.\' % portal_type.replace(\' \', \'+\')\n
modified_translated_portal_type = N_(portal_type).replace(\' \', \'+\')\n
message = N_(\'No+%(portal_type)+related.\',\n
mapping = {\'portal_type\': modified_translated_portal_type})\n
\n
elif len(related_object_list)==1:\n
url = related_object_list[0].absolute_url()\n
message = \'%s+related+to+%s:+%s.\' %\\\n
(portal_type.replace(\' \', \'+\'),\n
context.getPortalType().replace(\' \', \'+\'), \n
context.getTitleOrId())\n
modified_translated_portal_type = N_(portal_type).replace(\' \', \'+\')\n
context_translated_portal_type = N_(context.getPortalType()).replace(\' \', \'+\')\n
message = N_("%(portal_type)+related+to+%(context_portal_type):+%(title).",\n
mapping = {\n
\'portal_type\': modified_translated_portal_type,\n
\'context_portal_type\': context_translated_portal_type,\n
\'title\': context.getTitleOrId()\n
})\n
\n
else:\n
request=context.REQUEST\n
......@@ -140,9 +149,11 @@ context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
<tuple>
<string>base_category</string>
<string>portal_type</string>
<string>getattr</string>
<string>context</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>N_</string>
<string>getattr</string>
<string>string</string>
<string>append</string>
<string>$append0</string>
......@@ -152,8 +163,10 @@ context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
<string>related_object_list</string>
<string>len</string>
<string>url</string>
<string>modified_translated_portal_type</string>
<string>message</string>
<string>_getitem_</string>
<string>context_translated_portal_type</string>
<string>request</string>
<string>selection_uid_list</string>
<string>kw</string>
......
......@@ -75,7 +75,7 @@ REQUEST=context.REQUEST\n
# or if allowed content types is 1 add that type\n
\n
try:\n
new_object = context.newContent() # We do not reindex in order to prevent conflicts\n
new_object = context.newContent()\n
except IndexError:\n
# return only a portal_status_message if the IndexError is raised because\n
# there are no elemnts in context.allowedContentTypes()\n
......
2006-03-06 romain
* translate message return by scripts in erp5_core.
2006-03-04 jerome
* Return translated_simulation_state_title in Resource_zGetMovementHistoryList
......
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