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

Jim Fulton jim@zope.com
Sat, 19 Jan 2002 12:38:18 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	IMessageCatalog.py 
Log Message:
Simplified interface, effectively merging source language and 
domain and making the domain more explicit.


=== Zope3/lib/python/Zope/I18n/IMessageCatalog.py 1.1.2.2 => 1.1.2.3 ===
     """Translation Service
 
-    This interface provides methods for translating text, including
+    This interface provides a method for translating text, including
     text with interpolation.
 
     When we refer to text here, we mean text that follows the standard
     Zope 3 text representation (tbd).
+    """
+
+    def translateSequence(source_sequence, domain,
+                          context=None,
+                          destination_language_tag=None):
+        """Translate a source sequence that represents text with interpolation
+
+        The source sequence is a sequence of text and IVariable
+        object. The IVariable objects define interpolation names for
+        data to be interpolated during or after translation.
 
-    Standard arguments:
+        The domain is used to specify which translation to use.
+        Different products will often use a specific domain naming
+        translations supplied with the product.  A catalog could
+        support multiple domains, for example to support multiple
+        source languages.
+
+        Optional arguments:
 
         destination_language_tag -- The language tag of the langauge
                                     to translate to.
@@ -40,38 +56,6 @@
         passed. Otherwise a TypeError will be raised.
 
         Also note that languages tags are defined by RFC 1766.
-
-        domain -- The domain can be used to request spcialized
-                  translations, for example for a specific product or
-                  topic like dbobjects or calendaring.
-    """
-
-    def getTranslation(message_id,
-                       context=None,
-                       destination_language_tag=None,
-                       domain=None):
-        """Get the translation for a translation id
-
-        The message id provide a language-independent identifier for a
-        message. 
-
-        A sequence is returned including translated text and IVariable
-        objects. 
-        """
-
-    def translateSequence(source_sequence,
-                          context=None,
-                          source_language_tag=None,
-                          destination_language_tag=None,
-                          domain=None):
-        """Translate a source sequence that represents text with interpolation
-
-        The source sequence is a sequence of text and IVariable
-        object. The IVariable objects define interpolation names for
-        data to be interpolated during or after translation.
-
-        The source language tag is either specified here or uses the
-        default defined by the service.
 
         A sequence is returned including translated text and IVariable
         objects.