[Erp5-report] r23235 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 28 16:08:18 CEST 2008


Author: yusei
Date: Thu Aug 28 16:08:14 2008
New Revision: 23235

URL: http://svn.erp5.org?rev=23235&view=rev
Log:
2008-08-28 yusei
* Use translateString or Base_translateString instead of N_ for translation message.

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalAccountingTransactionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTranslatedPortalTypeItemList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_jumpToBankAccount.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_deleteEmptyLines.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml
    erp5/trunk/bt5/erp5_accounting/bt/change_log
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml Thu Aug 28 16:08:14 2008
@@ -74,7 +74,7 @@
 portal = context.getPortalObject()\n
 getInventoryList = portal.portal_simulation.getInventoryList\n
 getInventory = portal.portal_simulation.getInventoryAssetPrice\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 inventory_movement_type_list = portal.getPortalInventoryMovementTypeList()\n
 # Balance Movement Type list is all movements that are both inventory movement\n
@@ -589,13 +589,13 @@
   node_uid, node_title, node_id, string_index = getNodeTitleAndId(node_relative_url)\n
   if mirror_section_uid is not MARKER:\n
     if mirror_section_uid is None:\n
-      node_title = \'%s (%s)\' % ( node_title, N_(\'None\'))\n
+      node_title = \'%s (%s)\' % ( node_title, Base_translateString(\'None\'))\n
     else:\n
       third_party = getObject(mirror_section_uid)\n
       node_title = "%s (%s)" % ( node_title, third_party.getTitle() )\n
   elif payment_uid is not MARKER:\n
     if payment_uid is None:\n
-      node_title = \'%s (%s)\' % ( node_title, N_(\'None\'))\n
+      node_title = \'%s (%s)\' % ( node_title, Base_translateString(\'None\'))\n
     else:\n
       payment = getObject(payment_uid)\n
       node_title = "%s (%s)" % ( node_title, payment.getTitle() )\n
@@ -702,7 +702,7 @@
     add_line(account)\n
     \n
   # summary\n
