[Po4a-devel] Re: Problems with Docbook/Xml module

Thomas Huriaux thomas.huriaux at kti.ae.poznan.pl
Fri Oct 21 15:00:29 UTC 2005


Hi again,

Thomas Huriaux <thomas.huriaux at kti.ae.poznan.pl> (21/10/2005):
> I'm currently trying to use po4a for the aptitude documentation, and
> here are the few problems I have:
> * if there is a comment in a sentence such as
>          In the <!-- TODO: <link linkend='secHier'>
>          -->hierarchy editor, stores the hierarchy location
>   then the result will be:
>          msgid "In the"
> 	 msgstr ""
> 
> 	 msgid "hierarchy editor, stores the hierarchy location"
> 	 msgstr ""
> 
> * the <screen> tag in Docbook must be set as translatable and "no-wrap"
>   It is easy to fix in Docbook.pm, please just add in the tags option:
> 	+               W<screen>
> 
> * if there is a footnote, such as
> 	<para>
> 	  Begining of the sentence
> 	    <footnote><para>footnote text</para></footnote>
> 	  end of the sentence.
> 	</para>
>   then once again it will be divided into three strings:
>         msgid "Begining of the sentence"
> 	msgid "footnote text"
> 	msgid "end of the sentence."
> 
>   I'm afraid that for this last problem, there is no easy solution and
>   we will have to keep the current situation.
> 
> * In the Debian package, there is still the encoding problem in the xml
>   header, which has been fixed in the CVS version. I'm waiting for a new
>   release :-)

Another problem found:
  <book lang="en">
will be translated
  <book lang="fr
  "

I think the solution is to modify Xml.pm as following:
        if ($options->{'type'} eq "tag") {
	[...]
        } elsif ($options->{'type'} eq "attribute") {
                $comment = "Attribute'".$options->{'attribute'}."' of: ".$self->get_path;
		$wrap = 0;
        } else {

i.e. to force $wrap = 0 for the attributes;

A related question: is there any way if the original does not contain
the lang="en" attribute to add it in the translations? I don't think,
but we never know.

Cheers,

-- 
Thomas Huriaux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20051021/f5eaeb12/attachment.pgp


More information about the Po4a-devel mailing list