Commit dd7f23f6 authored by Yusei Tahara's avatar Yusei Tahara

2008-08-28 yusei

* Use N_ function for translation message.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23209 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b0d9d922
...@@ -67,12 +67,14 @@ ...@@ -67,12 +67,14 @@
<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 Message\n
\n \n
N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
packing_list = context\n packing_list = context\n
\n \n
# Modify state\n # Modify state\n
packing_list_state = packing_list.getSimulationState()\n packing_list_state = packing_list.getSimulationState()\n
if packing_list_state == "draft":\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> </string> </value>
</item> </item>
<item> <item>
...@@ -124,6 +126,7 @@ if packing_list_state == "draft":\n ...@@ -124,6 +126,7 @@ if packing_list_state == "draft":\n
<string>kw</string> <string>kw</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>N_</string>
<string>context</string> <string>context</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string> <string>_getattr_</string>
......
...@@ -70,6 +70,8 @@ ...@@ -70,6 +70,8 @@
\n \n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
packing_list = context\n packing_list = context\n
\n \n
# First, copy Order properties\n # First, copy Order properties\n
...@@ -79,7 +81,7 @@ packing_list.PackingList_copyOrderProperties()\n ...@@ -79,7 +81,7 @@ packing_list.PackingList_copyOrderProperties()\n
packing_list_state = packing_list.getSimulationState()\n packing_list_state = packing_list.getSimulationState()\n
\n \n
if packing_list_state == "draft":\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 \n
# First set the packing_list in the building state\n # First set the packing_list in the building state\n
packing_list.startBuilding()\n packing_list.startBuilding()\n
...@@ -133,6 +135,7 @@ packing_list.activate(after_path_and_method_id=(related_simulation_movement_path ...@@ -133,6 +135,7 @@ packing_list.activate(after_path_and_method_id=(related_simulation_movement_path
<string>RuntimeError</string> <string>RuntimeError</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>N_</string>
<string>context</string> <string>context</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string> <string>_getattr_</string>
......
2008-08-28 yusei
* Use N_ function for translation message.
2008-07-30 Jerome 2008-07-30 Jerome
Add "offered" and "rejected" state on order workflow, to manage offers. Add "offered" and "rejected" state on order workflow, to manage offers.
......
473 474
\ No newline at end of file \ No newline at end of file
...@@ -74,6 +74,8 @@ portal = context.getPortalObject()\n ...@@ -74,6 +74,8 @@ portal = context.getPortalObject()\n
request = context.REQUEST\n request = context.REQUEST\n
domain_list = []\n domain_list = []\n
\n \n
N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
selection_name = request.get(\'selection_name\')\n selection_name = request.get(\'selection_name\')\n
params = portal.portal_selections.getSelectionParamsFor(selection_name, request)\n params = portal.portal_selections.getSelectionParamsFor(selection_name, request)\n
\n \n
...@@ -109,13 +111,11 @@ if depth == 0:\n ...@@ -109,13 +111,11 @@ if depth == 0:\n
else:\n else:\n
o.setProperty(\'delimiter_type\', 0)\n o.setProperty(\'delimiter_type\', 0)\n
\n \n
title = Message(\'erp5_ui\',\n title = N_(\'${day_name} ${date}\',\n
\'${day_name} ${date}\',\n mapping=dict(day_name=N_(current_date.Day()),\n
mapping=dict(day_name=Message(\'erp5_ui\',\n date=current_date.strftime(date_format)))\n
current_date.Day()),\n
date=current_date.strftime(date_format))).translate()\n
o.setProperty(\'title\', title)\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 o.setProperty(\'tooltip\', tp)\n
\n \n
category_list.append(o)\n category_list.append(o)\n
...@@ -204,6 +204,7 @@ return domain_list\n ...@@ -204,6 +204,7 @@ return domain_list\n
<string>portal</string> <string>portal</string>
<string>request</string> <string>request</string>
<string>domain_list</string> <string>domain_list</string>
<string>N_</string>
<string>selection_name</string> <string>selection_name</string>
<string>params</string> <string>params</string>
<string>DateTime</string> <string>DateTime</string>
......
...@@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n ...@@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n from string import zfill\n
\n \n
N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
request = context.REQUEST\n request = context.REQUEST\n
domain_list = []\n domain_list = []\n
...@@ -120,15 +122,13 @@ if depth == 0:\n ...@@ -120,15 +122,13 @@ if depth == 0:\n
else:\n else:\n
o.setProperty(\'delimiter_type\', 0)\n o.setProperty(\'delimiter_type\', 0)\n
\n \n
title = Message(\'erp5_ui\',\n title = N_(\'${day_name} ${date}\',\n
\'${day_name} ${date}\',\n mapping=dict(day_name=N_(current_date.Day()),\n
mapping=dict(day_name=Message(\'erp5_ui\',\n date=current_date.strftime(date_format)))\n
current_date.Day()),\n
date=current_date.strftime(date_format))).translate()\n
o.setProperty(\'title\', title)\n o.setProperty(\'title\', title)\n
\n \n
# Defining ToolTip (Optional)\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 o.setProperty(\'tooltip\', tp)\n
\n \n
# Defining Link (Optional)\n # Defining Link (Optional)\n
...@@ -214,6 +214,7 @@ return domain_list\n ...@@ -214,6 +214,7 @@ return domain_list\n
<string>newTempBase</string> <string>newTempBase</string>
<string>string</string> <string>string</string>
<string>zfill</string> <string>zfill</string>
<string>N_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
......
...@@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n ...@@ -74,6 +74,8 @@ from Products.ERP5Type.Message import Message\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n from string import zfill\n
\n \n
N_ = lambda msg, **kw: str(Message(\'erp5_ui\', msg, **kw))\n
\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
request = context.REQUEST\n request = context.REQUEST\n
domain_list = []\n domain_list = []\n
...@@ -118,11 +120,9 @@ if depth == 0:\n ...@@ -118,11 +120,9 @@ if depth == 0:\n
\n \n
o.setProperty(\'relative_position\', int(current_date))\n o.setProperty(\'relative_position\', int(current_date))\n
\n \n
title = Message(\'erp5_ui\',\n title = N_(\'${month_name} ${year}\',\n
\'${month_name} ${year}\',\n mapping=dict(month_name=N_(current_date.Month()),\n
mapping=dict(month_name=Message(\'erp5_ui\',\n year=str(current_date.year())))\n
current_date.Month()),\n
year=str(current_date.year()))).translate()\n
o.setProperty(\'title\', title)\n o.setProperty(\'title\', title)\n
\n \n
# Defining Link\n # Defining Link\n
...@@ -209,6 +209,7 @@ return domain_list\n ...@@ -209,6 +209,7 @@ return domain_list\n
<string>newTempBase</string> <string>newTempBase</string>
<string>string</string> <string>string</string>
<string>zfill</string> <string>zfill</string>
<string>N_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
......
2008-08-28 yusei
* Use N_ function for translation message.
2008-08-11 vincentd 2008-08-11 vincentd
* fix Base_jumpToRelatedObject to avoid a probleme with bad form_id when jumping on a single object * fix Base_jumpToRelatedObject to avoid a probleme with bad form_id when jumping on a single object
......
941 942
\ 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