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