[Zope3-checkins] CVS: Zope3/src/zope/i18n - globaltranslationservice.py:1.2.6.1 negotiator.py:1.3.4.1

Tim Peters tim.one@comcast.net
Wed, 26 Feb 2003 16:19:34 -0500


Update of /cvs-repository/Zope3/src/zope/i18n
In directory cvs.zope.org:/tmp/cvs-serv23093/src/zope/i18n

Modified Files:
      Tag: use-config-branch
	globaltranslationservice.py negotiator.py 
Log Message:
Added IService marker interface, and ISimpleService.  It's intended that
services implement ISimpleService, and this code also changes a number
of services to do so.  A number of services do not yet do so.  Guido
and I will tackle those in parallel next.


=== Zope3/src/zope/i18n/globaltranslationservice.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/i18n/globaltranslationservice.py:1.2	Wed Dec 25 09:13:39 2002
+++ Zope3/src/zope/i18n/globaltranslationservice.py	Wed Feb 26 16:19:33 2003
@@ -18,6 +18,7 @@
 
 from zope.i18n.negotiator import negotiator
 from zope.i18n.simpletranslationservice import SimpleTranslationService
+from zope.component.interfaces import IService
 
 # The configure.zcml file should specify a list of fallback languages for the
 # site.  If a particular catalog for a negotiated language is not available,
@@ -32,7 +33,7 @@
 
 class GlobalTranslationService(SimpleTranslationService):
 
-    __implements__ =  SimpleTranslationService.__implements__
+    __implements__ =  SimpleTranslationService.__implements__, IService
 
     def __init__(self, default_domain='global', fallbacks=None):
         # XXX We haven't specified that ITranslationServices have a default


=== Zope3/src/zope/i18n/negotiator.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zope/i18n/negotiator.py:1.3	Mon Dec 30 21:52:13 2002
+++ Zope3/src/zope/i18n/negotiator.py	Wed Feb 26 16:19:33 2003
@@ -20,10 +20,11 @@
 from zope.i18n.interfaces import IUserPreferredLanguages
 from zope.i18n.interfaces import ILanguageAvailability
 from zope.component import getAdapter
+from zope.component.interfaces import IService
 
 class Negotiator:
 
-    __implements__ = INegotiator
+    __implements__ = INegotiator, IService
 
     def getLanguage(self, langs, env):
         envadaptor = getAdapter(env, IUserPreferredLanguages)