Commit 49f61d11 authored by Bartek Górny's avatar Bartek Górny

if Localizer can not be acquired return untranslated message

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11782 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04ee751a
......@@ -83,8 +83,12 @@ def GlobalTranslationService_translate(self, domain, msgid, *args, **kw):
if context is None:
# Placeless!
return msgid
return context.Localizer.translate(domain, msgid, *args, **kw)
# XXX patch -because if context is ZMailIn, it is at the site root
# and does not find Localizer by acquisition
try:
return context.Localizer.translate(domain, msgid, *args, **kw)
except AttributeError:
return msgid
# Apply the monkey patch.
from Products.Localizer.Localizer import Localizer
......
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