diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_confirm.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_confirm.xml index 9f48c278d2476018d455a3e05db4534f00d8fe11..db903ff7c88e5f9afd2018d042963ac85dfa1b38 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_confirm.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_confirm.xml @@ -67,12 +67,14 @@ <key> <string>_body</string> </key> <value> <string>from Products.ERP5Type.Message import Message\n \n +N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n +\n packing_list = context\n \n # Modify state\n packing_list_state = packing_list.getSimulationState()\n if packing_list_state == "draft":\n - packing_list.confirm(comment=Message(\'erp5_ui\', \'Initialized by Delivery Builder\'))\n + packing_list.confirm(comment=N_(\'Initialized by Delivery Builder\'))\n </string> </value> </item> <item> @@ -124,6 +126,7 @@ if packing_list_state == "draft":\n <string>kw</string> <string>Products.ERP5Type.Message</string> <string>Message</string> + <string>N_</string> <string>context</string> <string>packing_list</string> <string>_getattr_</string> diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_copyOrderProperties.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_copyOrderProperties.xml index de75e0cefb4957eb9973935773bc24e4a17191e1..990694cd3cfd7102d26df69922cb107443b3dac5 100644 --- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_copyOrderProperties.xml +++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SalePackingList_copyOrderProperties.xml @@ -70,6 +70,8 @@ \n from Products.ERP5Type.Message import Message\n \n +N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n +\n packing_list = context\n \n # First, copy Order properties\n @@ -79,7 +81,7 @@ packing_list.PackingList_copyOrderProperties()\n packing_list_state = packing_list.getSimulationState()\n \n if packing_list_state == "draft":\n - packing_list.confirm(comment=Message(\'erp5_ui\', \'Initialized by Delivery Builder\'))\n + packing_list.confirm(comment=N_(\'Initialized by Delivery Builder\'))\n \n # First set the packing_list in the building state\n packing_list.startBuilding()\n @@ -133,6 +135,7 @@ packing_list.activate(after_path_and_method_id=(related_simulation_movement_path <string>RuntimeError</string> <string>Products.ERP5Type.Message</string> <string>Message</string> + <string>N_</string> <string>context</string> <string>packing_list</string> <string>_getattr_</string> diff --git a/bt5/erp5_trade/bt/change_log b/bt5/erp5_trade/bt/change_log index ce37073e548ffc3b2b699d0040ac61884d411ddc..4f9594da1233e3efd82f48a93e1205f705f7adff 100644 --- a/bt5/erp5_trade/bt/change_log +++ b/bt5/erp5_trade/bt/change_log @@ -1,3 +1,6 @@ +2008-08-28 yusei +* Use N_ function for translation message. + 2008-07-30 Jerome Add "offered" and "rejected" state on order workflow, to manage offers. diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index 0642336574c704b287331ad4bc605737a5f1a770..6a5426c9b3432ec4b244774a543bc6ed9b0eb575 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -473 \ No newline at end of file +474 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml index 2ea15c8e8957f74554f2db5531751516fb5e0610..f88b86610243d9c51c97db2130ea104a64f5078e 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateDayDomain.xml @@ -74,6 +74,8 @@ portal = context.getPortalObject()\n request = context.REQUEST\n domain_list = []\n \n +N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n +\n selection_name = request.get(\'selection_name\')\n params = portal.portal_selections.getSelectionParamsFor(selection_name, request)\n \n @@ -109,13 +111,11 @@ if depth == 0:\n else:\n o.setProperty(\'delimiter_type\', 0)\n \n - title = Message(\'erp5_ui\',\n - \'${day_name} ${date}\',\n - mapping=dict(day_name=Message(\'erp5_ui\',\n - current_date.Day()),\n - date=current_date.strftime(date_format))).translate()\n + title = N_(\'${day_name} ${date}\',\n + mapping=dict(day_name=N_(current_date.Day()),\n + date=current_date.strftime(date_format)))\n o.setProperty(\'title\', title)\n - tp = \'%s %s\' % (Message(domain=\'erp5_ui\', message=current_date.Day()), str(current_date))\n + tp = \'%s %s\' % (N_(current_date.Day()), str(current_date))\n o.setProperty(\'tooltip\', tp)\n \n category_list.append(o)\n @@ -204,6 +204,7 @@ return domain_list\n <string>portal</string> <string>request</string> <string>domain_list</string> + <string>N_</string> <string>selection_name</string> <string>params</string> <string>DateTime</string> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml index 2ce689546464c04fc6dbae42ab54dd97e8260404..39928251f1e0481d244b6bbf13ff0f6ff4920159 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateWeekDomain.xml @@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Document import newTempBase\n from string import zfill\n \n +N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n +\n portal = context.getPortalObject()\n request = context.REQUEST\n domain_list = []\n @@ -120,15 +122,13 @@ if depth == 0:\n else:\n o.setProperty(\'delimiter_type\', 0)\n \n - title = Message(\'erp5_ui\',\n - \'${day_name} ${date}\',\n - mapping=dict(day_name=Message(\'erp5_ui\',\n - current_date.Day()),\n - date=current_date.strftime(date_format))).translate()\n + title = N_(\'${day_name} ${date}\',\n + mapping=dict(day_name=N_(current_date.Day()),\n + date=current_date.strftime(date_format)))\n o.setProperty(\'title\', title)\n \n # Defining ToolTip (Optional)\n - tp = \'%s %s\' % (Message(domain=\'erp5_ui\', message=current_date.Day()), str(current_date))\n + tp = \'%s %s\' % (N_(current_date.Day()), str(current_date))\n o.setProperty(\'tooltip\', tp)\n \n # Defining Link (Optional)\n @@ -214,6 +214,7 @@ return domain_list\n <string>newTempBase</string> <string>string</string> <string>zfill</string> + <string>N_</string> <string>_getattr_</string> <string>context</string> <string>portal</string> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml index fa5a147344e6de1957f11ef176fb06c5308a8fd5..eb373fce38403d6805cfacbe0d6256bc9dff1946 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.xml @@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Document import newTempBase\n from string import zfill\n \n +N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n +\n portal = context.getPortalObject()\n request = context.REQUEST\n domain_list = []\n @@ -118,11 +120,9 @@ if depth == 0:\n \n o.setProperty(\'relative_position\', int(current_date))\n \n - title = Message(\'erp5_ui\',\n - \'${month_name} ${year}\',\n - mapping=dict(month_name=Message(\'erp5_ui\',\n - current_date.Month()),\n - year=str(current_date.year()))).translate()\n + title = N_(\'${month_name} ${year}\',\n + mapping=dict(month_name=N_(current_date.Month()),\n + year=str(current_date.year())))\n o.setProperty(\'title\', title)\n \n # Defining Link\n @@ -209,6 +209,7 @@ return domain_list\n <string>newTempBase</string> <string>string</string> <string>zfill</string> + <string>N_</string> <string>_getattr_</string> <string>context</string> <string>portal</string> diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index 61c1a25079cb7794c12140a33e7b45a82a3784bd..8d1b86c7ade4a2b99dc1ceea08219d87b5c88c3f 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,3 +1,6 @@ +2008-08-28 yusei +* Use N_ function for translation message. + 2008-08-11 vincentd * fix Base_jumpToRelatedObject to avoid a probleme with bad form_id when jumping on a single object diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 1178423244323a38258950fe20ba34eb3f3ec868..dcdf7f59d9ebfb6a30c844b3d0d5b6d92bec0814 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -941 \ No newline at end of file +942 \ No newline at end of file