[Po4a-devel][CVS] po4a/lib/Locale/Po4a Sgml.pm,1.20,1.21
by Martin Quinson
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv24016
Modified Files:
Sgml.pm
Log Message:
Some more missing tags for DocBook [Michael Wiedmann]
Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- Sgml.pm 26 May 2004 18:24:47 -0000 1.20
+++ Sgml.pm 29 Jun 2004 03:57:21 -0000 1.21
@@ -354,12 +354,12 @@
"member msgaud msglevel msgorig ".
"option orgname ".
"para phrase pubdate publishername primary ".
- "refclass refdescriptor refentrytitle refmiscinfo refname refpurpose releaseinfo remark revnumber ".
- "screeninfo seg segtitle simpara subtitle synopfragmentref ".
- "term title titleabbrev",
+ "refclass refdescriptor refentrytitle refmiscinfo refname refpurpose releaseinfo remark revnumber revremark ".
+ "screeninfo seg secondary segtitle simpara subtitle synopfragmentref ".
+ "term tertiary title titleabbrev",
"empty" => "audiodata colspec graphic imagedata textdata sbr videodata xref",
"indent" => "abstract answer appendix article articleinfo audioobject author authorgroup ".
- "bibliodiv bibliography blockquote blockinfo book bookinfo ".
+ "bibliodiv bibliography blockquote blockinfo book bookinfo bridgehead ".
"callout calloutlist caption caution chapter cmdsynopsis copyright ".
"dedication ".
"entry ".
20 years, 6 months
[Po4a-devel]Increased line number
by Jordi Vilalta
Hello,
I noticed that the line number returned by shiftline was one more than it
should be. I think that here's the bug:
...
my $linenum=1;
...
while (defined (my $textline = <INPUT>)) {
$linenum++;
my $ref="$filename:$linenum";
...
With this, the first line is numbered 2, and so on.
The line 338 on TransTractor.pm should say:
my $linenum=0;
Regards,
Jordi Vilalta
20 years, 6 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a TransTractor.pm,1.17,1.18
by Martin Quinson
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv22892
Modified Files:
TransTractor.pm
Log Message:
Fix the by one offset in line number references [Jordi]
Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- TransTractor.pm 31 May 2004 04:47:36 -0000 1.17
+++ TransTractor.pm 29 Jun 2004 03:48:29 -0000 1.18
@@ -335,7 +335,7 @@
my $self=shift;
my $filename=shift
or croak(dgettext("po4a","Can't read from file without having a filename")."\n");
- my $linenum=1;
+ my $linenum=0;
open INPUT,"<$filename"
or croak (sprintf(dgettext("po4a","Can't read from %s: %s"),$filename,$!)."\n");
20 years, 6 months
[Po4a-devel]< inside CDATA section
by Michael Wiedmann
Everything inside a CDATA section that looks like starting a new tag
is not handled:
<programlisting><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
...
$ po4a-gettextize -f sgml -m db2latex-howto.xml
...
db2latex-howto.xml:185:0: Unknown SGML event type:
Michael
--
mw(a)miwie.in-berlin.de http://www.miwie.org
20 years, 6 months
[Po4a-devel]Some comments
by Jordi Vilalta
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 ;)
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?
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)
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.
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)
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.
Thanks for your time,
Jordi Vilalta
20 years, 6 months