Log message for revision 65458: Backport r22056 from Five's former trunk at codespeak.net: Unit tests that did i18n via Localizer would fail because the request attribute that keeps Localizers list of preferred languages did not exist.
Changed: U Products.Five/branches/Five-1.2/CHANGES.txt U Products.Five/branches/Five-1.2/i18n.py -=- Modified: Products.Five/branches/Five-1.2/CHANGES.txt =================================================================== --- Products.Five/branches/Five-1.2/CHANGES.txt 2006-02-25 19:05:27 UTC (rev 65457) +++ Products.Five/branches/Five-1.2/CHANGES.txt 2006-02-25 19:38:55 UTC (rev 65458) @@ -13,6 +13,10 @@ ``__bobo_traverse__`` is tried. If that does not exist, Traversable resorts to attribute look-up. +* Unit tests that did i18n via Localizer would fail because the + request attribute that keeps Localizers list of preferred languages + did not exist. + Five 1.2 (2006-01-07) ===================== Modified: Products.Five/branches/Five-1.2/i18n.py =================================================================== --- Products.Five/branches/Five-1.2/i18n.py 2006-02-25 19:05:27 UTC (rev 65457) +++ Products.Five/branches/Five-1.2/i18n.py 2006-02-25 19:38:55 UTC (rev 65458) @@ -62,6 +62,9 @@ self.context = context def getPreferredLanguages(self): + if not hasattr(self.context, 'AcceptLanguage'): + return [] + accept_language = self.context.AcceptLanguage langs = [] for lang, node in accept_language.children.items(): _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins