]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
change constructor for babel.support.Translations to __init__(fp=None, domain=None...
authorFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Mon, 20 Aug 2012 19:34:42 +0000 (19:34 +0000)
committerFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Mon, 20 Aug 2012 19:34:42 +0000 (19:34 +0000)
babel/support.py
babel/tests/support.py

index a1a8b1f77c94b913daa21de268d2143393aaf4f7..6c6ebf456d7753c8cf3e586c8b95e999f4e1abab 100644 (file)
@@ -524,14 +524,13 @@ class Translations(NullTranslations, gettext.GNUTranslations):
 
     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
index 5fba9a93218acd3e39864dbb070fe5f3b1d474b1..5b1b5655b597ae3035bdc461b9733074e11aa5c6 100644 (file)
@@ -170,7 +170,7 @@ class NullTranslationsTestCase(unittest.TestCase):
         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):