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