[Erp5-report] r23242 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 28 16:56:21 CEST 2008


Author: yusei
Date: Thu Aug 28 16:56:17 2008
New Revision: 23242

URL: http://svn.erp5.org?rev=23242&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/Folder_copy.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_create.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getCategoryChildItemListMethodItemList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportStyleItemList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_copy.xml Thu Aug 28 16:56:17 2008
@@ -66,7 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>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
@@ -77,9 +77,9 @@
 \n
 if uids != []:\n
   context.manage_copyObjects(uids=uids, REQUEST=request, RESPONSE=request.RESPONSE)\n
-  message = N_("Item(s)+Copied.")\n
+  message = Base_translateString("Item(s)+Copied.")\n
 else:\n
-  message = N_("Please+select+one+or+more+items+to+copy+first.")\n
+  message = Base_translateString("Please+select+one+or+more+items+to+copy+first.")\n
 return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
 </string> </value>
         </item>
@@ -136,7 +136,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>selected_uids</string>
                             <string>request</string>
                             <string>message</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_create.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_create.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_create.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_create.xml Thu Aug 28 16:56:17 2008
@@ -66,7 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 REQUEST=context.REQUEST\n
 \n
@@ -79,7 +79,7 @@
   # return only a portal_status_message if the IndexError is raised because\n
   # there are no elemnts in context.allowedContentTypes()\n
   if not context.allowedContentTypes():\n
-    message = N_("You are not allowed to add new content in this context.")\n
+    message = Base_translateString("You are not allowed to add new content in this context.")\n
     return REQUEST.RESPONSE.redirect(\'%s?portal_status_message=%s\' % (context.absolute_url(), message))\n
   else:\n
     raise\n
@@ -132,7 +132,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>REQUEST</string>
                             <string>new_object</string>
                             <string>IndexError</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_cut.xml Thu Aug 28 16:56:17 2008
@@ -68,7 +68,7 @@
             <value> <string encoding="cdata"><![CDATA[
 
 portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 def Object_hasRelation(object):\n
   # Check if there is some related objets.\n
@@ -101,16 +101,16 @@
 \n
   if object_used > 0:\n
     if object_used == 1:\n
-      message = N_("Sorry,+1+Item+Is+In+Use.")\n
+      message = Base_translateString("Sorry,+1+Item+Is+In+Use.")\n
     else:\n
-      message = N_("Sorry,+${count}+Items+Are+In+Use.",\n
-                   mapping={\'count\': repr(object_used)})\n
+      message = Base_translateString("Sorry,+${count}+Items+Are+In+Use.",\n
+                                     mapping={\'count\': repr(object_used)})\n
     qs = \'?portal_status_message=%s\' % message  \n
   else:\n
     context.manage_cutObjects(uids=uids, REQUEST=request)\n
-    message = N_("Item(s)+Cut.")\n
+    message = Base_translateString("Item(s)+Cut.")\n
 else:\n
-  message = N_("Please+select+one+or+more+items+to+cut+first.")\n
+  message = Base_translateString("Please+select+one+or+more+items+to+cut+first.")\n
 return request.RESPONSE.redirect(context.absolute_url() + \'/\' + form_id + \'?portal_status_message=%s\' % message)\n
 
 
@@ -163,7 +163,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>Object_hasRelation</string>
                             <string>selected_uids</string>
                             <string>request</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_delete.xml Thu Aug 28 16:56:17 2008
@@ -69,13 +69,13 @@
 
 from ZODB.POSException import ConflictError\n
 portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 selected_uids = portal.portal_selections.updateSelectionCheckedUidList(\n
                             selection_name,listbox_uid,uids)\n
 uids = portal.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
 \n
-error = context.portal_selections.selectionHasChanged(md5_object_uid_list,\n
+error = portal.portal_selections.selectionHasChanged(md5_object_uid_list,\n
                                                       uids)\n
 \n
 REQUEST=context.REQUEST\n
@@ -101,7 +101,7 @@
 \n
 ret_url = context.absolute_url() + \'/\' + form_id\n
 if error:\n
-  message = N_("Sorry+your+selection+has+changed")\n
+  message = Base_translateString("Sorry+your+selection+has+changed")\n
   qs = \'?portal_status_message=%s\' % message\n
 elif uids is not None:\n
   # Check if there is some related objets.\n
@@ -112,10 +112,10 @@
 \n
   if object_used > 0:\n
     if object_used == 1:\n
-      message = N_("Sorry,+1+Item+Is+In+Use.")\n
+      message = Base_translateString("Sorry,+1+Item+Is+In+Use.")\n
     else:\n
-      message = N_("Sorry,+${count}+Items+Are+In+Use.",\n
-                   mapping={\'count\': repr(object_used)})\n
+      message = Base_translateString("Sorry,+${count}+Items+Are+In+Use.",\n
+                                     mapping={\'count\': repr(object_used)})\n
     qs = \'?portal_status_message=%s\' % message  \n
   else:\n
 \n
@@ -137,11 +137,11 @@
     # Remove some objects\n
     try:\n
       if object_to_remove_list != []:\n
-        if context.portal_type==\'Preference\':\n
+        if portal.portal_type==\'Preference\':\n
           context.manage_delObjects(\n
                         ids=[x.getId() for x in object_to_remove_list],\n
                         REQUEST=REQUEST)\n
-          context.portal_caches.clearCacheFactory(\'erp5_ui_medium\')\n
+          portal.portal_caches.clearCacheFactory(\'erp5_ui_medium\')\n
         else:\n
           context.manage_delObjects(\n
                         uids=[x.getUid() for x in object_to_remove_list],\n
@@ -152,17 +152,15 @@
       qs = \'?portal_status_message=%s\' % message\n
     else:\n
       object_ids = [x.getId() for x in object_to_remove_list]\n
-      comment = N_(\'Deleted objects: ${object_ids}\',\n
-                   mapping={\'object_ids\': object_ids})\n
+      comment = Base_translateString(\'Deleted objects: ${object_ids}\',\n
+                                     mapping={\'object_ids\': object_ids})\n
       if \'edit_action\' in [x.get(\'id\', \'\') for x in\n
-                           context.portal_workflow.getActionsFor(context)]:\n
+                           portal.portal_workflow.getActionsFor(context)]:\n
         # record object deletion in workflow history\n
-        context.getPortalObject().portal_workflow.doActionFor(\n
-                      context,\n
-                      \'edit_action\',\n
-                      comment=comment)\n
-\n
-      message = N_("Deleted.")\n
+        portal.portal_workflow.doActionFor(context, \'edit_action\',\n
+                                           comment=comment)\n
+\n
+      message = Base_translateString("Deleted.")\n
 \n
       # Change workflow state of others objects\n
       not_deleted_count = 0\n
@@ -170,9 +168,7 @@
         # Hidden transition (without a message displayed) \n
         # are not returned by getActionsFor\n
         try:\n
-          context.getPortalObject().portal_workflow.doActionFor(\n
-                      object,\n
-                      \'delete_action\')\n
+          portal.portal_workflow.doActionFor(object, \'delete_action\')\n
         except ConflictError:\n
           raise\n
         except:\n
@@ -181,19 +177,19 @@
 \n
       # Generate message\n
       if not_deleted_count == 1:\n
-        message = N_("Sorry+You+Can+Not+Delete+${count}+Item.",\n
-                     mapping={\'count\': not_deleted_count})\n
+        message = Base_translateString("Sorry+You+Can+Not+Delete+${count}+Item.",\n
+                                       mapping={\'count\': not_deleted_count})\n
       elif not_deleted_count > 1:\n
-        message = N_("Sorry+You+Can+Not+Delete+${count}+Items.",\n
-                     mapping={\'count\': not_deleted_count})\n
+        message = Base_translateString("Sorry+You+Can+Not+Delete+${count}+Items.",\n
+                                       mapping={\'count\': not_deleted_count})\n
       qs = \'?portal_status_message=%s\' % message\n
 \n
 else:\n
-  message = N_("Please+select+one+or+more+items+first.")\n
+  message = Base_translateString("Please+select+one+or+more+items+first.")\n
   qs = \'?portal_status_message=%s\' % message\n
 \n
 # make sure nothing is checked after\n
-context.portal_selections.setSelectionCheckedUidsFor(selection_name, [])\n
+portal.portal_selections.setSelectionCheckedUidsFor(selection_name, [])\n
 return REQUEST.RESPONSE.redirect("%s%s" % (ret_url, qs))\n
 
 
@@ -265,7 +261,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>selected_uids</string>
                             <string>error</string>
                             <string>REQUEST</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getCategoryChildItemListMethodItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getCategoryChildItemListMethodItemList.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getCategoryChildItemListMethodItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getCategoryChildItemListMethodItemList.xml Thu Aug 28 16:56:17 2008
@@ -65,15 +65,14 @@
         </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_(\'Logical Path\'), \'getCategoryChildTranslatedLogicalPathItemList\', ),\n
-   (N_(\'Logical Compact Path\'), \'getCategoryChildTranslatedCompactLogicalPathItemList\', ),\n
-   (N_(\'Indented Title\'), \'getCategoryChildTranslatedIndentedTitleItemList\', ),\n
-   (N_(\'Indented Compact Title\'), \'getCategoryChildTranslatedIndentedCompactTitleItemList\', ),\n
+   (translateString(\'Logical Path\'), \'getCategoryChildTranslatedLogicalPathItemList\', ),\n
+   (translateString(\'Logical Compact Path\'), \'getCategoryChildTranslatedCompactLogicalPathItemList\', ),\n
+   (translateString(\'Indented Title\'), \'getCategoryChildTranslatedIndentedTitleItemList\', ),\n
+   (translateString(\'Indented Compact Title\'), \'getCategoryChildTranslatedIndentedCompactTitleItemList\', ),\n
 ]\n
 </string> </value>
         </item>
@@ -124,8 +123,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/Preference_getReportStyleItemList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportStyleItemList.xml?rev=23242&r1=23241&r2=23242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportStyleItemList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Preference_getReportStyleItemList.xml Thu Aug 28 16:56:17 2008
@@ -66,12 +66,12 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 item_list = [(\'\', \'\')]\n
 \n
 for skin_selection in portal.portal_skins.getSkinSelections():\n
-  item_list.append((N_("%s Style" % skin_selection), skin_selection))\n
+  item_list.append((Base_translateString("%s Style" % skin_selection), skin_selection))\n
 \n
 return item_list\n
 </string> </value>
@@ -125,7 +125,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>item_list</string>
                             <string>_getiter_</string>
                             <string>skin_selection</string>

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=23242&r1=23241&r2=23242&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:56:17 2008
@@ -1,1 +1,1 @@
-943
+944




More information about the Erp5-report mailing list