Translators heads up: XHTML errors in language packs

Translators heads up: XHTML errors in language packs

by koen roggemans -
Number of replies: 1
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
As a result of bug MDL-13726, we looked at the XHTML compliance of the language packs, and apparently there are quite some problems there. Please use the html codes, used in the English language pack as an example and report bugs if you find problems there. Also please follow the guidelines in http://docs.moodle.org/en/Translation carefully. You might find http://www.webreference.com/xml/reference/xhtml.html also an interesting document.

Preferably every maintainer looks at his/her own language pack, but I'll try to find the time to go through all the files again, starting with the CVS-maintained first. For the non-CVS-maintained ones, I'll send an email to the translator before starting on it.
Average of ratings: -
In reply to koen roggemans

Re: Translators heads up: XHTML errors in language packs

by David Mudrák -
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