Log message for revision 67185: Merge regebro's r66790 from 1.3 branch and bump version number for next 1.2.x release.
Changed: U Products.Five/branches/1.2/CHANGES.txt U Products.Five/branches/1.2/i18n.py U Products.Five/branches/1.2/version.txt -=- Modified: Products.Five/branches/1.2/CHANGES.txt =================================================================== --- Products.Five/branches/1.2/CHANGES.txt 2006-04-20 17:51:42 UTC (rev 67184) +++ Products.Five/branches/1.2/CHANGES.txt 2006-04-20 18:06:55 UTC (rev 67185) @@ -2,6 +2,12 @@ Five Changes ============ +Five 1.2.4 (XXX) +================ + +* Made sure LocalizerLanguages class normalized language codes to + xx-yy, instead of xx_YY or xx-YY. + Five 1.2.3 (2006-03-31) ======================= Modified: Products.Five/branches/1.2/i18n.py =================================================================== --- Products.Five/branches/1.2/i18n.py 2006-04-20 17:51:42 UTC (rev 67184) +++ Products.Five/branches/1.2/i18n.py 2006-04-20 18:06:55 UTC (rev 67185) @@ -20,6 +20,7 @@ from zope.i18n import interpolate from zope.i18n.interfaces import ITranslationDomain, IUserPreferredLanguages from zope.i18nmessageid import MessageID +from zope.i18n.negotiator import normalize_lang from zope.app import zapi from zope.publisher.browser import BrowserLanguages @@ -68,7 +69,9 @@ accept_language = self.context.AcceptLanguage langs = [] for lang, node in accept_language.children.items(): - langs.append((node.get_quality(), lang)) + # Localizer may use xx_YY and xx-YY as language codes, + # while Zope expect xx-yy only, so we normalize the code here. + langs.append((node.get_quality(), normalize_lang(lang))) langs.extend([(n.get_quality(), l) for l, n in node.children.items()]) langs.sort() Modified: Products.Five/branches/1.2/version.txt =================================================================== --- Products.Five/branches/1.2/version.txt 2006-04-20 17:51:42 UTC (rev 67184) +++ Products.Five/branches/1.2/version.txt 2006-04-20 18:06:55 UTC (rev 67185) @@ -1 +1 @@ -Five 1.2.3 +Five 1.2.4 _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins