Edgewall Software

Ticket #393: genshi-0.6-filter.i18n.2.patch

File genshi-0.6-filter.i18n.2.patch, 916 bytes (added by Guillaume Pratte <guillaume@…>, 12 years ago)

This crude patch make it work for me.

  • genshi/filters/i18n.py

    old new  
    694694            # handle different events that can be localized
    695695            if kind is START:
    696696                tag, attrs = data
    697                 if tag.localname in [t.localname for t in self.ignore_tags] or \
     697                if tag in self.ignore_tags or \
    698698                        isinstance(attrs.get(xml_lang), basestring):
    699699                    skip += 1
    700700                    yield kind, data, pos
     
    821821
    822822            if kind is START and not skip:
    823823                tag, attrs = data
    824                 if tag.localname in [t.localname for t in self.ignore_tags] or \
     824                if tag in self.ignore_tags or \
    825825                        isinstance(attrs.get(xml_lang), basestring):
    826826                    skip += 1
    827827                    continue