1212 no_comments = False
1313except ImportError :
1414 class LexicalHandler :
15- def __init__ (self ):
16- pass
15+ pass
1716 no_comments = True
1817
1918
@@ -22,18 +21,18 @@ def __init__(self, attrlist):
2221 self .isPointsElement , self .isReboundsElement = 0 , 0
2322 self .attrlist = attrlist
2423 self .last_comment = None
25- self .ishex = re .compile ('#[0-9a-fA-F]+\Z' )
24+ self .ishex = re .compile (r '#[0-9a-fA-F]+\Z' )
2625
2726 def comment (self , comment ):
2827 if "TRANSLATORS:" in comment :
2928 self .last_comment = comment
3029
3130 def startElement (self , name , attrs ):
32- for x in ["text" , "title" , "value" , "caption" , "description" ]:
31+ for x in ["text" , "title" , "value" , "caption" , "summary" , " description" ]:
3332 try :
3433 k = six .ensure_str (attrs [x ])
3534 if k .strip () != "" and not self .ishex .match (k ):
36- attrlist .add ((k , self .last_comment ))
35+ attrlist .add ((attrs [ x ] , self .last_comment ))
3736 self .last_comment = None
3837 except KeyError :
3938 pass
@@ -51,7 +50,7 @@ def startElement(self, name, attrs):
5150for arg in sys .argv [1 :]:
5251 if os .path .isdir (arg ):
5352 for file in os .listdir (arg ):
54- if file .endswith (".xml" ):
53+ if ( file .endswith (".xml" ) ):
5554 parser .parse (os .path .join (arg , file ))
5655 else :
5756 parser .parse (arg )
0 commit comments