diff babel/support.py @ 407:b12eeaad51c5 stable-0.9.x

Ported [442:446/trunk] to 0.9.x branch.
author cmlenz
date Mon, 25 Aug 2008 10:08:22 +0000
parents c2ae38340540
children d1a27b087ea4
line wrap: on
line diff
--- a/babel/support.py
+++ b/babel/support.py
@@ -268,8 +268,8 @@
     def __setitem__(self, key, value):
         self.value[key] = value
 
-
-class Translations(gettext.GNUTranslations):
+    
+class Translations(gettext.GNUTranslations, object):
     """An extended translation catalog class."""
 
     DEFAULT_DOMAIN = 'messages'
@@ -308,7 +308,7 @@
     def merge(self, translations):
         """Merge the given translations into the catalog.
         
-        Message translations in the specfied catalog override any messages with
+        Message translations in the specified catalog override any messages with
         the same identifier in the existing catalog.
         
         :param translations: the `Translations` instance with the messages to
@@ -323,4 +323,5 @@
         return self
 
     def __repr__(self):
-        return "<%s>" % (type(self).__name__)
+        return '<%s: "%s">' % (type(self).__name__,
+                               self._info.get('project-id-version'))
Copyright (C) 2012-2017 Edgewall Software