Mercurial > babel > old > mirror
changeset 404:7a3ab3e0dcb0
Fix `babel.support.Translations.__repr__` and make it less stupid; Include the project name and version defined on the catalog loaded.
author | palgarvio |
---|---|
date | Tue, 05 Aug 2008 23:30:50 +0000 |
parents | 3a0cea7b8050 |
children | 209a1ec1ee38 |
files | babel/support.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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'))