"""
from AccessControl import ModuleSecurityInfo
-from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
+# TODO: trouver une solution…
+#from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
from zope.i18nmessageid import MessageFactory
security = ModuleSecurityInfo('Products.photoprint.utils')
def translate(message, context):
""" Translate i18n message.
"""
- GTS = getGlobalTranslationService()
+ # GTS = getGlobalTranslationService()
if isinstance(message, Exception):
try:
message = message[0]
except (TypeError, IndexError):
pass
+ return message
return GTS.translate('photoprint', message, context=context)
security.declarePublic('Message')