[Zope-Checkins] SVN: Products.Five/branches/Five-1.2/ Backport
r22056 from Five's former trunk at codespeak.net:
Philipp von Weitershausen
philikon at philikon.de
Sat Feb 25 14:38:55 EST 2006
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():
More information about the Zope-Checkins
mailing list