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