Commit b837ec47 authored by Yusei Tahara's avatar Yusei Tahara

2008-08-28 yusei

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

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23244 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 811105ca
......@@ -65,14 +65,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>N_ = context.Base_translateString\n
<value> <string>Base_translateString = context.Base_translateString\n
paysheet = context\n
\n
model = paysheet.getSpecialiseValue()\n
\n
if model is None:\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=N_(\'No Pay Sheet Model.\')))\n
keep_items=dict(portal_status_message=Base_translateString(\'No Pay Sheet Model.\')))\n
\n
def getPropertyFromModel(model, property_name):\n
"""Get a property from the paysheet model, or from a specialised model.\n
......@@ -115,7 +115,7 @@ paysheet.PaySheetTransaction_copySubObject(\'Payment Condition\')\n
\n
if not batch_mode:\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=N_(\'Pay Sheet Transaction updated.\')))\n
keep_items=dict(portal_status_message=Base_translateString(\'Pay Sheet Transaction updated.\')))\n
</string> </value>
</item>
<item>
......@@ -168,7 +168,7 @@ if not batch_mode:\n
<string>batch_mode</string>
<string>_getattr_</string>
<string>context</string>
<string>N_</string>
<string>Base_translateString</string>
<string>paysheet</string>
<string>model</string>
<string>None</string>
......@@ -195,6 +195,12 @@ if not batch_mode:\n
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_applyModel</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -74,11 +74,11 @@ paysheet_type = paysheet.getPortalType()\n
employer = paysheet.getDestinationSection()\n
employee = paysheet.getSourceSection()\n
\n
N_ = context.Base_translateString\n
Base_translateString = context.Base_translateString\n
\n
def redirect(msg):\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=N_(msg)))\n
keep_items=dict(portal_status_message=Base_translateString(msg)))\n
\n
if not paysheet.getPriceCurrency():\n
return redirect(\'Currency is required\')\n
......@@ -160,7 +160,7 @@ return context.PaySheetTransaction_viewPreview(container.REQUEST)\n
<string>paysheet_type</string>
<string>employer</string>
<string>employee</string>
<string>N_</string>
<string>Base_translateString</string>
<string>redirect</string>
<string>employer_obj</string>
<string>employee_obj</string>
......@@ -186,6 +186,12 @@ return context.PaySheetTransaction_viewPreview(container.REQUEST)\n
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_checkParameters</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -75,8 +75,7 @@
\n
from Products.ERP5Type.Utils import cartesianProduct\n
import pprint\n
from Products.ERP5Type.Message import Message\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
from Products.ERP5Type.Message import translateString\n
\n
def sortByIntIndex(a, b):\n
return cmp(a.getIntIndex(), b.getIntIndex())\n
......@@ -99,7 +98,7 @@ context.log(model_line_list)\n
for model_line in model_line_list:\n
base_category_list = model_line.getVariationBaseCategoryList()\n
base_application_list = model_line.getBaseAmountTitleList()\n
translated_base_application_list = [str(N_(x)) for x in base_application_list]\n
translated_base_application_list = [str(translateString(x)) for x in base_application_list]\n
base_application_list = \', \'.join(translated_base_application_list)\n
list_of_list = []\n
for base_category in base_category_list:\n
......@@ -131,7 +130,7 @@ for model_line in model_line_list:\n
quantity = cell.getQuantity()\n
base = quantity\n
\n
base_list = [str(N_(base_application)) for base_application in \\\n
base_list = [str(translateString(base_application)) for base_application in \\\n
model_line.getBaseAmountTitleList()]\n
base_name = \'+\'.join(base_list)\n
\n
......@@ -285,8 +284,7 @@ return line_list\n
<string>cartesianProduct</string>
<string>pprint</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>N_</string>
<string>translateString</string>
<string>sortByIntIndex</string>
<string>_getattr_</string>
<string>context</string>
......@@ -360,6 +358,12 @@ return line_list\n
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_getEditableObjectLineList</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -75,8 +75,7 @@
\n
from Products.ERP5Type.Utils import cartesianProduct\n
import pprint\n
from Products.ERP5Type.Message import Message\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
from Products.ERP5Type.Message import translateString\n
\n
portal = context.getPortalObject();\n
paysheet_line_list = context.contentValues(portal_type=\'Pay Sheet Line\')\n
......@@ -91,7 +90,7 @@ line_list = []\n
for paysheet_line in paysheet_line_list:\n
base_category_list = paysheet_line.getVariationBaseCategoryList()\n
base_application_list = paysheet_line.getBaseAmountTitleList()\n
translated_base_application_list = [str(N_(x)) for x in base_application_list]\n
translated_base_application_list = [str(translateString(x)) for x in base_application_list]\n
base_application_list = \', \'.join(translated_base_application_list)\n
payroll_service = paysheet_line.getResourceValue(portal_type=\'Payroll Service\')\n
if payroll_service is not None:\n
......@@ -100,7 +99,7 @@ for paysheet_line in paysheet_line_list:\n
base_participation_list = []\n
causality = paysheet_line.getCausality()\n
\n
base_list = [str(N_(base_application)) for base_application in \\\n
base_list = [str(translateString(base_application)) for base_application in \\\n
paysheet_line.getBaseAmountTitleList()]\n
base_name = \'+\'.join(base_list)\n
\n
......@@ -257,8 +256,7 @@ return line_list\n
<string>cartesianProduct</string>
<string>pprint</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>N_</string>
<string>translateString</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
......@@ -326,6 +324,12 @@ return line_list\n
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_getMovementList</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
2008-08-28 yusei
* Use Base_translateString or translateString instead of N_ for translation message.
2008-06-10 jerome
* Add Payroll Taxes Report
......
312
\ No newline at end of file
313
\ 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