Hi!
While playing with po4a I found a problem, which does not occur very often,
but it might. Assume the following table (in docbook) should be translated:
<informaltable>
<tgroup cols='2'>
<tbody>
<row>
<entry>right</entry>
<entry>wrong</entry>
</row>
<row>
<entry>right</entry>
<entry>left</entry>
</row>
</tbody>
</tgroup>
</informaltable>
po4a-gettextize -f sgml makes the following .pot out of this:
# type: <entry></entry>
#: ./testproj.xml:45 ./test_chapter.xml:16
msgid "right"
msgstr ""
# type: <entry></entry>
#: ./testproj.xml:45 ./test_chapter.xml:16
msgid "wrong"
msgstr ""
# type: <entry></entry>
#: ./testproj.xml:45 ./test_chapter.xml:20
msgid "left"
msgstr ""
As you see: just 3 strings as "right" appeared twice in the source. But this
is the problem: in english the opposite of left and the opposite of wrong are
the same word - in most other languages they aren't. gettext has one chapter
about this in its documentation. They recommend to prefix those strings,
like:
wrong_right
left_right
and to cut off everything before the _ before displaying it. Any suggestions
on how to handle this in docbook/po4a?
Best regards,
Heiner