Translators heads up: XHTML errors in language packs

Re: Translators heads up: XHTML errors in language packs

by David Mudrák -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
I found the following script useful when looking for problematic parts of the Czech help files. It just concatenates all HTML help files into one big file, which can be then processed by a validating tool (Firefox plugin "HTML validator" in my case). Feel free to expand it and post your modifications here!

#!/bin/bash

OUTPUT=~/tmp/allhelp.html

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="cs" xml:lang="cs">
<head>
 <title>Moodle Help Files</title>
 <style type="text/css">.filename { background-color: #ddd; color: red; }</style>
</head>
<body>' > $OUTPUT

find . -name "*.html" -printf "<div class=\"filename\">" -print -printf "</div>\n" -exec cat '{}' \; >> $OUTPUT

echo '</body></html>' >> $OUTPUT