-  add_line(Object(node_title=N_(\'Total for class ${account_class}\',\n
+  add_line(Object(node_title=Base_translateString(\'Total for class ${account_class}\',\n
                    mapping=dict(account_class=account_class or \'???\')),\n
           initial_debit_balance=round(initial_debit_balance, precision),\n
           debit=round(debit, precision),\n
@@ -789,7 +789,7 @@
                             <string>portal</string>
                             <string>getInventoryList</string>
                             <string>getInventory</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>inventory_movement_type_list</string>
                             <string>append</string>
                             <string>$append0</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml Thu Aug 28 16:08:14 2008
@@ -73,10 +73,9 @@
 """\n
 \n
 from Products.ERP5Form.Report import ReportSection\n
-from Products.ERP5Type.Message import Message\n
+from Products.ERP5Type.Message import translateString\n
 request = context.REQUEST\n
 traverse = context.getPortalObject().restrictedTraverse\n
-N_ = lambda msg: Message(\'ui\', msg)\n
 \n
 # for preference info fields on Account_viewAccountingTransactionList\n
 request.set(\'is_accounting_report\', True)\n
@@ -136,7 +135,7 @@
 if from_date and detailed_from_date_summary:\n
   report_section_list.append(\n
     ReportSection(form_id=\'\', level=4,\n
-                  title=N_(\'Not Grouped Lines in Beginning Balance\')))\n
+                  title=translateString(\'Not Grouped Lines in Beginning Balance\')))\n
 \n
   report_section_list.append(\n
     ReportSection(\n
@@ -152,7 +151,7 @@
 \n
   report_section_list.append(\n
     ReportSection(form_id=None, level=4,\n
-                  title=N_(\'Lines in the Period\')))\n
+                  title=translateString(\'Lines in the Period\')))\n
 \n
 report_section_list.append(\n
     ReportSection(\n
@@ -212,12 +211,11 @@
                             <string>Products.ERP5Form.Report</string>
                             <string>ReportSection</string>
                             <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
+                            <string>translateString</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>request</string>
                             <string>traverse</string>
-                            <string>N_</string>
                             <string>True</string>
                             <string>_getitem_</string>
                             <string>at_date</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml Thu Aug 28 16:08:14 2008
@@ -74,7 +74,7 @@
 portal   = context.portal_url.getPortalObject()\n
 cat_tool = portal.portal_categories\n
 sim_tool = portal.portal_simulation\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 \n
 at_date             = request[\'at_date\']\n
 section_category    = request[\'section_category\']\n
@@ -259,7 +259,7 @@
   total_params[\'node_category\'] = \'gap/%s\' % gap\n
 result.append(ReportSection(\n
               path=context.getPhysicalPath(),\n
-              title=N_("Total"),\n
+              title=Base_translateString("Total"),\n
               form_id=\'AccountModule_viewGeneralLedgerSummary\',\n
               selection_name=\'accounting_report_selection\',\n
               selection_params=total_params))\n
@@ -317,7 +317,7 @@
                             <string>portal</string>
                             <string>cat_tool</string>
                             <string>sim_tool</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>_getitem_</string>
                             <string>at_date</string>
                             <string>section_category</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_hashGapItemList.xml Thu Aug 28 16:08:14 2008
@@ -65,7 +65,7 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>N_ = context.Base_translateString\n
+            <value> <string>Base_translateString = context.Base_translateString\n
 split_depth = 2\n
 \n
 def getSubFieldDict():\n
@@ -86,7 +86,7 @@
         # Create property dict (key are field parameters)\n
         sub_field_property_dict = default_sub_field_property_dict.copy()\n
         sub_field_property_dict[\'key\'] = item_key\n
-        sub_field_property_dict[\'title\'] = N_("GAP - ${gap_title}", mapping=dict(\n
+        sub_field_property_dict[\'title\'] = Base_translateString("GAP - ${gap_title}", mapping=dict(\n
                     gap_title=context.portal_categories.resolveCategory(\n
                           \'gap/%s\' % item_key).getTitle()))\n
         sub_field_property_dict[\'required\'] = 0\n
@@ -182,7 +182,7 @@
                             <string>is_right_display</string>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>split_depth</string>
                             <string>getSubFieldDict</string>
                             <string>sub_field_dict</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingPeriod_createBalanceTransaction.xml Thu Aug 28 16:08:14 2008
@@ -71,7 +71,7 @@
 \n
 """\n
 portal = context.getPortalObject()\n
-N_ = portal.Base_translateString\n
+Base_translateString = portal.Base_translateString\n
 \n
 precision_cache = dict()\n
 def roundCurrency(value, resource_relative_url):\n
@@ -96,7 +96,7 @@
                         activate_kw=dict(tag=activity_tag),\n
                         portal_type=\'Balance Transaction\',\n
                         start_date=(at_date + 1).earliestTime(),\n
-                        title=context.getTitle() or N_(\'Balance Transaction\'),\n
+                        title=context.getTitle() or Base_translateString(\'Balance Transaction\'),\n
                         destination_section_value=section,\n
                         resource=section_currency,\n
                         causality_value=context)\n
@@ -319,7 +319,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>dict</string>
                             <string>precision_cache</string>
                             <string>roundCurrency</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createRelatedPaymentTransactionList.xml Thu Aug 28 16:08:14 2008
@@ -67,7 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-from Products.ERP5Type.Message import Message\n
+from Products.ERP5Type.Message import translateString\n
 try:\n
   from zExceptions import Redirect\n
 except:\n
@@ -77,7 +77,6 @@
 getObject = portal.portal_catalog.getObject\n
 countMessage = portal.portal_activities.countMessage\n
 invoice_type_list = portal.getPortalInvoiceTypeList()\n
-N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
 \n
 stool.updateSelectionCheckedUidList(selection_name, listbox_uid, uids)\n
 selection_uid_list = context.portal_selections.getSelectionCheckedUidsFor(\n
@@ -97,7 +96,7 @@
 if len(object_list) >= 1000:\n
   return context.REQUEST.RESPONSE.redirect(\n
     "%s/view?portal_status_message=%s" % (\n
-        context.absolute_url(), N_(\n
+        context.absolute_url(), translateString(\n
          \'Refusing to process more than 1000 objects, check your selection\')))\n
 \n
 tag = \'payment_creation_%s\' % random.randint(0, 1000)\n
@@ -108,8 +107,8 @@
     if countMessage(path=obj.getPath(),\n
                     method_id=\'Invoice_createRelatedPaymentTransaction\'):\n
       raise Redirect, "%s/view?portal_status_message=%s" % (\n
-                context.absolute_url(), N_(\'Payment Creation already in\'\n
-                \' progress, abandon\'))\n
+                context.absolute_url(), translateString(\n
+        \'Payment Creation already in progress, abandon\'))\n
     obj.activate(tag=tag).Invoice_createRelatedPaymentTransaction(\n
                                                   node=node,\n
                                                   payment_mode=payment_mode,\n
@@ -120,14 +119,14 @@
 if not activated:\n
   return context.REQUEST.RESPONSE.redirect(\n
     "%s/view?portal_status_message=%s" % (\n
-        context.absolute_url(), N_(\'No Invoice in your selection\')))\n
+        context.absolute_url(), translateString(\'No Invoice in your selection\')))\n
 \n
 # activate something on the folder\n
 context.activate(after_tag=tag).getTitle()\n
 \n
 return context.REQUEST.RESPONSE.redirect(\n
     "%s/view?portal_status_message=%s" % (\n
-        context.absolute_url(), N_(\n
+        context.absolute_url(), translateString(\n
           \'Payments Creation for ${activated_invoice_count} on\'\n
           \' ${total_selection_count} Invoices in Progress\',\n
           mapping=dict(activated_invoice_count=activated,\n
@@ -184,7 +183,7 @@
                             <string>listbox_uid</string>
                             <string>selection_name</string>
                             <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
+                            <string>translateString</string>
                             <string>zExceptions</string>
                             <string>Redirect</string>
                             <string>_getattr_</string>
@@ -194,7 +193,6 @@
                             <string>getObject</string>
                             <string>countMessage</string>
                             <string>invoice_type_list</string>
-                            <string>N_</string>
                             <string>selection_uid_list</string>
                             <string>append</string>
                             <string>$append0</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalAccountingTransactionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalAccountingTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalAccountingTransactionList.xml Thu Aug 28 16:08:14 2008
@@ -85,7 +85,7 @@
 \n
 request = context.REQUEST\n
 selection_name = "accounting_selection"\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 result = []\n
 journal_total_debit  = 0\n
 journal_total_credit = 0\n
@@ -146,18 +146,18 @@
     date = transaction.getStopDate()\n
 \n
   lines = []\n
-  transaction_dict = { \\\n
-      \'date\'       : context.Base_FormatDate( date ),\n
-      \'lines\'      : lines,\n
-      \'description\': N_( "${transaction_title} (Transaction Reference "   +\n
-                         "= ${transaction_reference},\\n Creation Date = " +\n
-                         "${creation_date} \\n Currency = ${currency_title})"\n
-                       , mapping = {\n
-          "transaction_title": unicode(transaction.getTitle() or \'\', \'utf8\'),\n
-          "transaction_reference": unicode(specific_reference or \'\', \'utf8\'),\n
-          "creation_date": context.Base_FormatDate(\n
-                                        transaction.getCreationDate()),\n
-          "currency_title": transaction.getResourceTitle() or \'\' })}\n
+  transaction_dict = {\n
+    \'date\'       : context.Base_FormatDate( date ),\n
+    \'lines\'      : lines,\n
+    \'description\': Base_translateString(\n
+    "${transaction_title} (Transaction Reference "\n
+    "= ${transaction_reference},\\n Creation Date = "\n
+    "${creation_date} \\n Currency = ${currency_title})",\n
+    mapping = {\n
+    "transaction_title": unicode(transaction.getTitle() or \'\', \'utf8\'),\n
+    "transaction_reference": unicode(specific_reference or \'\', \'utf8\'),\n
+    "creation_date": context.Base_FormatDate(transaction.getCreationDate()),\n
+    "currency_title": transaction.getResourceTitle() or \'\' })}\n
 \n
   result.append(transaction_dict)\n
   transaction_lines = transaction.contentValues(\n
@@ -281,7 +281,7 @@
                             <string>context</string>
                             <string>request</string>
                             <string>selection_name</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>result</string>
                             <string>journal_total_debit</string>
                             <string>journal_total_credit</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getJournalReportSectionList.xml Thu Aug 28 16:08:14 2008
@@ -69,7 +69,7 @@
 
 from Products.ERP5Form.Report import ReportSection\n
 request = container.REQUEST\n
-N_ = container.Base_translateString\n
+Base_translateString = container.Base_translateString\n
 \n
 portal_type = request[\'portal_type\']\n
 simulation_state = request[\'simulation_state\']\n
@@ -109,7 +109,7 @@
 \n
 return [ReportSection(\n
           path=context.getPhysicalPath(),\n
-          title=N_(\'Transactions\'),\n
+          title=Base_translateString(\'Transactions\'),\n
           selection_name=\'journal_selection\',\n
           form_id=\'AccountingTransactionModule_viewJournalSection\',\n
           selection_columns=selection_columns,\n
@@ -170,7 +170,7 @@
                             <string>_getattr_</string>
                             <string>container</string>
                             <string>request</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>_getitem_</string>
                             <string>portal_type</string>
                             <string>simulation_state</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTranslatedPortalTypeItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTranslatedPortalTypeItemList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTranslatedPortalTypeItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTranslatedPortalTypeItemList.xml Thu Aug 28 16:08:14 2008
@@ -66,11 +66,11 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>portal_type_list = context.getPortalAccountingTransactionTypeList()\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 \n
 item_list = []\n
 for portal_type in portal_type_list : \n
-  item_list.append((N_(portal_type), portal_type))\n
+  item_list.append((Base_translateString(portal_type), portal_type))\n
 \n
 return item_list\n
 </string> </value>
@@ -118,7 +118,7 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal_type_list</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>item_list</string>
                             <string>_getiter_</string>
                             <string>portal_type</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_jumpToBankAccount.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_jumpToBankAccount.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_jumpToBankAccount.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_jumpToBankAccount.xml Thu Aug 28 16:08:14 2008
@@ -66,7 +66,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string># Jump to a bank account of the current organisation\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 request=context.REQUEST\n
 portal = context.getPortalObject()\n
 organisation = portal.restrictedTraverse(\n
@@ -83,9 +83,7 @@
     return context.Base_jumpToRelatedObjectList(\n
           uids=selection_uid_list, REQUEST=request)\n
 \n
-return context.Base_redirect(form_id,\n
-          keep_items=dict(portal_status_message=\n
-                             N_(\'No Bank Account For Current Organisation\')))\n
+return context.Base_redirect(form_id, keep_items=dict(portal_status_message=Base_translateString(\'No Bank Account For Current Organisation\')))\n
 </string> </value>
         </item>
         <item>
@@ -131,7 +129,7 @@
                             <string>form_id</string>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>request</string>
                             <string>portal</string>
                             <string>organisation</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_setGroupingReference.xml Thu Aug 28 16:08:14 2008
@@ -73,8 +73,8 @@
 portal = context.getPortalObject()\n
 getobject = portal.portal_catalog.getobject\n
 stool = portal.portal_selections\n
-N_ = portal.Base_translateString\n
-psm = N_(\'Nothing matches\')\n
+Base_translateString = portal.Base_translateString\n
+psm = Base_translateString(\'Nothing matches\')\n
 request = container.REQUEST\n
 precision = request.get(\'precision\', 2)\n
 \n
@@ -113,7 +113,7 @@
 request.set(\'total_selected_amount\', total_selected_amount)\n
 \n
 if update:\n
-  request.set(\'portal_status_message\', N_(\'Updated\'))\n
+  request.set(\'portal_status_message\', Base_translateString(\'Updated\'))\n
   return context.AccountingTransactionModule_viewGroupingFastInputDialog(request)\n
   \n
 \n
@@ -122,8 +122,8 @@
   grouped_line_list = context.AccountingTransaction_guessGroupedLines(\n
                         accounting_transaction_line_uid_list=uids)\n
   if grouped_line_list:\n
-    psm = N_(\'${grouped_line_count} Lines Grouped\',\n
-          mapping=dict(grouped_line_count=len(grouped_line_list)))\n
+    psm = Base_translateString(\'${grouped_line_count} Lines Grouped\',\n
+                               mapping=dict(grouped_line_count=len(grouped_line_list)))\n
 \n
     # make sure nothing will be checked next time\n
     stool.setSelectionCheckedUidsFor(list_selection_name, [])\n
@@ -176,8 +176,8 @@
     if line.getGroupingReference():\n
       ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference())\n
   \n
-  psm = N_(\'${ungrouped_line_count} Lines Ungrouped\',\n
-            mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))\n
+  psm = Base_translateString(\'${ungrouped_line_count} Lines Ungrouped\',\n
+                             mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))\n
 \n
   # make sure nothing will be checked next time\n
   stool.setSelectionCheckedUidsFor(list_selection_name, [])\n
@@ -250,7 +250,7 @@
                             <string>portal</string>
                             <string>getobject</string>
                             <string>stool</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>psm</string>
                             <string>container</string>
                             <string>request</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_addAccountingTransactionLine.xml Thu Aug 28 16:08:14 2008
@@ -69,10 +69,10 @@
 and redirects to the accounting transaction view which is easyier to\n
 use.\n
 \'\'\'\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 context.newContent(portal_type=portal_type)\n
 return context.Base_redirect(\'view\', keep_items=dict(\n
-       portal_status_message=N_(\'Accounting Transaction Line added.\'),\n
+       portal_status_message=Base_translateString(\'Accounting Transaction Line added.\'),\n
        selection_name=selection_name,\n
        selection_index=selection_index))\n
 </string> </value>
@@ -122,7 +122,7 @@
                             <string>selection_index</string>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>dict</string>
                           </tuple>
                         </value>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.xml Thu Aug 28 16:08:14 2008
@@ -67,7 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string>""" Create a reversal transaction from current tansaction. """\n
 \n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 accounting_module = context.getPortalObject().accounting_module\n
 is_source = context.AccountingTransaction_isSourceView()\n
 \n
@@ -85,12 +85,12 @@
     destination_section=context.getDestinationSection(),\n
     source_payment=context.getSourcePayment(),\n
     destination_payment=context.getDestinationPayment(),\n
-    title = N_("Reversal Transaction for ${title}",\n
-              mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\')}),\n
-    description = N_(\n
-      "Reversal Transaction for ${title} (${specific_reference})",\n
-      mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\'),\n
-               \'specific_reference\': specific_reference}),\n
+    title = Base_translateString("Reversal Transaction for ${title}",\n
+                                 mapping={\'title\':unicode(context.getTitleOrId(), \'utf8\')}),\n
+    description = Base_translateString(\n
+  "Reversal Transaction for ${title} (${specific_reference})",\n
+  mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\'),\n
+           \'specific_reference\': specific_reference}),\n
     resource=context.getResource(),\n
     reference=context.getReference(),\n
     causality_value_list=causality_value_list,\n
@@ -139,8 +139,8 @@
 \n
 return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n
               (reversal.absolute_url(),\n
-               N_("Reversal Transaction for ${specific_reference} created.",\n
-             mapping={\'specific_reference\': specific_reference})))\n
+               Base_translateString("Reversal Transaction for ${specific_reference} created.",\n
+                                    mapping={\'specific_reference\': specific_reference})))\n
 </string> </value>
         </item>
         <item>
@@ -185,7 +185,7 @@
                           <tuple>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>accounting_module</string>
                             <string>is_source</string>
                             <string>specific_reference</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_deleteEmptyLines.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_deleteEmptyLines.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_deleteEmptyLines.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_deleteEmptyLines.xml Thu Aug 28 16:08:14 2008
@@ -67,8 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string>"""Deletes all empty (ie. with balance == 0) lines in an accounting transaction\n
 """\n
-from Products.ERP5Type.Message import Message\n
-N_ = lambda msg: Message(\'erp5_ui\', msg)\n
+from Products.ERP5Type.Message import translateString\n
 lines_portal_type = context.getPortalAccountingMovementTypeList()\n
 transaction = context.getObject()\n
 transaction_lines = transaction.objectValues(portal_type=lines_portal_type)\n
@@ -92,7 +91,7 @@
 \n
 if redirect:\n
   context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" % (\n
-      transaction.absolute_url(), N_(\'Empty+Lines+Deleted.\')))\n
+    transaction.absolute_url(), translateString(\'Empty+Lines+Deleted.\')))\n
 </string> </value>
         </item>
         <item>
@@ -137,8 +136,7 @@
                           <tuple>
                             <string>redirect</string>
                             <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
-                            <string>N_</string>
+                            <string>translateString</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>lines_portal_type</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml Thu Aug 28 16:08:14 2008
@@ -72,7 +72,7 @@
 from DateTime import DateTime\n
 # translate with Base_translateString which is a bit more robust during\n
 # activities, because it doesn\'t rely on REQUEST[\'PARENTS\']\n
-N_ = context.Base_translateString\n
+Base_translateString = context.Base_translateString\n
 \n
 date = DateTime()\n
 portal = context.getPortalObject()\n
@@ -98,12 +98,12 @@
   if not batch_mode:\n
     return context.REQUEST.RESPONSE.redirect(\n
       "%s/view?portal_status_message=%s" % (\n
-        context.absolute_url(), N_(\'Nothing more to pay\')))\n
+      context.absolute_url(), Base_translateString(\'Nothing more to pay\')))\n
   return None\n
 \n
 related_payment = portal.accounting_module.newContent(\n
   portal_type="Payment Transaction",\n
-  title=str(N_("Payment of ${invoice_title}",\n
+  title=str(Base_translateString("Payment of ${invoice_title}",\n
           mapping=dict(invoice_title=unicode((context.getReference() or\n
                                               context.getTitle() or \'\'),\n
                                               \'utf8\', \'repr\')))),\n
@@ -158,7 +158,8 @@
 if not batch_mode:\n
   return context.REQUEST.RESPONSE.redirect(\n
     "%s/view?portal_status_message=%s" % (\n
-        related_payment.absolute_url(), N_(\'Related Payment Created\')))\n
+    related_payment.absolute_url(),\n
+    Base_translateString(\'Related Payment Created\')))\n
 else:\n
   return related_payment\n
 </string> </value>
@@ -217,7 +218,7 @@
                             <string>DateTime</string>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>N_</string>
+                            <string>Base_translateString</string>
                             <string>portal</string>
                             <string>payment_dict</string>
                             <string>is_source</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml Thu Aug 28 16:08:14 2008
@@ -67,11 +67,10 @@
             <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.Log import log\n
 portal = context.getPortalObject()\n
 params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n
-N_ = lambda msg: Message(\'erp5_ui\', msg)\n
 \n
 if params.get(\'precision\', None) is not None:\n
   # listbox editable float fields uses request/precision to format the value.\n
@@ -174,8 +173,8 @@
         total_price=net_balance,\n
         running_total_price=net_balance,\n
         is_previous_balance=True,\n
-        Movement_getSpecificReference=u\'%s\' % N_(\'Previous Balance\'),\n
-        Movement_getExplanationTitle=u\'%s\' % N_(\'Previous Balance\'),\n
+        Movement_getSpecificReference=u\'%s\' % translateString(\'Previous Balance\'),\n
+        Movement_getExplanationTitle=u\'%s\' % translateString(\'Previous Balance\'),\n
         Movement_getExplanationTranslatedPortalType=\'\',\n
         Movement_getExplanationReference=\'\',\n
         Movement_getMirrorSectionTitle=\'\',\n
@@ -271,14 +270,13 @@
                             <string>selection_name</string>
                             <string>kw</string>
                             <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
+                            <string>translateString</string>
                             <string>Products.ERP5Type.Log</string>
                             <string>log</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>portal</string>
                             <string>params</string>
-                            <string>N_</string>
                             <string>None</string>
                             <string>_getitem_</string>
                             <string>_write_</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml Thu Aug 28 16:08:14 2008
@@ -65,17 +65,16 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>from Products.ERP5Type.Message import Message\n
+            <value> <string>from Products.ERP5Type.Message import translateString\n
 \n
 # Return Message object, so that this message will be translated when it is rendered later.\n
-N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
 \n
 payment_transaction = context\n
 \n
 if payment_transaction.getSimulationState() == "draft":\n
   payment_transaction.portal_workflow.doActionFor(\n
      payment_transaction, \'plan_action\',\n
-     comment=N_("Initialized by Delivery Builder"))\n
+     comment=translateString("Initialized by Delivery Builder"))\n
 </string> </value>
         </item>
         <item>
@@ -119,8 +118,7 @@
                         <value>
                           <tuple>
                             <string>Products.ERP5Type.Message</string>
-                            <string>Message</string>
-                            <string>N_</string>
+                            <string>translateString</string>
                             <string>context</string>
                             <string>payment_transaction</string>
                             <string>_getattr_</string>

Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log Thu Aug 28 16:08:14 2008
@@ -1,5 +1,5 @@
 2008-08-28 yusei
-* Use N_ for translation message.
+* Use translateString or Base_translateString instead of N_ for translation message.
 
 2008-07-02 yusei
 * Update title of Account_view.reference.

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=23235&r1=23234&r2=23235&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Thu Aug 28 16:08:14 2008
@@ -1,1 +1,1 @@
-748
+749




More information about the Erp5-report mailing list