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): ...@@ -310,15 +310,11 @@ def getTranslationStringWithContext(self, msg_id, context, context_id):
localizer = portal.Localizer localizer = portal.Localizer
selected_language = localizer.get_selected_language() selected_language = localizer.get_selected_language()
msg_id_context = getMessageIdWithContext(msg_id, context, context_id) msg_id_context = getMessageIdWithContext(msg_id, context, context_id)
result = localizer.erp5_ui.gettext( result = localizer.erp5_ui.gettext(msg_id_context, default='')
msg_id_context, default='')
if result == '': if result == '':
result = localizer.erp5_ui.gettext(msg_id) result = localizer.erp5_ui.gettext(msg_id)
return result.encode('utf8') return result.encode('utf8')
ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'getMessageIdWithContext', 'getTranslationStringWithContext')
##################################################### #####################################################
# Globals initialization # Globals initialization
##################################################### #####################################################
......
...@@ -110,7 +110,7 @@ allow_module('Products.ERP5Type.Cache') ...@@ -110,7 +110,7 @@ allow_module('Products.ERP5Type.Cache')
ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic( ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'sortValueList', 'convertToUpperCase', 'UpperCase', 'sortValueList', 'convertToUpperCase', 'UpperCase',
'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList', 'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList',
'int2letter',) 'int2letter', 'getMessageIdWithContext', 'getTranslationStringWithContext')
allow_module('Products.ERP5Type.Message') allow_module('Products.ERP5Type.Message')
ModuleSecurityInfo('Products.ERP5Type.Message').declarePublic('translateString') 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