[Po4a-devel]Some comments

Denis Barbier barbier@linuxfr.org
Wed, 14 Apr 2004 08:40:26 +0200


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 ;)

> 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?

You can translate these files, they are partially translated into French
at the moment.  There are no other files to translate.

> 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 am reluctant for such a move, XML is not SGML, and if we claim that
po4a supports XML, many errors will be reported and will be fixed only
with a dedicated XML backend.

> 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.

Thanks for the reminder.

> 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)

Absolutely.

> The inclusion entities are also important, but if we could treat each file 
> alone it would be good enough for now :)
> 
> 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.
> 
> 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 will have a look at these bugs, thanks for your report.

Denis