Commit f2d1824a authored by Yoshinori Okuji's avatar Yoshinori Okuji

Get Localizer from the portal. This is more efficient.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26400 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b61b2935
...@@ -91,7 +91,7 @@ def GlobalTranslationService_translate(self, domain, msgid, *args, **kw): ...@@ -91,7 +91,7 @@ def GlobalTranslationService_translate(self, domain, msgid, *args, **kw):
# Placeless! # Placeless!
return msgid return msgid
localizer = getattr(context, 'Localizer', None) localizer = getattr(context.getPortalObject(), 'Localizer', None)
if localizer is None: if localizer is None:
LOG('ERP5Type.patches.Localizer', ERROR, 'could not find a Localizer ' LOG('ERP5Type.patches.Localizer', ERROR, 'could not find a Localizer '
'object in acquisition context, message will not be translated') 'object in acquisition context, message will not be translated')
......
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