Commit e4f59d0b authored by Yusei Tahara's avatar Yusei Tahara

2008-08-28 yusei

* Use translateString or Base_translateString instead of N_ for translation message.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23235 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 025b2311
...@@ -74,7 +74,7 @@ request = container.REQUEST\n ...@@ -74,7 +74,7 @@ request = container.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
getInventoryList = portal.portal_simulation.getInventoryList\n getInventoryList = portal.portal_simulation.getInventoryList\n
getInventory = portal.portal_simulation.getInventoryAssetPrice\n getInventory = portal.portal_simulation.getInventoryAssetPrice\n
N_ = portal.Base_translateString\n Base_translateString = portal.Base_translateString\n
\n \n
inventory_movement_type_list = portal.getPortalInventoryMovementTypeList()\n inventory_movement_type_list = portal.getPortalInventoryMovementTypeList()\n
# Balance Movement Type list is all movements that are both inventory movement\n # Balance Movement Type list is all movements that are both inventory movement\n
...@@ -589,13 +589,13 @@ for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n ...@@ -589,13 +589,13 @@ for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n
node_uid, node_title, node_id, string_index = getNodeTitleAndId(node_relative_url)\n 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 not MARKER:\n
if mirror_section_uid is None:\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 else:\n
third_party = getObject(mirror_section_uid)\n third_party = getObject(mirror_section_uid)\n
node_title = "%s (%s)" % ( node_title, third_party.getTitle() )\n node_title = "%s (%s)" % ( node_title, third_party.getTitle() )\n
elif payment_uid is not MARKER:\n elif payment_uid is not MARKER:\n
if payment_uid is None:\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 else:\n
payment = getObject(payment_uid)\n payment = getObject(payment_uid)\n
node_title = "%s (%s)" % ( node_title, payment.getTitle() )\n node_title = "%s (%s)" % ( node_title, payment.getTitle() )\n
...@@ -702,7 +702,7 @@ for account_class in account_class_list:\n ...@@ -702,7 +702,7 @@ for account_class in account_class_list:\n
add_line(account)\n add_line(account)\n
\n \n
# summary\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 mapping=dict(account_class=account_class or \'???\')),\n
initial_debit_balance=round(initial_debit_balance, precision),\n initial_debit_balance=round(initial_debit_balance, precision),\n
debit=round(debit, precision),\n debit=round(debit, precision),\n
...@@ -789,7 +789,7 @@ return new_line_list\n ...@@ -789,7 +789,7 @@ return new_line_list\n
<string>portal</string> <string>portal</string>
<string>getInventoryList</string> <string>getInventoryList</string>
<string>getInventory</string> <string>getInventory</string>
<string>N_</string> <string>Base_translateString</string>
<string>inventory_movement_type_list</string> <string>inventory_movement_type_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
...@@ -73,10 +73,9 @@ Account is the combination of :\n ...@@ -73,10 +73,9 @@ Account is the combination of :\n
"""\n """\n
\n \n
from Products.ERP5Form.Report import ReportSection\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 request = context.REQUEST\n
traverse = context.getPortalObject().restrictedTraverse\n traverse = context.getPortalObject().restrictedTraverse\n
N_ = lambda msg: Message(\'ui\', msg)\n
\n \n
# for preference info fields on Account_viewAccountingTransactionList\n # for preference info fields on Account_viewAccountingTransactionList\n
request.set(\'is_accounting_report\', True)\n request.set(\'is_accounting_report\', True)\n
...@@ -136,7 +135,7 @@ report_section_list = []\n ...@@ -136,7 +135,7 @@ report_section_list = []\n
if from_date and detailed_from_date_summary:\n if from_date and detailed_from_date_summary:\n
report_section_list.append(\n report_section_list.append(\n
ReportSection(form_id=\'\', level=4,\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 \n
report_section_list.append(\n report_section_list.append(\n
ReportSection(\n ReportSection(\n
...@@ -152,7 +151,7 @@ if from_date and detailed_from_date_summary:\n ...@@ -152,7 +151,7 @@ if from_date and detailed_from_date_summary:\n
\n \n
report_section_list.append(\n report_section_list.append(\n
ReportSection(form_id=None, level=4,\n ReportSection(form_id=None, level=4,\n
title=N_(\'Lines in the Period\')))\n title=translateString(\'Lines in the Period\')))\n
\n \n
report_section_list.append(\n report_section_list.append(\n
ReportSection(\n ReportSection(\n
...@@ -212,12 +211,11 @@ return report_section_list\n ...@@ -212,12 +211,11 @@ return report_section_list\n
<string>Products.ERP5Form.Report</string> <string>Products.ERP5Form.Report</string>
<string>ReportSection</string> <string>ReportSection</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>traverse</string> <string>traverse</string>
<string>N_</string>
<string>True</string> <string>True</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>at_date</string> <string>at_date</string>
......
...@@ -74,7 +74,7 @@ request = context.REQUEST\n ...@@ -74,7 +74,7 @@ request = context.REQUEST\n
portal = context.portal_url.getPortalObject()\n portal = context.portal_url.getPortalObject()\n
cat_tool = portal.portal_categories\n cat_tool = portal.portal_categories\n
sim_tool = portal.portal_simulation\n sim_tool = portal.portal_simulation\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
\n \n
at_date = request[\'at_date\']\n at_date = request[\'at_date\']\n
section_category = request[\'section_category\']\n section_category = request[\'section_category\']\n
...@@ -259,7 +259,7 @@ if gap:\n ...@@ -259,7 +259,7 @@ if gap:\n
total_params[\'node_category\'] = \'gap/%s\' % gap\n total_params[\'node_category\'] = \'gap/%s\' % gap\n
result.append(ReportSection(\n result.append(ReportSection(\n
path=context.getPhysicalPath(),\n path=context.getPhysicalPath(),\n
title=N_("Total"),\n title=Base_translateString("Total"),\n
form_id=\'AccountModule_viewGeneralLedgerSummary\',\n form_id=\'AccountModule_viewGeneralLedgerSummary\',\n
selection_name=\'accounting_report_selection\',\n selection_name=\'accounting_report_selection\',\n
selection_params=total_params))\n selection_params=total_params))\n
...@@ -317,7 +317,7 @@ return result\n ...@@ -317,7 +317,7 @@ return result\n
<string>portal</string> <string>portal</string>
<string>cat_tool</string> <string>cat_tool</string>
<string>sim_tool</string> <string>sim_tool</string>
<string>N_</string> <string>Base_translateString</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>at_date</string> <string>at_date</string>
<string>section_category</string> <string>section_category</string>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>N_ = context.Base_translateString\n <value> <string>Base_translateString = context.Base_translateString\n
split_depth = 2\n split_depth = 2\n
\n \n
def getSubFieldDict():\n def getSubFieldDict():\n
...@@ -86,7 +86,7 @@ def getSubFieldDict():\n ...@@ -86,7 +86,7 @@ def getSubFieldDict():\n
# Create property dict (key are field parameters)\n # Create property dict (key are field parameters)\n
sub_field_property_dict = default_sub_field_property_dict.copy()\n sub_field_property_dict = default_sub_field_property_dict.copy()\n
sub_field_property_dict[\'key\'] = item_key\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_title=context.portal_categories.resolveCategory(\n
\'gap/%s\' % item_key).getTitle()))\n \'gap/%s\' % item_key).getTitle()))\n
sub_field_property_dict[\'required\'] = 0\n sub_field_property_dict[\'required\'] = 0\n
...@@ -182,7 +182,7 @@ return sub_field_dict.values()\n ...@@ -182,7 +182,7 @@ return sub_field_dict.values()\n
<string>is_right_display</string> <string>is_right_display</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>N_</string> <string>Base_translateString</string>
<string>split_depth</string> <string>split_depth</string>
<string>getSubFieldDict</string> <string>getSubFieldDict</string>
<string>sub_field_dict</string> <string>sub_field_dict</string>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
\n \n
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n Base_translateString = portal.Base_translateString\n
\n \n
precision_cache = dict()\n precision_cache = dict()\n
def roundCurrency(value, resource_relative_url):\n def roundCurrency(value, resource_relative_url):\n
...@@ -96,7 +96,7 @@ balance_transaction = portal.accounting_module.newContent(\n ...@@ -96,7 +96,7 @@ balance_transaction = portal.accounting_module.newContent(\n
activate_kw=dict(tag=activity_tag),\n activate_kw=dict(tag=activity_tag),\n
portal_type=\'Balance Transaction\',\n portal_type=\'Balance Transaction\',\n
start_date=(at_date + 1).earliestTime(),\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 destination_section_value=section,\n
resource=section_currency,\n resource=section_currency,\n
causality_value=context)\n causality_value=context)\n
...@@ -319,7 +319,7 @@ context.activate(after_tag=activity_tag).getTitle()\n ...@@ -319,7 +319,7 @@ context.activate(after_tag=activity_tag).getTitle()\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>N_</string> <string>Base_translateString</string>
<string>dict</string> <string>dict</string>
<string>precision_cache</string> <string>precision_cache</string>
<string>roundCurrency</string> <string>roundCurrency</string>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import translateString\n
try:\n try:\n
from zExceptions import Redirect\n from zExceptions import Redirect\n
except:\n except:\n
...@@ -77,7 +77,6 @@ stool = portal.portal_selections\n ...@@ -77,7 +77,6 @@ stool = portal.portal_selections\n
getObject = portal.portal_catalog.getObject\n getObject = portal.portal_catalog.getObject\n
countMessage = portal.portal_activities.countMessage\n countMessage = portal.portal_activities.countMessage\n
invoice_type_list = portal.getPortalInvoiceTypeList()\n invoice_type_list = portal.getPortalInvoiceTypeList()\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
\n \n
stool.updateSelectionCheckedUidList(selection_name, listbox_uid, uids)\n stool.updateSelectionCheckedUidList(selection_name, listbox_uid, uids)\n
selection_uid_list = context.portal_selections.getSelectionCheckedUidsFor(\n selection_uid_list = context.portal_selections.getSelectionCheckedUidsFor(\n
...@@ -97,7 +96,7 @@ stool.setSelectionParamsFor(\'accounting_create_related_payment_selection\',\n ...@@ -97,7 +96,7 @@ stool.setSelectionParamsFor(\'accounting_create_related_payment_selection\',\n
if len(object_list) >= 1000:\n if len(object_list) >= 1000:\n
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\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 \'Refusing to process more than 1000 objects, check your selection\')))\n
\n \n
tag = \'payment_creation_%s\' % random.randint(0, 1000)\n tag = \'payment_creation_%s\' % random.randint(0, 1000)\n
...@@ -108,8 +107,8 @@ for obj in object_list:\n ...@@ -108,8 +107,8 @@ for obj in object_list:\n
if countMessage(path=obj.getPath(),\n if countMessage(path=obj.getPath(),\n
method_id=\'Invoice_createRelatedPaymentTransaction\'):\n method_id=\'Invoice_createRelatedPaymentTransaction\'):\n
raise Redirect, "%s/view?portal_status_message=%s" % (\n raise Redirect, "%s/view?portal_status_message=%s" % (\n
context.absolute_url(), N_(\'Payment Creation already in\'\n context.absolute_url(), translateString(\n
\' progress, abandon\'))\n \'Payment Creation already in progress, abandon\'))\n
obj.activate(tag=tag).Invoice_createRelatedPaymentTransaction(\n obj.activate(tag=tag).Invoice_createRelatedPaymentTransaction(\n
node=node,\n node=node,\n
payment_mode=payment_mode,\n payment_mode=payment_mode,\n
...@@ -120,14 +119,14 @@ for obj in object_list:\n ...@@ -120,14 +119,14 @@ for obj in object_list:\n
if not activated:\n if not activated:\n
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\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 \n
# activate something on the folder\n # activate something on the folder\n
context.activate(after_tag=tag).getTitle()\n context.activate(after_tag=tag).getTitle()\n
\n \n
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\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 \'Payments Creation for ${activated_invoice_count} on\'\n
\' ${total_selection_count} Invoices in Progress\',\n \' ${total_selection_count} Invoices in Progress\',\n
mapping=dict(activated_invoice_count=activated,\n mapping=dict(activated_invoice_count=activated,\n
...@@ -184,7 +183,7 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -184,7 +183,7 @@ return context.REQUEST.RESPONSE.redirect(\n
<string>listbox_uid</string> <string>listbox_uid</string>
<string>selection_name</string> <string>selection_name</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>zExceptions</string> <string>zExceptions</string>
<string>Redirect</string> <string>Redirect</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -194,7 +193,6 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -194,7 +193,6 @@ return context.REQUEST.RESPONSE.redirect(\n
<string>getObject</string> <string>getObject</string>
<string>countMessage</string> <string>countMessage</string>
<string>invoice_type_list</string> <string>invoice_type_list</string>
<string>N_</string>
<string>selection_uid_list</string> <string>selection_uid_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
\n \n
request = context.REQUEST\n request = context.REQUEST\n
selection_name = "accounting_selection"\n selection_name = "accounting_selection"\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
result = []\n result = []\n
journal_total_debit = 0\n journal_total_debit = 0\n
journal_total_credit = 0\n journal_total_credit = 0\n
...@@ -146,17 +146,17 @@ for transaction in transaction_list:\n ...@@ -146,17 +146,17 @@ for transaction in transaction_list:\n
date = transaction.getStopDate()\n date = transaction.getStopDate()\n
\n \n
lines = []\n lines = []\n
transaction_dict = { \\\n transaction_dict = {\n
\'date\' : context.Base_FormatDate( date ),\n \'date\' : context.Base_FormatDate( date ),\n
\'lines\' : lines,\n \'lines\' : lines,\n
\'description\': N_( "${transaction_title} (Transaction Reference " +\n \'description\': Base_translateString(\n
"= ${transaction_reference},\\n Creation Date = " +\n "${transaction_title} (Transaction Reference "\n
"${creation_date} \\n Currency = ${currency_title})"\n "= ${transaction_reference},\\n Creation Date = "\n
, mapping = {\n "${creation_date} \\n Currency = ${currency_title})",\n
mapping = {\n
"transaction_title": unicode(transaction.getTitle() or \'\', \'utf8\'),\n "transaction_title": unicode(transaction.getTitle() or \'\', \'utf8\'),\n
"transaction_reference": unicode(specific_reference or \'\', \'utf8\'),\n "transaction_reference": unicode(specific_reference or \'\', \'utf8\'),\n
"creation_date": context.Base_FormatDate(\n "creation_date": context.Base_FormatDate(transaction.getCreationDate()),\n
transaction.getCreationDate()),\n
"currency_title": transaction.getResourceTitle() or \'\' })}\n "currency_title": transaction.getResourceTitle() or \'\' })}\n
\n \n
result.append(transaction_dict)\n result.append(transaction_dict)\n
...@@ -281,7 +281,7 @@ return result + [{ "journal_total_debit" : journal_total_debit\n ...@@ -281,7 +281,7 @@ return result + [{ "journal_total_debit" : journal_total_debit\n
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>selection_name</string> <string>selection_name</string>
<string>N_</string> <string>Base_translateString</string>
<string>result</string> <string>result</string>
<string>journal_total_debit</string> <string>journal_total_debit</string>
<string>journal_total_credit</string> <string>journal_total_credit</string>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
request = container.REQUEST\n request = container.REQUEST\n
N_ = container.Base_translateString\n Base_translateString = container.Base_translateString\n
\n \n
portal_type = request[\'portal_type\']\n portal_type = request[\'portal_type\']\n
simulation_state = request[\'simulation_state\']\n simulation_state = request[\'simulation_state\']\n
...@@ -109,7 +109,7 @@ else:\n ...@@ -109,7 +109,7 @@ else:\n
\n \n
return [ReportSection(\n return [ReportSection(\n
path=context.getPhysicalPath(),\n path=context.getPhysicalPath(),\n
title=N_(\'Transactions\'),\n title=Base_translateString(\'Transactions\'),\n
selection_name=\'journal_selection\',\n selection_name=\'journal_selection\',\n
form_id=\'AccountingTransactionModule_viewJournalSection\',\n form_id=\'AccountingTransactionModule_viewJournalSection\',\n
selection_columns=selection_columns,\n selection_columns=selection_columns,\n
...@@ -170,7 +170,7 @@ return [ReportSection(\n ...@@ -170,7 +170,7 @@ return [ReportSection(\n
<string>_getattr_</string> <string>_getattr_</string>
<string>container</string> <string>container</string>
<string>request</string> <string>request</string>
<string>N_</string> <string>Base_translateString</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>portal_type</string> <string>portal_type</string>
<string>simulation_state</string> <string>simulation_state</string>
......
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal_type_list = context.getPortalAccountingTransactionTypeList()\n <value> <string>portal_type_list = context.getPortalAccountingTransactionTypeList()\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
\n \n
item_list = []\n item_list = []\n
for portal_type in portal_type_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 \n
return item_list\n return item_list\n
</string> </value> </string> </value>
...@@ -118,7 +118,7 @@ return item_list\n ...@@ -118,7 +118,7 @@ return item_list\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal_type_list</string> <string>portal_type_list</string>
<string>N_</string> <string>Base_translateString</string>
<string>item_list</string> <string>item_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>portal_type</string> <string>portal_type</string>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># Jump to a bank account of the current organisation\n <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 request=context.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
organisation = portal.restrictedTraverse(\n organisation = portal.restrictedTraverse(\n
...@@ -83,9 +83,7 @@ if organisation is not None :\n ...@@ -83,9 +83,7 @@ if organisation is not None :\n
return context.Base_jumpToRelatedObjectList(\n return context.Base_jumpToRelatedObjectList(\n
uids=selection_uid_list, REQUEST=request)\n uids=selection_uid_list, REQUEST=request)\n
\n \n
return context.Base_redirect(form_id,\n return context.Base_redirect(form_id, keep_items=dict(portal_status_message=Base_translateString(\'No Bank Account For Current Organisation\')))\n
keep_items=dict(portal_status_message=\n
N_(\'No Bank Account For Current Organisation\')))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -131,7 +129,7 @@ return context.Base_redirect(form_id,\n ...@@ -131,7 +129,7 @@ return context.Base_redirect(form_id,\n
<string>form_id</string> <string>form_id</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>N_</string> <string>Base_translateString</string>
<string>request</string> <string>request</string>
<string>portal</string> <string>portal</string>
<string>organisation</string> <string>organisation</string>
......
...@@ -73,8 +73,8 @@ from ZODB.POSException import ConflictError\n ...@@ -73,8 +73,8 @@ from ZODB.POSException import ConflictError\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
getobject = portal.portal_catalog.getobject\n getobject = portal.portal_catalog.getobject\n
stool = portal.portal_selections\n stool = portal.portal_selections\n
N_ = portal.Base_translateString\n Base_translateString = portal.Base_translateString\n
psm = N_(\'Nothing matches\')\n psm = Base_translateString(\'Nothing matches\')\n
request = container.REQUEST\n request = container.REQUEST\n
precision = request.get(\'precision\', 2)\n precision = request.get(\'precision\', 2)\n
\n \n
...@@ -113,7 +113,7 @@ if uids:\n ...@@ -113,7 +113,7 @@ if uids:\n
request.set(\'total_selected_amount\', total_selected_amount)\n request.set(\'total_selected_amount\', total_selected_amount)\n
\n \n
if update:\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 return context.AccountingTransactionModule_viewGroupingFastInputDialog(request)\n
\n \n
\n \n
...@@ -122,7 +122,7 @@ if grouping == \'grouping\':\n ...@@ -122,7 +122,7 @@ if grouping == \'grouping\':\n
grouped_line_list = context.AccountingTransaction_guessGroupedLines(\n grouped_line_list = context.AccountingTransaction_guessGroupedLines(\n
accounting_transaction_line_uid_list=uids)\n accounting_transaction_line_uid_list=uids)\n
if grouped_line_list:\n if grouped_line_list:\n
psm = N_(\'${grouped_line_count} Lines Grouped\',\n psm = Base_translateString(\'${grouped_line_count} Lines Grouped\',\n
mapping=dict(grouped_line_count=len(grouped_line_list)))\n mapping=dict(grouped_line_count=len(grouped_line_list)))\n
\n \n
# make sure nothing will be checked next time\n # make sure nothing will be checked next time\n
...@@ -176,7 +176,7 @@ else:\n ...@@ -176,7 +176,7 @@ else:\n
if line.getGroupingReference():\n if line.getGroupingReference():\n
ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference())\n ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference())\n
\n \n
psm = N_(\'${ungrouped_line_count} Lines Ungrouped\',\n psm = Base_translateString(\'${ungrouped_line_count} Lines Ungrouped\',\n
mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))\n mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))\n
\n \n
# make sure nothing will be checked next time\n # make sure nothing will be checked next time\n
...@@ -250,7 +250,7 @@ return context.AccountingTransactionModule_viewGroupingFastInputDialog(request)\ ...@@ -250,7 +250,7 @@ return context.AccountingTransactionModule_viewGroupingFastInputDialog(request)\
<string>portal</string> <string>portal</string>
<string>getobject</string> <string>getobject</string>
<string>stool</string> <string>stool</string>
<string>N_</string> <string>Base_translateString</string>
<string>psm</string> <string>psm</string>
<string>container</string> <string>container</string>
<string>request</string> <string>request</string>
......
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
and redirects to the accounting transaction view which is easyier to\n and redirects to the accounting transaction view which is easyier to\n
use.\n use.\n
\'\'\'\n \'\'\'\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
context.newContent(portal_type=portal_type)\n context.newContent(portal_type=portal_type)\n
return context.Base_redirect(\'view\', keep_items=dict(\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_name=selection_name,\n
selection_index=selection_index))\n selection_index=selection_index))\n
</string> </value> </string> </value>
...@@ -122,7 +122,7 @@ return context.Base_redirect(\'view\', keep_items=dict(\n ...@@ -122,7 +122,7 @@ return context.Base_redirect(\'view\', keep_items=dict(\n
<string>selection_index</string> <string>selection_index</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>N_</string> <string>Base_translateString</string>
<string>dict</string> <string>dict</string>
</tuple> </tuple>
</value> </value>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>""" Create a reversal transaction from current tansaction. """\n <value> <string>""" Create a reversal transaction from current tansaction. """\n
\n \n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
accounting_module = context.getPortalObject().accounting_module\n accounting_module = context.getPortalObject().accounting_module\n
is_source = context.AccountingTransaction_isSourceView()\n is_source = context.AccountingTransaction_isSourceView()\n
\n \n
...@@ -85,9 +85,9 @@ reversal = accounting_module.newContent (\n ...@@ -85,9 +85,9 @@ reversal = accounting_module.newContent (\n
destination_section=context.getDestinationSection(),\n destination_section=context.getDestinationSection(),\n
source_payment=context.getSourcePayment(),\n source_payment=context.getSourcePayment(),\n
destination_payment=context.getDestinationPayment(),\n destination_payment=context.getDestinationPayment(),\n
title = N_("Reversal Transaction for ${title}",\n title = Base_translateString("Reversal Transaction for ${title}",\n
mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\')}),\n mapping={\'title\':unicode(context.getTitleOrId(), \'utf8\')}),\n
description = N_(\n description = Base_translateString(\n
"Reversal Transaction for ${title} (${specific_reference})",\n "Reversal Transaction for ${title} (${specific_reference})",\n
mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\'),\n mapping={\'title\': unicode(context.getTitleOrId(), \'utf8\'),\n
\'specific_reference\': specific_reference}),\n \'specific_reference\': specific_reference}),\n
...@@ -139,7 +139,7 @@ for line in line_list:\n ...@@ -139,7 +139,7 @@ for line in line_list:\n
\n \n
return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n
(reversal.absolute_url(),\n (reversal.absolute_url(),\n
N_("Reversal Transaction for ${specific_reference} created.",\n Base_translateString("Reversal Transaction for ${specific_reference} created.",\n
mapping={\'specific_reference\': specific_reference})))\n mapping={\'specific_reference\': specific_reference})))\n
</string> </value> </string> </value>
</item> </item>
...@@ -185,7 +185,7 @@ return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n ...@@ -185,7 +185,7 @@ return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>N_</string> <string>Base_translateString</string>
<string>accounting_module</string> <string>accounting_module</string>
<string>is_source</string> <string>is_source</string>
<string>specific_reference</string> <string>specific_reference</string>
......
...@@ -67,8 +67,7 @@ ...@@ -67,8 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Deletes all empty (ie. with balance == 0) lines in an accounting transaction\n <value> <string>"""Deletes all empty (ie. with balance == 0) lines in an accounting transaction\n
"""\n """\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import translateString\n
N_ = lambda msg: Message(\'erp5_ui\', msg)\n
lines_portal_type = context.getPortalAccountingMovementTypeList()\n lines_portal_type = context.getPortalAccountingMovementTypeList()\n
transaction = context.getObject()\n transaction = context.getObject()\n
transaction_lines = transaction.objectValues(portal_type=lines_portal_type)\n transaction_lines = transaction.objectValues(portal_type=lines_portal_type)\n
...@@ -92,7 +91,7 @@ if len(id_to_delete_list) != len(transaction_lines):\n ...@@ -92,7 +91,7 @@ if len(id_to_delete_list) != len(transaction_lines):\n
\n \n
if redirect:\n if redirect:\n
context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" % (\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> </string> </value>
</item> </item>
<item> <item>
...@@ -137,8 +136,7 @@ if redirect:\n ...@@ -137,8 +136,7 @@ if redirect:\n
<tuple> <tuple>
<string>redirect</string> <string>redirect</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>N_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>lines_portal_type</string> <string>lines_portal_type</string>
......
...@@ -72,7 +72,7 @@ be provided, but by default the transaction is created at the system date.\n ...@@ -72,7 +72,7 @@ be provided, but by default the transaction is created at the system date.\n
from DateTime import DateTime\n from DateTime import DateTime\n
# translate with Base_translateString which is a bit more robust during\n # translate with Base_translateString which is a bit more robust during\n
# activities, because it doesn\'t rely on REQUEST[\'PARENTS\']\n # activities, because it doesn\'t rely on REQUEST[\'PARENTS\']\n
N_ = context.Base_translateString\n Base_translateString = context.Base_translateString\n
\n \n
date = DateTime()\n date = DateTime()\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
...@@ -98,12 +98,12 @@ if sum(total_payable_price_details.values()) == 0:\n ...@@ -98,12 +98,12 @@ if sum(total_payable_price_details.values()) == 0:\n
if not batch_mode:\n if not batch_mode:\n
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\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 return None\n
\n \n
related_payment = portal.accounting_module.newContent(\n related_payment = portal.accounting_module.newContent(\n
portal_type="Payment Transaction",\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 mapping=dict(invoice_title=unicode((context.getReference() or\n
context.getTitle() or \'\'),\n context.getTitle() or \'\'),\n
\'utf8\', \'repr\')))),\n \'utf8\', \'repr\')))),\n
...@@ -158,7 +158,8 @@ else:\n ...@@ -158,7 +158,8 @@ else:\n
if not batch_mode:\n if not batch_mode:\n
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
"%s/view?portal_status_message=%s" % (\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 else:\n
return related_payment\n return related_payment\n
</string> </value> </string> </value>
...@@ -217,7 +218,7 @@ else:\n ...@@ -217,7 +218,7 @@ else:\n
<string>DateTime</string> <string>DateTime</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>N_</string> <string>Base_translateString</string>
<string>portal</string> <string>portal</string>
<string>payment_dict</string> <string>payment_dict</string>
<string>is_source</string> <string>is_source</string>
......
...@@ -67,11 +67,10 @@ ...@@ -67,11 +67,10 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <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 from Products.ERP5Type.Log import log\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n
N_ = lambda msg: Message(\'erp5_ui\', msg)\n
\n \n
if params.get(\'precision\', None) is not None:\n if params.get(\'precision\', None) is not None:\n
# listbox editable float fields uses request/precision to format the value.\n # listbox editable float fields uses request/precision to format the value.\n
...@@ -174,8 +173,8 @@ if from_date or node_account_type in (\'expense\', \'income\'):\n ...@@ -174,8 +173,8 @@ if from_date or node_account_type in (\'expense\', \'income\'):\n
total_price=net_balance,\n total_price=net_balance,\n
running_total_price=net_balance,\n running_total_price=net_balance,\n
is_previous_balance=True,\n is_previous_balance=True,\n
Movement_getSpecificReference=u\'%s\' % N_(\'Previous Balance\'),\n Movement_getSpecificReference=u\'%s\' % translateString(\'Previous Balance\'),\n
Movement_getExplanationTitle=u\'%s\' % N_(\'Previous Balance\'),\n Movement_getExplanationTitle=u\'%s\' % translateString(\'Previous Balance\'),\n
Movement_getExplanationTranslatedPortalType=\'\',\n Movement_getExplanationTranslatedPortalType=\'\',\n
Movement_getExplanationReference=\'\',\n Movement_getExplanationReference=\'\',\n
Movement_getMirrorSectionTitle=\'\',\n Movement_getMirrorSectionTitle=\'\',\n
...@@ -271,14 +270,13 @@ return portal.portal_simulation.getMovementHistoryList(\n ...@@ -271,14 +270,13 @@ return portal.portal_simulation.getMovementHistoryList(\n
<string>selection_name</string> <string>selection_name</string>
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>Products.ERP5Type.Log</string> <string>Products.ERP5Type.Log</string>
<string>log</string> <string>log</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>params</string> <string>params</string>
<string>N_</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_write_</string> <string>_write_</string>
......
...@@ -65,17 +65,16 @@ ...@@ -65,17 +65,16 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import Message\n <value> <string>from Products.ERP5Type.Message import translateString\n
\n \n
# Return Message object, so that this message will be translated when it is rendered later.\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 \n
payment_transaction = context\n payment_transaction = context\n
\n \n
if payment_transaction.getSimulationState() == "draft":\n if payment_transaction.getSimulationState() == "draft":\n
payment_transaction.portal_workflow.doActionFor(\n payment_transaction.portal_workflow.doActionFor(\n
payment_transaction, \'plan_action\',\n payment_transaction, \'plan_action\',\n
comment=N_("Initialized by Delivery Builder"))\n comment=translateString("Initialized by Delivery Builder"))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -119,8 +118,7 @@ if payment_transaction.getSimulationState() == "draft":\n ...@@ -119,8 +118,7 @@ if payment_transaction.getSimulationState() == "draft":\n
<value> <value>
<tuple> <tuple>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>translateString</string>
<string>N_</string>
<string>context</string> <string>context</string>
<string>payment_transaction</string> <string>payment_transaction</string>
<string>_getattr_</string> <string>_getattr_</string>
......
2008-08-28 yusei 2008-08-28 yusei
* Use N_ for translation message. * Use translateString or Base_translateString instead of N_ for translation message.
2008-07-02 yusei 2008-07-02 yusei
* Update title of Account_view.reference. * Update title of Account_view.reference.
......
748 749
\ No newline at end of file \ No newline at end of file
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