On Wed, Apr 21, 2004 at 11:44:34PM +0200, Jordi Vilalta wrote:
Hi.
Sorry for the delay in this answer, currently I'm busy with the
university, so I won't be very active. I'll try to work in the
translations when I'll have more free time.
Dude, 2 days are a very quick answer, isn't it?
On Wed, 14 Apr 2004, Martin Quinson wrote:
> On Tue, Apr 13, 2004 at 08:03:51PM +0200, Jordi Vilalta wrote:
>
> [skip intro]
>
> > Recently I tried the po4a-gettextize with a DocBook XML document that I'm
> > starting to write and I found some problems.
[...]
> > Then I deleted the first line, which is xml specific:
> > <?xml version="1.0"?>
> > and this error disappeared. Apart from this line, the rest is a valid SGML
> > DocBook. Would there be an easy way to auto-detect and bypass it? (Then
> > I think you could officialy say that po4a supports DocBook XML documents
> > at the same level as DocBook SGML)
>
> I just commited a fix to the CVS. If this line is found when trying to use
> the SGML backend, it will write the following warning:
[...]
It detects if there is that line, but now it seems it fails when
searching for the DTD:
File kk.xml have an unknown DTD
Supported for now: debiandoc, docbook.
It may be that it is still watching at the first line of the file, not the
second.
Erm, I prefer not to detail what exactly it looks for ;) Let's say that the
CVS version is "a bit broken". Let me commit what I have locally, and it
should do the trick.
Here's what I've tried:
...
<!ENTITY aaa "aeiou">
]>
...
<para>
&aaa;
</para>
...
and in the po generated by po4a-gettextize:
# type: <para></para>
#: kk.xml:26
msgid "&aaa;"
msgstr ""
And you got nothing, right?
po4a skips the generation of msgid containing an entity only (or tags only).
It will now issue a warning when such optimizations are done. Thanks for the
repport. [At least this is what I planned, but the msgid containing spaces
along with entities where not detected. This is also fixed]
It was furthermore impossible to translate the content of the entity because
it was not implemented. This will be fixed as soon as I find the time to
commit my local version into the CVS. At least, I hope so ;)
> > The inclusion entities are also important, but if we could
treat each file
> > alone it would be good enough for now :)
>
> Inclusion entities are handled... What was your problem when using them?
Well, last day I only tried that with included files that had entities
including other files... It wasn't handled. I used the following
construction:
...
<!ENTITY % common SYSTEM "common.ent">
%common;
]>
I don't know if it's somewhat strange. The DocBook parser accepts it.
The common.ent file has only entities, which are extended in the main
document definition.
If that's legal (ie, if nsgmls accepts it, I'll have to accept it. Again,
please fill a bug about this (another one). Do not forget to attach a
example file being valid, but refused by po4a. For example, are you sure
that it's %common; and not &common; ?
Now I've tried to include a file with:
<!ENTITY chapter SYSTEM "chap1.xml">
]>
...
&chapter;
and its contents now appear on the .po as expected.
At least, something works ;)
> > I've also found that there may be some attributes
important to translate
> > (such as the "lang" one), and it seems to be ignored for now.
>
> Yeah, ignoring them is bad. but the parser used for now does not give simple
> access to them. I dunno what to do.
>
Don't worry, that's a minor thing if the rest gets working ;)
It's worthing a bug, also ;)
Thanks for your time, such feedback is very very valuable to the software.
Bye, Mt.
--
Outlook is a good virus spreading tool. It was also doubtfully reported as
able to send mail.