Commit 58f25927 authored by Jérome Perrin's avatar Jérome Perrin

centralize all security definitions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29031 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ffdb854e
......@@ -310,15 +310,11 @@ def getTranslationStringWithContext(self, msg_id, context, context_id):
localizer = portal.Localizer
selected_language = localizer.get_selected_language()
msg_id_context = getMessageIdWithContext(msg_id, context, context_id)
result = localizer.erp5_ui.gettext(
msg_id_context, default='')
result = localizer.erp5_ui.gettext(msg_id_context, default='')
if result == '':
result = localizer.erp5_ui.gettext(msg_id)
return result.encode('utf8')
ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'getMessageIdWithContext', 'getTranslationStringWithContext')
#####################################################
# Globals initialization
#####################################################
......
......@@ -110,7 +110,7 @@ allow_module('Products.ERP5Type.Cache')
ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'sortValueList', 'convertToUpperCase', 'UpperCase',
'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList',
'int2letter',)
'int2letter', 'getMessageIdWithContext', 'getTranslationStringWithContext')
allow_module('Products.ERP5Type.Message')
ModuleSecurityInfo('Products.ERP5Type.Message').declarePublic('translateString')
......
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