From 4b8df3d6b426a74758b6f718dbb61cfe1d109765 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Tue, 6 Mar 2012 19:15:53 -0300 Subject: [PATCH] Improve verification messages. --- .../ExtensionTemplateItem/ERP5RunMyDocs.py | 9 +++++---- bt5/erp5_run_my_doc/bt/revision | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py b/bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py index 2c452acd21..2cb02ca2f1 100644 --- a/bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py +++ b/bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py @@ -140,6 +140,7 @@ def validateHTML5Document(text): section_list = root.xpath('//section') count = 0 error_list = [] + # XXX Lack of translation support here. for section in section_list: count += 1 if section.xpath("h1") == []: @@ -147,16 +148,16 @@ def validateHTML5Document(text): if section.get("class") in ["screenshot", "illustration"]: if section.xpath("img") == []: - error_list.append("Section %s has class %s but do not have an image." % (count, section.get("class"))) + error_list.append("Section %s has class %s but it doesn't have any image." % (count, section.get("class"))) else: if section.xpath("img")[0].get("title") == None: - error_list.append("At section %s, img has no title" % count) + error_list.append("At section %s, img has no title attribute." % count) if section.xpath("img")[0].get("alt") == None: - error_list.append("At section %s, img has no alt" % count) + error_list.append("At section %s, img has no alt attribute." % count) if section.xpath("details") == []: - error_list.append("Section %s has no details." % (count)) + error_list.append("Section %s has no details tag." % (count)) return error_list diff --git a/bt5/erp5_run_my_doc/bt/revision b/bt5/erp5_run_my_doc/bt/revision index b2412e34df..4e9e288487 100644 --- a/bt5/erp5_run_my_doc/bt/revision +++ b/bt5/erp5_run_my_doc/bt/revision @@ -1 +1 @@ -62 \ No newline at end of file +63 \ No newline at end of file -- 2.30.9