[Zope3-checkins] SVN: Zope3/trunk/src/zope/i18n/negotiator.py Rewrap some comments.

Philipp von Weitershausen philikon at philikon.de
Mon Jul 12 06:05:58 EDT 2004


Log message for revision 26421:
Rewrap some comments.



-=-
Modified: Zope3/trunk/src/zope/i18n/negotiator.py
===================================================================
--- Zope3/trunk/src/zope/i18n/negotiator.py	2004-07-12 10:05:11 UTC (rev 26420)
+++ Zope3/trunk/src/zope/i18n/negotiator.py	2004-07-12 10:05:58 UTC (rev 26421)
@@ -26,9 +26,8 @@
     return lang
 
 def normalize_langs(langs):
-    # Make a mapping from normalized->original
-    # so we keep can match the normalized lang
-    # and return the original string.
+    # Make a mapping from normalized->original so we keep can match
+    # the normalized lang and return the original string.
     n_langs = {}
     for l in langs:
         n_langs[normalize_lang(l)] = l
@@ -40,18 +39,17 @@
     def getLanguage(self, langs, env):
         envadapter = IUserPreferredLanguages(env)
         userlangs = envadapter.getPreferredLanguages()
-        # Prioritize on the user preferred languages.  Return the first user
-        # preferred language that the object has available.
+        # Prioritize on the user preferred languages.  Return the
+        # first user preferred language that the object has available.
         langs = normalize_langs(langs)
         for lang in userlangs:
             if lang in langs:
                 return langs.get(lang)
-            # If the user asked for a specific
-            # variation, but we don't have it available
-            # we may serve the most generic one, according
-            # to the spec (eg: user asks for ('en-us', 'de'),
-            # but we don't have 'en-us', then 'en' is
-            # preffered to 'de').
+            # If the user asked for a specific variation, but we don't
+            # have it available we may serve the most generic one,
+            # according to the spec (eg: user asks for ('en-us',
+            # 'de'), but we don't have 'en-us', then 'en' is preferred
+            # to 'de').
             parts = lang.split('-')
             if len(parts) > 1 and parts[0] in langs:
                 return langs.get(parts[0])



More information about the Zope3-Checkins mailing list