Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
erp5
Commits
4b8df3d6
Commit
4b8df3d6
authored
Mar 06, 2012
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve verification messages.
parent
6e63a1db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py
bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py
+5
-4
bt5/erp5_run_my_doc/bt/revision
bt5/erp5_run_my_doc/bt/revision
+1
-1
No files found.
bt5/erp5_run_my_doc/ExtensionTemplateItem/ERP5RunMyDocs.py
View file @
4b8df3d6
...
...
@@ -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
...
...
bt5/erp5_run_my_doc/bt/revision
View file @
4b8df3d6
62
\ No newline at end of file
63
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment