On Tue, Apr 13, 2004 at 08:03:51PM +0200, Jordi Vilalta wrote:
Hello.
I'm following the po4a development for some months. I think that it has so
much future, since it's well structured and it can ease a lot the work of
translating documents. Good job ;)
Thanks a lot.
I would like to help in the development, but I've never used Perl
:(
Then I thought about translating the po4a itself to spanish (es) and
catalan (ca). I've seen po/bin/po4a.pot and po/pod/po4a-pod.pot. May I
translate both? And something else?
Nope, tranlating those two files would be a great improvements, since having
a program intended to help the translators not translated is not very
professionnal...
Please repport any inconsistency or error you may found in the process, so
that we can improve the english version.
Recently I tried the po4a-gettextize with a DocBook XML document that
I'm
starting to write and I found some problems. (I'm also newbie in DocBook,
so some of the following issues may not be po4a problems)
At first it gave me the next error:
Argument "pi" isn't numeric in sprintf at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 618, <IN> line 2.
Use of uninitialized value in sprintf at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 618, <IN> line 2.
ossa-pre/index.xml:1:0: Unknown SGML event type:
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:
po4a::sgml: /tmp/sag.sgml seems to be a XML document. It will be attempted to handle it as
a SGML document.
po4a::sgml: Feel lucky if it works, help us implementing a proper XML backend if it does
not.
and then try to proceed as if this line where not there. But I agree with
Denis, pretending that we support XML because of this crude hack would be an
error. It's not even documented yet, and I'm not sure I really want to
document it...
About the entities there are some issues. The first one is in the
included
files, which I think it's already been reported (bug #300591). It repeats
the following lines infinitely:
substr outside of string at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 226.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 227.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 228.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.2/Locale/Po4a/Sgml.pm line 229.
This is now fixed (in CVS).
The other one is about standard entities (simple code expansions),
whose
contens should mostly be translated. It seems that currently they're
simply ignored. They can have some difficulty in parsing, because they can
contain directly the text to be translated, or some kind of tags, that
should also be parsed. It's important to be able to easily translate
entities, because they are widely used for repeated fragments of text. (At
the beginning it could be nice to get all the string of the entity to
translate)
Uhm. Are they expended in the text to translate (my intention) or really
ignored? I know that a really proper mecanism to translate them would be
needed, but in the meanwhile, I was thinking that expending them in the text
would be better than ignoring them. I tryied to re-read the source code to
see what is done in there, but it is made rather complicated by the
inclusing entities handling, which is far from being trivial.
Could you please retest the regular entities to see exactly how they are
handled ? If they are ignored, could you please open a bug on the web site
attaching a simple example file? I know I could do so myself, but I'm really
really short of time...
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?
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.
It's what I've noticed from the first experience with po4a.
It would be
very nice if these things could be worked out, because those could enable
people to use po4a with the most commonly used DocBook features.
I did my best to fix some of the issues. Thanks for repporting them, and for
your interest in that project. Please continue to provide us feedback.
Bye, Mt.
--
Ian Fleming was a UNIX fan! How do I know?
Well, James Bond had the (license to kill) number 007,
i.e., he could execute anyone!