Commit e0be1de4 authored by Yusei Tahara's avatar Yusei Tahara

translateString function will return a Message instance for translation message.

Please use this function instead of using N_.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23230 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1489657
......@@ -142,3 +142,7 @@ class Message(Persistent):
InitializeClass(Message)
allow_class(Message)
def translateString(message, **kw):
return Message(domain='erp5_ui', message=message, **kw)
......@@ -110,6 +110,8 @@ ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList')
allow_module('Products.ERP5Type.Message')
ModuleSecurityInfo('Products.ERP5Type.Message').declarePublic('translateString')
allow_module('Products.ERP5Type.Error')
allow_module('Products.ERP5Type.JSONEncoder')
allow_module('Products.ERP5Type.Log')
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