Ok, here is a much bigger patch:
Thanks to Nekral for pointing out 2 problems:
- Those two spaces around the pushline() call where wrong,
but so was what I did. After further thinking, it's
actually obvious that you _cannot_ touch leading and
trailing spaces. They are now conserved, and all we do is
remove multiple spaces.
- The title/alt attribute translation was indeed wrong. Now
the <img> tag is rewritten entirely.
Additional things:
- tokens with no content shall be translated no more (things
like <b>hello<b>, <i>world</i> would generated a msgid ",
")
- Test suite added. Thanks to Denis for making me do this
(made me find potential problems) and Jordi for pointing
po4a-normalize.
Enjoy!
Y. - damn, soon I'll run out of excuses for not translating
the site.