[Erp5-report] r23241 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 28 16:43:21 CEST 2008
Author: yusei
Date: Thu Aug 28 16:43:11 2008
New Revision: 23241
URL: http://svn.erp5.org?rev=23241&view=rev
Log:
2008-08-28 yusei
* Use Base_translateString or translateString instead of N_.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPrintModeItemList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getTranslatedWorkflowStateItemList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml Thu Aug 28 16:43:11 2008
@@ -226,7 +226,7 @@
object_uid_list = map(lambda x:x.getObject().getUid(), selection_list)\n
error = context.portal_selections.selectionHasChanged(kw[\'previous_md5_object_uid_list\'], object_uid_list)\n
if error:\n
- error_message = N_("Sorry+your+selection+has+changed")\n
+ error_message = context.Base_translateString("Sorry+your+selection+has+changed")\n
\n
# if dialog_category is object_search, then edit the selection\n
if dialog_category == "object_search" :\n
@@ -387,7 +387,6 @@
<string>map</string>
<string>object_uid_list</string>
<string>error</string>
- <string>N_</string>
<string>listbox_uid</string>
<string>uids</string>
<string>selected_uids</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_createNewDocument.xml Thu Aug 28 16:43:11 2008
@@ -68,25 +68,23 @@
<value> <string>"""Add an object of the same type as self in the container, unless\n
this type cannot be added in the container.\n
"""\n
-N_ = context.getPortalObject().Base_translateString\n
+Base_translateString = context.Base_translateString\n
REQUEST=context.REQUEST\n
parent = context.getParentValue()\n
allowed_type_list = parent.getVisibleAllowedContentTypeList()\n
\n
if not allowed_type_list:\n
return context.ERP5Site_redirect(\'%s/%s\' % (context.absolute_url(), form_id),\n
- keep_items={\'portal_status_message\':\n
- N_("You are not allowed to add new content in this context.")})\n
+ keep_items={\'portal_status_message\':Base_translateString("You are not allowed to add new content in this context.")})\n
\n
if context.getPortalType() not in allowed_type_list:\n
return context.ERP5Site_redirect(\'%s/%s\' % (context.absolute_url(), form_id),\n
- keep_items={\'portal_status_message\':\n
- N_("You are not allowed to add ${portal_type} in this context.",\n
+ keep_items={\'portal_status_message\':Base_translateString("You are not allowed to add ${portal_type} in this context.",\n
mapping=dict(portal_type=context.getTranslatedPortalType()))})\n
\n
new_content = parent.newContent(portal_type=context.getPortalType())\n
return context.ERP5Site_redirect(\'%s/%s\' % (new_content.absolute_url(), form_id),\n
- keep_items={\'portal_status_message\': N_("Object Created.")})\n
+ keep_items={\'portal_status_message\':Base_translateString("Object Created.")})\n
</string> </value>
</item>
<item>
@@ -138,7 +136,7 @@
<string>form_id</string>
<string>_getattr_</string>
<string>context</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>REQUEST</string>
<string>parent</string>
<string>allowed_type_list</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml Thu Aug 28 16:43:11 2008
@@ -70,7 +70,7 @@
context.Base_updateListboxSelection()\n
\n
portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
\n
if not action_select : return\n
\n
@@ -103,7 +103,7 @@
new_content = context.newContent(portal_type=type_name,\n
container=context,\n
id=str(new_id))\n
- message = N_("Object+Created.")\n
+ message = Base_translateString("Object+Created.")\n
if not(ignore_layout) and context.getApplicableLayout():\n
redirect_url = \'%s/%s?portal_status_message=%s&editable_mode=1\' % (\n
new_content.WebSite_getDocumentPhysicalPath()\n
@@ -130,7 +130,7 @@
, \'view\'\n
, \'portal_status_message=Template+Created.\')\n
else: \n
- message = N_("Template+Does+not+Exist.")\n
+ message = Base_translateString("Template+Does+not+Exist.")\n
redirect_url = \'%s/%s?portal_status_message=%s\' % ( context.absolute_url()\n
, \'view\'\n
, message)\n
@@ -193,7 +193,7 @@
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>int</string>
<string>Base_doAction</string>
<string>_getitem_</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml Thu Aug 28 16:43:11 2008
@@ -81,7 +81,7 @@
\n
request=context.REQUEST\n
portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
\n
# Extra security\n
if request.get(\'field_prefix\', None):\n
@@ -95,7 +95,7 @@
# editing it by calling the Base_edit script with correct\n
# parameters directly.\n
if not silent_mode and not request.AUTHENTICATED_USER.has_permission(\'Modify portal content\', context) :\n
- msg = N_(\'You don\\\'t have the permissions to edit the object.\')\n
+ msg = Base_translateString("You don\'t have the permissions to edit the object.")\n
redirect_url = \'%s/%s?selection_index=%s&selection_name=%s&%s\' % (context.absolute_url(), form_id, selection_index, selection_name, \'portal_status_message=%s\' % msg)\n
return request[\'RESPONSE\'].redirect(redirect_url)\n
\n
@@ -234,7 +234,7 @@
kw = {}\n
encapsulated_editor_list = []\n
MARKER = []\n
-message = N_("Data+Updated.")\n
+message = Base_translateString("Data+Updated.")\n
\n
try:\n
# We process all the field in form and\n
@@ -262,7 +262,7 @@
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(context)\n
except ActivityPendingError,e:\n
- message = N_("%s" % e)\n
+ message = Base_translateString("%s" % e)\n
\n
ignore_layout = int(ignore_layout)\n
editable_mode = int(editable_mode)\n
@@ -353,7 +353,7 @@
<string>context</string>
<string>request</string>
<string>portal</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>None</string>
<string>msg</string>
<string>redirect_url</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_editUnrestricted.xml Thu Aug 28 16:43:11 2008
@@ -72,7 +72,7 @@
\n
request=context.REQUEST\n
portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
\n
# Extra security\n
if request.get(\'field_prefix\', None):\n
@@ -105,7 +105,7 @@
kw = {}\n
encapsulated_editor_list = []\n
MARKER = []\n
-message = N_("Data+Updated.")\n
+message = Base_translateString("Data+Updated.")\n
\n
\n
def parseField(f):\n
@@ -139,7 +139,7 @@
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(context)\n
except ActivityPendingError,e:\n
- message = N_("%s" % e)\n
+ message = Base_translateString("%s" % e)\n
\n
ignore_layout = int(ignore_layout)\n
editable_mode = int(editable_mode)\n
@@ -227,7 +227,7 @@
<string>context</string>
<string>request</string>
<string>portal</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>None</string>
<string>getattr</string>
<string>form</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml Thu Aug 28 16:43:11 2008
@@ -67,14 +67,12 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
-from Products.ERP5Type.Message import Message\n
+from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n
portal = context.getPortalObject()\n
request = context.REQUEST\n
domain_list = []\n
-\n
-N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
selection_name = request.get(\'selection_name\')\n
params = portal.portal_selections.getSelectionParamsFor(selection_name, request)\n
@@ -111,11 +109,11 @@
else:\n
o.setProperty(\'delimiter_type\', 0)\n
\n
- title = N_(\'${day_name} ${date}\',\n
- mapping=dict(day_name=N_(current_date.Day()),\n
+ title = translateString(\'${day_name} ${date}\',\n
+ mapping=dict(day_name=translateString(current_date.Day()),\n
date=current_date.strftime(date_format)))\n
o.setProperty(\'title\', title)\n
- tp = \'%s %s\' % (N_(current_date.Day()), str(current_date))\n
+ tp = \'%s %s\' % (translateString(current_date.Day()), str(current_date))\n
o.setProperty(\'tooltip\', tp)\n
\n
category_list.append(o)\n
@@ -194,7 +192,7 @@
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
- <string>Message</string>
+ <string>translateString</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>string</string>
@@ -204,7 +202,6 @@
<string>portal</string>
<string>request</string>
<string>domain_list</string>
- <string>N_</string>
<string>selection_name</string>
<string>params</string>
<string>DateTime</string>
@@ -243,6 +240,12 @@
<value> <string>Base_generateDayDomain</string> </value>
</item>
<item>
+ <key> <string>uid</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml Thu Aug 28 16:43:11 2008
@@ -70,11 +70,9 @@
# - Weeks always starts at 0H of the last Sunday and finish at 0h of\n
# the next sunday.\n
\n
-from Products.ERP5Type.Message import Message\n
+from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n
-\n
-N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
portal = context.getPortalObject()\n
request = context.REQUEST\n
@@ -122,13 +120,13 @@
else:\n
o.setProperty(\'delimiter_type\', 0)\n
\n
- title = N_(\'${day_name} ${date}\',\n
- mapping=dict(day_name=N_(current_date.Day()),\n
- date=current_date.strftime(date_format)))\n
+ title = translateString(\'${day_name} ${date}\',\n
+ mapping=dict(day_name=translateString(current_date.Day()),\n
+ date=current_date.strftime(date_format)))\n
o.setProperty(\'title\', title)\n
\n
# Defining ToolTip (Optional)\n
- tp = \'%s %s\' % (N_(current_date.Day()), str(current_date))\n
+ tp = \'%s %s\' % (translateString(current_date.Day()), str(current_date))\n
o.setProperty(\'tooltip\', tp)\n
\n
# Defining Link (Optional)\n
@@ -209,12 +207,11 @@
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
- <string>Message</string>
+ <string>translateString</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>string</string>
<string>zfill</string>
- <string>N_</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
@@ -262,6 +259,12 @@
<value> <string>Base_generateWeekDomain</string> </value>
</item>
<item>
+ <key> <string>uid</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml Thu Aug 28 16:43:11 2008
@@ -70,11 +70,9 @@
# - Years always starts at 0h of the current year\'s first day and \n
# finish 0h of the next year\'s first day.\n
\n
-from Products.ERP5Type.Message import Message\n
+from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n
-\n
-N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
portal = context.getPortalObject()\n
request = context.REQUEST\n
@@ -120,9 +118,9 @@
\n
o.setProperty(\'relative_position\', int(current_date))\n
\n
- title = N_(\'${month_name} ${year}\',\n
- mapping=dict(month_name=N_(current_date.Month()),\n
- year=str(current_date.year())))\n
+ title = translateString(\'${month_name} ${year}\',\n
+ mapping=dict(month_name=translateString(current_date.Month()),\n
+ year=str(current_date.year())))\n
o.setProperty(\'title\', title)\n
\n
# Defining Link\n
@@ -204,12 +202,11 @@
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
- <string>Message</string>
+ <string>translateString</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>string</string>
<string>zfill</string>
- <string>N_</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
@@ -258,6 +255,12 @@
<value> <string>Base_generateYearDomain</string> </value>
</item>
<item>
+ <key> <string>uid</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPrintModeItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPrintModeItemList.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPrintModeItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getPrintModeItemList.xml Thu Aug 28 16:43:11 2008
@@ -65,13 +65,12 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>from Products.ERP5Type.Message import Message\n
-N_ = lambda msg: Message(\'erp5_ui\', msg)\n
+ <value> <string>from Products.ERP5Type.Message import translateString\n
\n
return [\n
(\'\', \'\'),\n
- ( N_(\'List of Documents\'), \'list\'),\n
- (N_(\'Default Print of each Document\'), \'list_view\'),\n
+ (translateString(\'List of Documents\'), \'list\'),\n
+ (translateString(\'Default Print of each Document\'), \'list_view\'),\n
]\n
</string> </value>
</item>
@@ -122,8 +121,7 @@
<value>
<tuple>
<string>Products.ERP5Type.Message</string>
- <string>Message</string>
- <string>N_</string>
+ <string>translateString</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getTranslatedWorkflowStateItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getTranslatedWorkflowStateItemList.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getTranslatedWorkflowStateItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getTranslatedWorkflowStateItemList.xml Thu Aug 28 16:43:11 2008
@@ -68,7 +68,7 @@
<value> <string># wf_id : the id of workflow. It can be string, list or tuple.\n
from Products.CMFCore.utils import getToolByName\n
\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
\n
\n
if same_type(wf_id, []) or same_type(wf_id, ()):\n
@@ -87,7 +87,7 @@
if state.title and state.id != \'deleted\':\n
if not state_dict.has_key(state.id):\n
# we hide states without titles\n
- item_list.append((N_(state.title), state.id))\n
+ item_list.append((Base_translateString(state.title), state.id))\n
state_dict[state.id] = None\n
\n
return item_list\n
@@ -148,7 +148,7 @@
<string>getToolByName</string>
<string>_getattr_</string>
<string>context</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>same_type</string>
<string>wf_id_list</string>
<string>state_dict</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.xml Thu Aug 28 16:43:11 2008
@@ -66,12 +66,12 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
checkPerm = context.portal_membership.checkPermission\n
\n
-if jump_from_relative_url is None: \n
- relation = context \n
-else: \n
+if jump_from_relative_url is None:\n
+ relation = context\n
+else:\n
relation = context.getPortalObject().restrictedTraverse(jump_from_relative_url)\n
\n
# FIXME: performance problem getting *all* related documents URL is not scalable.\n
@@ -89,9 +89,10 @@
relation_found = 0\n
if len(related_list) == 0:\n
url = context.absolute_url()\n
- message = N_(\'No %s Related\' % portal_type[0],\n
- default = unicode(N_(\'No ${portal_type} Related.\',\n
- mapping = { \'portal_type\': N_(portal_type[0])}), \'utf8\'))\n
+ message = Base_translateString(\n
+ \'No %s Related\' % portal_type[0],\n
+ default = unicode(Base_translateString(\'No ${portal_type} Related.\',\n
+ mapping = { \'portal_type\': Base_translateString(portal_type[0])}), \'utf8\'))\n
\n
elif len(related_list) == 1:\n
relation_found = 1\n
@@ -107,17 +108,17 @@
else:\n
form_id = \'view\'\n
url = related_object.absolute_url()\n
- message = N_(\n
+ message = Base_translateString(\n
# first, try to get a full translated message with portal types\n
"%s related to %s." % (related_object.getPortalType(), context.getPortalType()),\n
# if not found, fallback to generic translation\n
- default = unicode(N_(\'${this_portal_type} related to ${that_portal_type} : ${that_title}.\',\n
+ default = unicode(Base_translateString(\'${this_portal_type} related to ${that_portal_type} : ${that_title}.\',\n
mapping={"this_portal_type" : related_object.getTranslatedPortalType(),\n
"that_portal_type" : context.getTranslatedPortalType(),\n
"that_title" : context.getTitleOrId() }), \'utf8\'))\n
else :\n
url = context.absolute_url()\n
- message = N_("You are not authorized to view the related document.")\n
+ message = Base_translateString("You are not authorized to view the related document.")\n
relation_found = 0\n
\n
else:\n
@@ -149,7 +150,7 @@
related_object_list.append(obj)\n
if len(related_object_list) == 0 :\n
url = context.absolute_url()\n
- message = N_("You are not authorized to view any related document.")\n
+ message = Base_translateString("You are not authorized to view any related document.")\n
relation_found = 0\n
else :\n
request=context.REQUEST\n
@@ -230,7 +231,7 @@
<string>make_query</string>
<string>_getattr_</string>
<string>context</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>checkPerm</string>
<string>None</string>
<string>relation</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.xml?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_validateRelation.xml Thu Aug 28 16:43:11 2008
@@ -70,7 +70,7 @@
from Products.Formulator.Errors import ValidationError, FormValidationError\n
from ZTUtils import make_query\n
portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
\n
request=context.REQUEST\n
\n
@@ -254,7 +254,7 @@
request.set(\'field_errors\', field_errors)\n
return form(request)\n
else:\n
- message = N_(\'Relation+Unchanged.\')\n
+ message = Base_translateString(\'Relation+Unchanged.\')\n
\n
if redirect_url is None:\n
if not selection_index:\n
@@ -328,7 +328,7 @@
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
- <string>N_</string>
+ <string>Base_translateString</string>
<string>request</string>
<string>None</string>
<string>base_category</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/change_log Thu Aug 28 16:43:11 2008
@@ -1,5 +1,5 @@
2008-08-28 yusei
-* Use N_ function for translation message.
+* Use Base_translateString or translateString instead of N_.
2008-08-11 vincentd
* fix Base_jumpToRelatedObject to avoid a probleme with bad form_id when jumping on a single object
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=23241&r1=23240&r2=23241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Thu Aug 28 16:43:11 2008
@@ -1,1 +1,1 @@
-942
+943
More information about the Erp5-report
mailing list