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

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


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

Modified Files:
	IMessageCatalog.py 
Log Message:
Code and comment cleanup.

Also all `id' arguments are changed to `msgid' for consistency.


=== Zope3/lib/python/Zope/I18n/IMessageCatalog.py 1.2 => 1.3 ===
 
 class IMessageCatalog(Interface):
-    """Translation Service
+    """A catalog (mapping) of message ids to message text strings.
 
     This interface provides a method for translating a message or message id,
-    including text with interpolation. The message catalog basically serves as
-    a fairly simple mapping object.
+    including text with interpolation.  The message catalog basically serves
+    as a fairly simple mapping object.
 
-    A single Message Catalog represents a particular language and
-    domain. Therefore you will have the following constructor arguments:
+    A single message catalog represents a specific language and domain.
+    Therefore you will have the following constructor arguments:
 
-    language -- The language of the returning language. This is a read-only
+    language -- The language of the returned messages.  This is a read-only
                 attribute.
 
-    domain -- The translation domain for this messages. This is a read-only
-              attribute. See ITranslationService.
+    domain -- The translation domain for these messages.  This is a read-only
+              attribute.  See ITranslationService.
 
-    When we refer to text here, we mean text that follows the standard
-    Zope 3 text representation.
+    When we refer to text here, we mean text that follows the standard Zope 3
+    text representation.
     """
 
-    def getMessage(id):
-        """Return the appropriate text for the given id. As all get methods,
-           this will raise an error, if the id is not found
+    def getMessage(msgid):
+        """Get the appropriate text for the given message id.
+
+        An exception is raised if the message id is not found.
         """
 
-    def queryMessage(id, default=None):
-        """Return the appropriate test for the given id, but if the id is not
-           found, it should not raise an error, instead returning default. If
-           default is None, then the id itself is returned.
+    def queryMessage(msgid, default=None):
+        """Look for the appropriate text for the given message id.
+
+        If the message id is not found, no exception is raised.  Instead
+        default is returned, but if default is None, then msgid itself is
+        returned.
         """
-        
+
     def getLanguage():
-        """Return the langauge this message catalog is representing.
+        """Return the language this message catalog is representing.
         """
         
     def getDomain():
@@ -59,7 +62,8 @@
         """
 
     def getIdentifier():
-        """Return a identifier for this message catalog. Note that this
-           identifier does not have to be unique as several message catalog
-           could serve the same domain and language.
+        """Return an identifier for this message catalog.
+
+        Note that this identifier does not have to be unique as several
+        message catalogs could be serving the same domain and language.
         """