[Zope3-checkins] CVS: Zope3/src/zope/i18n - format.py:1.7.14.1 gettextmessagecatalog.py:1.6.12.1 globaltranslationservice.py:1.9.12.1 locales.py:1.13.14.1 negotiator.py:1.5.10.1 simpletranslationservice.py:1.8.12.1 translate.py:1.7.12.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:15 -0400


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

Modified Files:
      Tag: cw-mail-branch
	format.py gettextmessagecatalog.py globaltranslationservice.py 
	locales.py negotiator.py simpletranslationservice.py 
	translate.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/i18n/format.py 1.7 => 1.7.14.1 ===
--- Zope3/src/zope/i18n/format.py:1.7	Tue Apr 15 11:24:03 2003
+++ Zope3/src/zope/i18n/format.py	Sun Jun 22 10:23:43 2003
@@ -23,6 +23,7 @@
 import datetime
 import calendar
 from zope.i18n.interfaces import IDateTimeFormat, INumberFormat
+from zope.interface import implements
 
 class DateTimeParseError(Exception):
     """Error is raised when parsing of datetime failed."""
@@ -30,7 +31,7 @@
 class DateTimeFormat(object):
     __doc__ = IDateTimeFormat.__doc__
 
-    __implements__ =  IDateTimeFormat
+    implements(IDateTimeFormat)
 
     _DATETIMECHARS = "aGyMdEDFwWhHmsSkKz"
 
@@ -140,7 +141,7 @@
 class NumberFormat(object):
     __doc__ = INumberFormat.__doc__
 
