# HG changeset patch # User palgarvio # Date 1217979050 0 # Node ID 7a3ab3e0dcb0cdd8a191dda09c3602be575774f6 # Parent 3a0cea7b8050f07235289a8a2dbeb1344d552ccb Fix `babel.support.Translations.__repr__` and make it less stupid; Include the project name and version defined on the catalog loaded. diff --git a/babel/support.py b/babel/support.py --- a/babel/support.py +++ b/babel/support.py @@ -281,8 +281,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' @@ -321,7 +321,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 @@ -336,4 +336,5 @@ return self def __repr__(self): - return "<%s>" % (type(self).__name__) + return '<%s: "%s">' % (type(self).__name__, + self._info.get('project-id-version'))