[Zope3-checkins] CVS: Zope3/src/zope/publisher - http.py:1.39

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Feb 5 17:53:06 EST 2004


Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv7674/src/zope/publisher

Modified Files:
	http.py 
Log Message:
ICU joined openi18n.org and developed a locale data XML standard called 
LDML. A result of this was that all locale files were changed to this new 
format. To stay up-to-date with the latest data, I converted the locale
parser to read the new format. While I was at it, I also changed the Locale
data structure a bit, since I wanted to keep the objects similar to the 
XML. Furthermore, the first time around I did not implement the inheritance
of object attributes and dictionaries correctly (I just faked it for the 
API calls), so I think I got it right this time. Finally I updated views 
and tests that relied on the old Locale API. Be aware that you might need
to change some of your product code as well. 


=== Zope3/src/zope/publisher/http.py 1.38 => 1.39 ===
--- Zope3/src/zope/publisher/http.py:1.38	Fri Nov 21 12:12:28 2003
+++ Zope3/src/zope/publisher/http.py	Thu Feb  5 17:52:35 2004
@@ -310,16 +310,16 @@
         self.response.setCharsetUsingRequest(self)
         langs = BrowserLanguages(self).getPreferredLanguages()
         for httplang in langs:
-            language = country = variant = None
+            language = territory = variant = None
             parts = httplang.split('-')
             if parts:
                 language = parts.pop(0)
             if parts:
-                country = parts.pop(0)
+                territory = parts.pop(0)
             if parts:
                 variant = parts.pop(0)
             try:
-                self._locale = locales.getLocale(language, country, variant)
+                self._locale = locales.getLocale(language, territory, variant)
                 return
             except LoadLocaleError:
                 # Just try the next combination




More information about the Zope3-Checkins mailing list