xmlto validity errors when years used in translator-credits
I ran into some problems running update-xml-to-txt-html.sh
after having updated the Swedish help translation:
Running xmlto -o sv/html/ html sv/genius.xml
xmlto: /home/anders/git/genius/help/sv/genius.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
/home/anders/git/genius/help/sv/genius.xml:127: element othercredit: validity error : Element othercredit content does not follow the DTD, expecting (honorific | firstname | surname | lineage | othername | affiliation | authorblurb | contrib)+, got (personname email )
/home/anders/git/genius/help/sv/genius.xml:127: element othercredit: validity error : No declaration for attribute class of element othercredit
/home/anders/git/genius/help/sv/genius.xml:128: element personname: validity error : No declaration for element personname
Document /home/anders/git/genius/help/sv/genius.xml does not validate
More testing show that the line itstool -m messages.mo -o sv/ C/genius.xml
changed the help/sv/genius.xml
file to have xml not following the DTD.
Marking the string translator-credits
as fuzzy works around the problem. Some more testing with the translation for that string show that the string Anders Jonsson <anders.jonsson@norsjovallen.se>, 2016, 2021, 2022
now causes validity error, while just using Anders Jonsson <anders.jonsson@norsjovallen.se>
is OK.
Workaround: don't use years in the translator string, and change the translator comment to reflect that. It is now:
Put one translator per line, in the form
NAME <EMAIL>, YEAR1, YEAR2
, but the years should now be removed.
Not sure where a real fix should be done, that string seems unstable if it's that easy to break the syntax.