mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
127 stars 62 forks source link

po4a modifes the msgid from man page #445

Open goeranu opened 11 months ago

goeranu commented 11 months ago

After having translated the manual page for test.1 to Swedish, I noticed the translation's synopsis comes out incorrect. The underlying problem seems to be that po4a modifies the source, which fooled me into giving an incorrect translation.

More exactly, this line is part of the original manual page:

.B "[\& ]\&"

In the pot file generated by po4a this shows up like this:

msgid "B<[\\& ]\">"

Notice that the final \\& has been changed into \". That is, the roff code for a zero-width mark has become a double quote as part of the string.

(Since this string doesn't actually contain anything to translate, I just copied it to the msgstr, resulting in the double quotes showing up in the final manual page. Now knowing about the bug, I can obviously work around it in this particular case.)

I attach an example with a very much stripped down manual page, and the result of running po4a on it.

po4a-bug.tar.gz