-    __implements__ =  INumberFormat
+    implements(INumberFormat)
 
     # See zope.i18n.interfaces.INumberFormat
     symbols = {u'decimal': u'.',


=== Zope3/src/zope/i18n/gettextmessagecatalog.py 1.6 => 1.6.12.1 ===
--- Zope3/src/zope/i18n/gettextmessagecatalog.py:1.6	Mon Apr 28 13:21:39 2003
+++ Zope3/src/zope/i18n/gettextmessagecatalog.py	Sun Jun 22 10:23:43 2003
@@ -18,6 +18,7 @@
 
 from pythonlib.gettext import GNUTranslations
 from zope.i18n.interfaces import IMessageCatalog
+from zope.interface import implements
 
 
 class _KeyErrorRaisingFallback:
@@ -28,7 +29,7 @@
 class GettextMessageCatalog:
     """A message catalog based on GNU gettext and Python's gettext module."""
 
-    __implements__ =  IMessageCatalog
+    implements(IMessageCatalog)
 
     def __init__(self, language, domain, path_to_file):
         """Initialize the message catalog"""


=== Zope3/src/zope/i18n/globaltranslationservice.py 1.9 => 1.9.12.1 ===
--- Zope3/src/zope/i18n/globaltranslationservice.py:1.9	Thu Apr 17 16:05:13 2003
+++ Zope3/src/zope/i18n/globaltranslationservice.py	Sun Jun 22 10:23:43 2003
@@ -33,8 +33,6 @@
 
 class GlobalTranslationService(SimpleTranslationService):
 
-    __implements__ =  SimpleTranslationService.__implements__
-
     def __init__(self, default_domain='global', fallbacks=None):
         # XXX We haven't specified that ITranslationServices have a default
         # domain.  So far, we've required the domain argument to .translate()


=== Zope3/src/zope/i18n/locales.py 1.13 => 1.13.14.1 ===
--- Zope3/src/zope/i18n/locales.py:1.13	Thu Apr 10 02:17:00 2003
+++ Zope3/src/zope/i18n/locales.py	Sun Jun 22 10:23:43 2003
@@ -18,6 +18,7 @@
 import os
 import datetime
 from xml.dom.minidom import parse as parseXML
+from zope.interface import implements
 
 # time.strptime() isn't available on all platforms before Python 2.3.  When
 # it isn't available, use the implementation from 2.3's _strptime.py, checked
@@ -76,7 +77,7 @@
 class LocaleProvider:
     __doc__ = ILocaleProvider.__doc__
 
-    __implements__ =  ILocaleProvider
+    implements(ILocaleProvider)
 
 
     def __init__(self, locale_dir):
@@ -130,7 +131,7 @@
 class LocaleIdentity:
     __doc__ = ILocaleIdentity.__doc__
 
-    __implements__ =  ILocaleIdentity
+    implements(ILocaleIdentity)
 
     def __init__(self, language=None, country=None, variant=None):
         """Initialize object."""
@@ -148,7 +149,7 @@
 class LocaleVersion:
     __doc__ = ILocaleVersion.__doc__
 
-    __implements__ = ILocaleVersion
+    implements(ILocaleVersion)
 
     # See zope.i18n.interfaces.ILocaleVersion
     id = None
@@ -172,7 +173,7 @@
 class LocaleTimeZone:
     __doc__ = ILocaleTimeZone.__doc__
 
-    __implements__ =  ILocaleTimeZone
+    implements(ILocaleTimeZone)
 
     def __init__(self, id):
         """Initialize the object."""
@@ -184,7 +185,7 @@
 class LocaleCalendar:
     __doc__ = ILocaleCalendar.__doc__
 
-    __implements__ =  ILocaleCalendar
+    implements(ILocaleCalendar)
 
     def __init__(self, klass):
         """Initialize the object."""
@@ -273,7 +274,7 @@
 class LocaleNumberFormat:
     __doc__ = ILocaleNumberFormat.__doc__
 
-    __implements__ = ILocaleNumberFormat
+    implements(ILocaleNumberFormat)
 
     def __init__(self, klass):
         """Initialize object."""
@@ -285,7 +286,7 @@
 class LocaleCurrency:
     __doc__ = ILocaleCurrency.__doc__
 
-    __implements__ = ILocaleCurrency
+    implements(ILocaleCurrency)
 
     def __init__(self, id):
         """Initialize object."""
@@ -299,7 +300,7 @@
 class Locale:
     __doc__ = ILocale.__doc__
 
-    __implements__ = ILocale
+    implements(ILocale)
 
     def __init__(self, id):
         self.id = id


=== Zope3/src/zope/i18n/negotiator.py 1.5 => 1.5.10.1 ===
--- Zope3/src/zope/i18n/negotiator.py:1.5	Thu May  1 15:35:42 2003
+++ Zope3/src/zope/i18n/negotiator.py	Sun Jun 22 10:23:43 2003
@@ -19,10 +19,11 @@
 from zope.i18n.interfaces import INegotiator
 from zope.i18n.interfaces import IUserPreferredLanguages
 from zope.component import getAdapter
+from zope.interface import implements
 
 class Negotiator:
 
-    __implements__ = INegotiator
+    implements(INegotiator)
 
     def getLanguage(self, langs, env):
         envadapter = getAdapter(env, IUserPreferredLanguages)


=== Zope3/src/zope/i18n/simpletranslationservice.py 1.8 => 1.8.12.1 ===
--- Zope3/src/zope/i18n/simpletranslationservice.py:1.8	Thu Apr 17 16:05:13 2003
+++ Zope3/src/zope/i18n/simpletranslationservice.py	Sun Jun 22 10:23:43 2003
@@ -20,6 +20,7 @@
 
 from zope.component import getService
 from zope.i18n.interfaces import ITranslationService
+from zope.interface import implements
 
 
 # Set up regular expressions for finding interpolation variables in text.
@@ -44,7 +45,7 @@
        Note: This Translation Service does not implemen
     """
 
-    __implements__ =  ITranslationService
+    implements(ITranslationService)
 
 
     def __init__(self, messages=None):


=== Zope3/src/zope/i18n/translate.py 1.7 => 1.7.12.1 ===
--- Zope3/src/zope/i18n/translate.py:1.7	Thu Apr 17 16:05:13 2003
+++ Zope3/src/zope/i18n/translate.py	Sun Jun 22 10:23:43 2003
@@ -18,6 +18,7 @@
 
 from zope.i18n.interfaces import ITranslator
 from zope.component import getService
+from zope.interface import implements
 
 
 class Translator:
@@ -27,7 +28,7 @@
     the domain, context, and target language.
     """
 
-    __implements__ = ITranslator
+    implements(ITranslator)
 
     def __init__(self, locale, domain, context=None):
         """locale comes from the request, domain specifies the application,