[CMF-checkins] SVN: CMF/trunk/CMFCore/testing. - added BBB comments (the TestMessageFallbackDomain issue is now fixed in Five)

Yvo Schubbe y.2006_ at wcm-solutions.de
Mon Nov 6 10:49:17 EST 2006


Log message for revision 71090:
  - added BBB comments (the TestMessageFallbackDomain issue is now fixed in Five)
  - removed negotiator override (overriding BrowserLanguages is sufficient)

Changed:
  U   CMF/trunk/CMFCore/testing.py
  U   CMF/trunk/CMFCore/testing.zcml

-=-
Modified: CMF/trunk/CMFCore/testing.py
===================================================================
--- CMF/trunk/CMFCore/testing.py	2006-11-06 14:55:04 UTC (rev 71089)
+++ CMF/trunk/CMFCore/testing.py	2006-11-06 15:49:14 UTC (rev 71090)
@@ -19,7 +19,6 @@
 from Products.Five import i18n
 from Products.Five import zcml
 from zope.component import adapts
-from zope.i18n.interfaces import INegotiator
 from zope.i18n.interfaces import IUserPreferredLanguages
 from zope.i18n.testmessagecatalog import TestMessageFallbackDomain
 from zope.interface import implements
@@ -105,16 +104,7 @@
         return ('test',)
 
 
-class _Negotiator(object):
-
-    implements(INegotiator)
-
-    def getLanguage(*ignored):
-        return 'test'
-
-negotiator = _Negotiator()
-
-
+# BBB: for Five < 1.5.2
 class _FallbackTranslationService(object):
 
     def translate(self, domain, msgid, mapping, context, target_language,
@@ -161,13 +151,17 @@
     def setUp(cls):
         import Products
 
+        # BBB: for Five < 1.5.2
         cls._fallback_translation_service = i18n._fallback_translation_service
         i18n._fallback_translation_service = _FallbackTranslationService()
+
         zcml.load_config('testing.zcml', Products.CMFCore)
 
     @classmethod
     def tearDown(cls):
+        # BBB: for Five < 1.5.2
         i18n._fallback_translation_service = cls._fallback_translation_service
+
         cleanUp()
 
 

Modified: CMF/trunk/CMFCore/testing.zcml
===================================================================
--- CMF/trunk/CMFCore/testing.zcml	2006-11-06 14:55:04 UTC (rev 71089)
+++ CMF/trunk/CMFCore/testing.zcml	2006-11-06 15:49:14 UTC (rev 71090)
@@ -21,8 +21,6 @@
   <five:deprecatedManageAddDelete
       class="Products.CMFCore.tests.base.dummy.DummyContent"/>
 
-  <utility component=".testing.negotiator"/>
-
   <utility
       component="zope.i18n.testmessagecatalog.TestMessageFallbackDomain"/>
 



More information about the CMF-checkins mailing list