[Erp5-report] r11782 - /erp5/trunk/products/ERP5Type/patches/Localizer.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 22 16:06:51 CET 2006
Author: bartek
Date: Fri Dec 22 16:06:49 2006
New Revision: 11782
URL: http://svn.erp5.org?rev=11782&view=rev
Log:
if Localizer can not be acquired return untranslated message
Modified:
erp5/trunk/products/ERP5Type/patches/Localizer.py
Modified: erp5/trunk/products/ERP5Type/patches/Localizer.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/Localizer.py?rev=11782&r1=11781&r2=11782&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/Localizer.py (original)
+++ erp5/trunk/products/ERP5Type/patches/Localizer.py Fri Dec 22 16:06:49 2006
@@ -83,8 +83,12 @@
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
More information about the Erp5-report
mailing list