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'
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
return self
def __repr__(self):
- return "<%s>" % (type(self).__name__)
+ return '<%s: "%s">' % (type(self).__name__,
+ self._info.get('project-id-version'))