[Zope-Checkins] CVS: Zope3/lib/python/Zope/I18n - Domain.py:1.3 IDomain.py:1.3

Barry Warsaw barry@wooz.org
Wed, 12 Jun 2002 11:51:27 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/I18n
In directory cvs.zope.org:/tmp/cvs-serv15756/lib/python/Zope/I18n

Modified Files:
	Domain.py IDomain.py 
Log Message:
Code and comment cleanup.


=== Zope3/lib/python/Zope/I18n/Domain.py 1.2 => 1.3 ===
         self.domain = domain
 
-
     def getPlace(self):
         """Return the place this domain was created for."""
         return self._place
 
-
     def getDomainName(self):
         """Return the domain name"""
         return self._domain
     
-
-    ############################################################
-    # Implementation methods for interface
-    # IDomain.py
+    # IDomain interface methods
 
     def translate(self, source, mapping=None, context=None,
                   target_language=None):
-        'See Zope.I18n.IDomain.IDomain'
+        """See Zope.I18n.IDomain.IDomain"""
 
         # lookup the correct translation service
         service_manager = getServiceManager(self.place)
@@ -51,6 +46,3 @@
 
         return service.translate(self.domain, source, mapping, context,
                                  target_language)
-
-    #
-    ############################################################


=== Zope3/lib/python/Zope/I18n/IDomain.py 1.2 => 1.3 ===
 
 class IDomain(Interface):
-    """Since it is often tedious to always specify a domain and place for a
-       particular translation, the idea of a Domain object was created, which
-       allows to save the place and domain for a set of translations.
+    """A translation domain.
 
-       Usage:
+    Since it is often tedious to always specify a domain and a place for a
+    particular translation, the idea of a Domain object was created, which
+    allows to save the place and domain for a set of translations.
 
-       domain = Domain(self, 'MyProduct')
-       domain.translate('MyProductTitle', context)
+    Usage:
 
-       Constructor Arguments:
+        domain = Domain(self, 'MyProduct')
+        domain.translate('MyProductTitle', context)
+
+    Constructor Arguments:
 
          place -- A location where the Domain should look for the translation
                   service.
 
-         domain -- Secifies the domain to look up for the translation. See
+         domain -- Secifies the domain to look up for the translation.  See
                    ITranslationService for more details on domains.
     """
-
 
     def translate(msgid, mapping=None, context=None, target_language=None):
         """Translate the the source to its appropriate language.