diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_applyModel.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_applyModel.xml index 15c2e0e0eb3ef0f6a3c5c368ed202b1cbbee3118..6e862ed781577d4bb852e1f0849a3de71970e491 100644 --- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_applyModel.xml +++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_applyModel.xml @@ -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> diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_checkParameters.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_checkParameters.xml index fd0f9bbe272593626f15a422dad4a13f1ee00d69..239550bff23ad204dcf75559447d48f285e4cb12 100644 --- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_checkParameters.xml +++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_checkParameters.xml @@ -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> diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml index 3440353326c79930d0c8b0c364f310e04833b85a..4314fc188bd6247318f8c355e35655e3b71f0978 100644 --- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml +++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getEditableObjectLineList.xml @@ -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> diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml index 8a4b534680c67818a4edf3af4012a12f0738b1a4..bb42dd28c77e65f56cad56e0de08a03f1edb065d 100644 --- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml +++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml @@ -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> diff --git a/bt5/erp5_payroll/bt/change_log b/bt5/erp5_payroll/bt/change_log index 517d1dc0236f2580280a044b1a1023e3b61a2344..884e0964dd9b7da44aa790d2379169810de295d8 100644 --- a/bt5/erp5_payroll/bt/change_log +++ b/bt5/erp5_payroll/bt/change_log @@ -1,3 +1,6 @@ +2008-08-28 yusei +* Use Base_translateString or translateString instead of N_ for translation message. + 2008-06-10 jerome * Add Payroll Taxes Report diff --git a/bt5/erp5_payroll/bt/revision b/bt5/erp5_payroll/bt/revision index 3c7d064c14f18c2752bc1be3268fc7974f0ec5da..cb28afbd3c61fe2dce75f1167ad47625fdec9b9e 100644 --- a/bt5/erp5_payroll/bt/revision +++ b/bt5/erp5_payroll/bt/revision @@ -1 +1 @@ -312 \ No newline at end of file +313 \ No newline at end of file