[Po4a-devel] po4a #518218: [DocBook] Add support for translator credits

Osamu Aoki osamu at debian.org
Mon Mar 7 14:24:57 UTC 2011


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 at debian.org</email> <contrib>(original contents)</contrib> </author>
| <author> <personname> <firstname>Osamu</firstname> <surname>Aoki</surname> </personname> <email>osamu at 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 at 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




More information about the Po4a-devel mailing list