]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Make the Genshi extractor wrap the `ignore_attrs` and `ignore_tags` in `QName` instan...
authorChristopher Lenz <cmlenz@gmail.com>
Fri, 15 Jun 2007 19:42:50 +0000 (19:42 +0000)
committerChristopher Lenz <cmlenz@gmail.com>
Fri, 15 Jun 2007 19:42:50 +0000 (19:42 +0000)
babel/messages/extract.py

index ab04b67d05f904de2b1cd7010ba8819860c550e3..fd4354c28e9972307dbd75fdee3ca9630360d0ff 100644 (file)
@@ -245,6 +245,7 @@ def extract_genshi(fileobj, keywords, comment_tags, options):
     :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
     :rtype: ``iterator``
     """
+    from genshi import QName
     from genshi.filters.i18n import Translator
     from genshi.template import MarkupTemplate
 
@@ -256,10 +257,10 @@ def extract_genshi(fileobj, keywords, comment_tags, options):
 
     ignore_tags = options.get('ignore_tags', Translator.IGNORE_TAGS)
     if isinstance(ignore_tags, basestring):
-        ignore_tags = ignore_tags.split()
+        ignore_tags = [QName(tag) for tag in ignore_tags.split()]
     include_attrs = options.get('include_attrs', Translator.INCLUDE_ATTRS)
     if isinstance(include_attrs, basestring):
-        include_attrs = include_attrs.split()
+        include_attrs = [QName(attr) for attr in include_attrs.split()]
 
     tmpl = template_class(fileobj, filename=getattr(fileobj, 'name'),
                           encoding=encoding)