changeset 468:77919e46413b stable-0.4.x

Ported [566] and [567] to 0.4.x.
author cmlenz
date Sat, 28 Apr 2007 23:07:15 +0000
parents f9d27918bc34
children b9303e10cc2a
files genshi/filters/i18n.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/filters/i18n.py
+++ b/genshi/filters/i18n.py
@@ -71,7 +71,8 @@
         QName('script'), QName('http://www.w3.org/1999/xhtml}script'),
         QName('style'), QName('http://www.w3.org/1999/xhtml}style')
     ])
-    INCLUDE_ATTRS = frozenset(['title', 'alt'])
+    INCLUDE_ATTRS = frozenset(['abbr', 'alt', 'label', 'prompt', 'standby',
+                               'summary', 'title'])
 
     def __init__(self, translate=gettext, ignore_tags=IGNORE_TAGS,
                  include_attrs=INCLUDE_ATTRS):
@@ -227,7 +228,8 @@
                             if text:
                                 yield pos[1], None, text
                         else:
-                            for lineno, funcname, text in harvest(value):
+                            for lineno, funcname, text in self.extract(value,
+                                    gettext_functions):
                                 yield lineno, funcname, text
 
             elif kind is TEXT:
@@ -264,5 +266,6 @@
 
             elif kind is SUB:
                 subkind, substream = data
-                for lineno, funcname, text in self.harvest(substream):
+                for lineno, funcname, text in self.extract(substream,
+                                                           gettext_functions):
                     yield lineno, funcname, text
Copyright (C) 2012-2017 Edgewall Software