DEFAULT_DOMAIN = 'messages'
- def __init__(self, fileobj=None, domain=None):
+ def __init__(self, fp=None, domain=None):
"""Initialize the translations catalog.
- :param fileobj: the file-like object the translation should be read
- from
+ :param fp: the file-like object the translation should be read from
:param domain: the message domain (default: 'messages')
"""
- super(Translations, self).__init__(fp=fileobj)
+ super(Translations, self).__init__(fp=fp)
self.domain = domain or self.DEFAULT_DOMAIN
@classmethod
fp = StringIO()
write_mo(fp, Catalog(locale='de'))
fp.seek(0)
- self.translations = support.Translations(fileobj=fp)
+ self.translations = support.Translations(fp=fp)
self.null_translations = support.NullTranslations(fp=fp)
def method_names(self):