From: Charl v. N. <ch...@us...> - 2006-02-17 12:10:49
|
Update of /cvsroot/translate/src/translate/convert In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6526/translate/convert Modified Files: test_html2po.py Log Message: If the 'lang' attribute is placed on the 'html' element, '<head>' incorrectly becomes one of the translatable strings in the output. Index: test_html2po.py =================================================================== RCS file: /cvsroot/translate/src/translate/convert/test_html2po.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test_html2po.py 16 Feb 2006 06:27:57 -0000 1.1 +++ test_html2po.py 17 Feb 2006 12:10:44 -0000 1.2 @@ -18,3 +18,12 @@ markup = "<html><head><title>My title</title></head><body><h1>My heading</h1></body></html>" pofile = self.html2po(markup) assert len(pofile.units) > 0 + + def test_htmllang(self): + """Test 'lang' attribute on 'html' element""" + markup = "<html lang=\"en\"><head><title>My title</title></head><body></body></html>" + badpo = "<head>" + pofile = self.html2po(markup) + print str(pofile) + assert len(pofile.units) > 0 + assert str(pofile).find(badpo) == -1 |