Hi,
I wanted to add translator credits and it looked to me that, instead of
waiting bug #518218 to be implemented, it is better to use existing
feature --- addendum.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518218
My conclusion: It is not so simple for DocBook module. It does not
work as it used to work under DebianDoc SGML .
Here is why.
This addendum feature is serious headache to be honest. It seems to be run on
section-by-section of XML source instead of actual lines.
When I have french version of maint-guide without addendum but just
translated from base English version after DocBook conversion.
| <title>Guide du nouveau responsable Debian</title>
| <bookinfo>
| <authorgroup>
| <author> <personname> <firstname>Josip</firstname>
<surname>Rodin</surname> </personname>
<email>joy-mg(a)debian.org</email> <contrib>(original
contents)</contrib> </author>
| <author> <personname> <firstname>Osamu</firstname>
<surname>Aoki</surname> </personname>
<email>osamu(a)debian.org</email> <contrib>(updated
contents)</contrib> </author>
|
| <!-- Add othercredit role="translator" via po4a/translator.*.addendum
-->
| </authorgroup>
| ...
| <legalnotice>
| <para>
| Ce document peut être utilisé selon les termes de la Licence publique
| générale de GNU version 2 ou suivante.
| ...
| </para>
| </legalnotice>
| </bookinfo>
| ...
I naturally want to do following using stable comment text:
| PO4A-HEADER:mode=after;position=othercredit;beginboundary=^
| <othercredit role="translation">Traduction par
<personname><firstname>Frédéric<firstname>
<lastname>Dumont</lasname></personname><email>frederic.dumont(a)easynet.be</email></othercredit>
Then this whole thing is added after "</bookinfo>". Oh, no. As I
experimented, the whole "<bookinfo>...</bookinfo>" section seems to
be
treated as a single unit for addendum. I have no way to insert text
here where addendum is required.
For now, I decided to add comment lines where changes are needed and use
unified diff and patch to make required changes available.
Isn't this patch approach simpler and more generic? All we need to do
is to add
| PO4A-HEADER:mode=patch
... place patch file
Hmm... since current addendum is done within Perl, it may be cleaner
doing this after normal po4a-translate by applying series of patches:
01_foo.fr.patch, 02_bar.fr.patch, ... I guess I add this feature to my
makefile for now.
Osamu