[Po4a-devel][CVS] po4a/lib/Locale/Po4a Xml.pm,1.3,1.4
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv19936
Modified Files:
Xml.pm
Log Message:
- Integrated TODO list into the documentation
- Implemented the "caseinsensitive" option
- Now get_string_until receives a hash of options, and there's a new "unquoted"
option, to skip matches between quotes. It's now used to enhance the end of
tag search (in case there's a > quoted into an attribute, for example)
- tag_in_list adapted to work with the proposed tag options syntax (w<...>)
- Changed found_string to receive a hash with info about what it has found, and
it creates the comment (doesn't receive it). This way, derived modules have
all the information to create custom comments
- Implemented the w/W options in front of the tags, to override the default
wrapping (proposed by Martin)
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Xml.pm 19 Jul 2004 14:59:53 -0000 1.3
+++ Xml.pm 25 Jul 2004 09:07:10 -0000 1.4
@@ -114,9 +114,10 @@
=item wrap
Canonizes the string to translate, considering that whitespaces are not
-important, and wraps the translated document.
+important, and wraps the translated document. This option can be overriden
+by custom tag options. See the "tags" option below.
-=item caseinsensitive (TODO)
+=item caseinsensitive
It makes the tags and attributes searching to work in a case insensitive
way. If it's defined, it will treat <BooK>laNG and <BOOK>Lang as <book>lang.
@@ -139,6 +140,12 @@
form <aaa>, but you can join some (<bbb><aaa>) to say that the contents of
the tag <aaa> will only be translated when it's into a <bbb> tag.
+You can also specify some tag options putting some characters in front of
+the tag hierarchy. For example, you can put 'w' (wrap) or 'W' (don't wrap)
+to override the default behavior specified by the global "wrap" option.
+
+Example: W<chapter><title>
+
=item attributes (TODO)
Space-separated list of the tag's attributes you want to translate. You can
@@ -211,14 +218,16 @@
There you can control which strings you want to translate, and perform
transformations to them before or after the translation itself.
-It receives the extracted text, the reference on where it was, and a
-comment that tells if it's an attribute value, a tag content... It must
-return the text that will replace the original in the translated document.
-Here's a basic example of this function:
+It receives the extracted text, the reference on where it was, and a hash
+that contains extra information to control what strings to translate, how
+to translate them and to generate the comment.
+
+It must return the text that will replace the original in the translated
+document. Here's a basic example of this function:
sub found_string {
- my ($self,$text,$ref,$comment)=@_;
- $text = $self->translate($text,$ref,$comment,
+ my ($self,$text,$ref,$options)=@_;
+ $text = $self->translate($text,$ref,"type".$options->{'type'},
'wrap'=>$self->{options}{'wrap'});
return $text;
}
@@ -229,9 +238,25 @@
=cut
sub found_string {
- my ($self,$text,$ref,$comment)=@_;
- $text = $self->translate($text,$ref,$comment,
- 'wrap'=>$self->{options}{'wrap'});
+ my ($self,$text,$ref,$options)=@_;
+
+ my $comment;
+ my $wrap = $self->{options}{'wrap'};
+
+ if ($options->{'type'} eq "tag") {
+ $comment = "Contents of: ".$self->get_path;
+
+ if($options->{'tag_options'} =~ /w/) {
+ $wrap = 1;
+ }
+ if($options->{'tag_options'} =~ /W/) {
+ $wrap = 0;
+ }
+ } else {
+ die dgettext("po4a","po4a::xml: Internal error: unknown string type.")."\n";
+ }
+
+ $text = $self->translate($text,$ref,$comment,'wrap'=>$wrap);
return $text;
}
@@ -296,7 +321,7 @@
# { beginning => "?",
# end => "?",
# breaking => 1,
-# f_translate => \&tag_trans_...},
+# f_translate => \&tag_trans_procins},
{ beginning => "!DOCTYPE",
end => "]",
breaking => 1,
@@ -318,7 +343,7 @@
sub tag_extract_comment {
my ($self,$remove)=(shift,shift);
- my ($eof,@tag)=$self->get_string_until('-->',1,$remove);
+ my ($eof,@tag)=$self->get_string_until('-->',{include=>1,remove=>$remove,unquoted=>1});
return ($eof,@tag);
}
@@ -342,7 +367,12 @@
sub tag_extract_doctype {
my ($self,$remove)=(shift,shift);
- my ($eof,@tag)=$self->get_string_until(']>',1,$remove);
+ my ($eof,@tag)=$self->get_string_until(']>',{include=>1,unquoted=>1});
+ if ($eof) {
+ ($eof,@tag)=$self->get_string_until('>',{include=>1,remove=>$remove,unquoted=>1});
+ } else {
+ ($eof,@tag)=$self->get_string_until(']>',{include=>1,remove=>$remove,unquoted=>1});
+ }
return ($eof,@tag);
}
@@ -501,7 +531,7 @@
($match1,$match2) = ($tag_types[$i]->{beginning},$tag_types[$i]->{end});
if ($line =~ /^<\Q$match1\E/) {
if (!defined($tag_types[$i]->{f_extract})) {
- my ($eof,@lines) = $self->get_string_until(">",1,0);
+ my ($eof,@lines) = $self->get_string_until(">",{include=>1,unquoted=>1});
my $line2 = $self->join_lines(@lines);
#print substr($line2,length($line2)-1-length($match2),1+length($match2))."\n";
if (defined($line2) and $line2 =~ /\Q$match2\E>$/) {
@@ -544,7 +574,7 @@
if (defined($tag_types[$type]->{f_extract})) {
($eof,@tag) = &{$tag_types[$type]->{f_extract}}($self,$remove);
} else {
- ($eof,@tag) = $self->get_string_until($match2.">",1,$remove);
+ ($eof,@tag) = $self->get_string_until($match2.">",{include=>1,remove=>$remove,unquoted=>1});
}
$tag[0] =~ /^<\Q$match1\E(.*)$/s;
$tag[0] = $1;
@@ -621,9 +651,11 @@
=item tag_in_list
-This function returns a boolean value that says if the first argument (a tag
+This function returns a string value that says if the first argument (a tag
hierarchy) matches any of the tags from the second argument (a list of tags
-or tag hierarchies).
+or tag hierarchies). If it doesn't match, it returns 0. Else, it returns the
+matched tag options (the characters in front of the tag) or 1 (if that tag
+doesn't have options).
=cut
@@ -633,12 +665,25 @@
my $i = 0;
while (!$found && $i < @list) {
- my $element = $list[$i];
- if ( $tag =~ /\Q$element\E$/ ) {
-#print $tag."==".$element."\n";
- $found = 1;
+ $list[$i] =~ /(.*?)(<.*)/;
+ my $options = $1;
+ my $element = $2;
+ if ($self->{options}{'caseinsensitive'}) {
+ if ( $tag =~ /\Q$element\E$/i ) {
+ $found = 1;
+ }
+ } else {
+ if ( $tag =~ /\Q$element\E$/ ) {
+ $found = 1;
+ }
+ }
+ if ($found) {
+ if ($options) {
+ $found = $options;
+ }
+ } else {
+ $i++;
}
- $i++;
}
return $found;
}
@@ -708,15 +753,15 @@
sub treat_content {
my $self = shift;
my $blank="";
- my ($eof,@paragraph)=$self->get_string_until('<',0,1);
+ my ($eof,@paragraph)=$self->get_string_until('<',{remove=>1});
while (!$eof and !$self->breaking_tag) {
my @text;
# Append the found inline tag
- ($eof,@text)=$self->get_string_until('>',1,1);
+ ($eof,@text)=$self->get_string_until('>',{include=>1,remove=>1,unquoted=>1});
push @paragraph, @text;
- ($eof,@text)=$self->get_string_until('<',0,1);
+ ($eof,@text)=$self->get_string_until('<',{remove=>1});
if ($#text > 0) {
push @paragraph, @text;
}
@@ -767,14 +812,29 @@
if ( length($self->join_lines(@paragraph)) > 0 ) {
my $struc = $self->get_path;
- my $inlist = $self->tag_in_list($struc,@{$self->{tags}});
+ my $options = $self->tag_in_list($struc,@{$self->{tags}});
+ my $inlist;
+ if ($options eq 0) {
+ $inlist = 0;
+ $options = "";
+ } elsif ($options eq 1) {
+ $inlist = 1;
+ $options = "";
+ } else {
+ $inlist = 1;
+ }
#print $self->{options}{'tagsonly'}."==".$inlist."\n";
if ( $self->{options}{'tagsonly'} eq $inlist ) {
#print "YES\n";
- $self->pushline($self->found_string($self->join_lines(@paragraph),
- $paragraph[1],"Content of tag ".$struc));
+ $self->pushline($self->found_string(
+ $self->join_lines(@paragraph),
+ $paragraph[1], {
+ type=>"tag",
+ tag_options=>$options
+ }));
} else {
#print "NO\n";
+#TODO: should print that this tag isn't translated in verbose mode
$self->pushline($self->join_lines(@paragraph));
}
}
@@ -818,20 +878,35 @@
=item get_string_until
This function returns an array with the lines (and references) from the input
-stream until it finds the first argument. The second argument is a boolean
-that says if the returned array should contain the searched text or not. The
-third argument is another boolean that says if the returned stream should be
-removed from the input or not.
+stream until it finds the first argument. The second argument is an options
+hash. Value 0 means disabled (the default) and 1, enabled.
+
+The valid options are:
+
+=over 4
+
+=item include
+
+This makes the returned array to contain the searched text
+
+=item remove
+
+This removes the returned stream from the input
+
+=item unquoted
+
+This ensures that the searched text is outside any quotes
=cut
sub get_string_until {
- # search = the text we want to find (at the moment it can't have \n's)
- # include = include the searched text in the returned paragraph
- # remove = remove the returned text from input or leave it intact
- my ($self,$search,$include,$remove) = (shift,shift,shift,shift);
- if (!defined($include)) { $include = 0; }
- if (!defined($remove)) { $remove = 0; }
+ my ($self,$search) = (shift,shift);
+ my $options = shift;
+ my ($include,$remove,$unquoted) = (0,0,0);
+
+ if (defined($options->{include})) { $include = $options->{include}; }
+ if (defined($options->{remove})) { $remove = $options->{remove}; }
+ if (defined($options->{unquoted})) { $unquoted = $options->{unquoted}; }
my ($line,$ref) = $self->shiftline();
my (@text,$paragraph);
@@ -840,9 +915,16 @@
while (defined($line) and !$found) {
push @text, ($line,$ref);
$paragraph .= $line;
- if ( $paragraph =~ /.*\Q$search\E.*/s ) {
- $found = 1;
+ if ($unquoted) {
+ if ( $paragraph =~ /^((\".*?\")|(\'.*?\')|[^\"\'])*\Q$search\E.*/s ) {
+ $found = 1;
+ }
} else {
+ if ( $paragraph =~ /.*\Q$search\E.*/s ) {
+ $found = 1;
+ }
+ }
+ if (!$found) {
($line,$ref)=$self->shiftline();
}
}
@@ -850,15 +932,21 @@
if (!defined($line)) { $eof = 1; }
if ( $found ) {
- if(!$include) {
- $text[$#text-1] =~ /(.*?)(\Q$search\E.*)/s;
+ $line = "";
+ if($unquoted) {
+ $text[$#text-1] =~ /^(((\".*?\")|(\'.*?\')|[^\"\'])*?\Q$search\E)(.*)/s;
$text[$#text-1] = $1;
- $line = $2;
+ $line = $5;
} else {
$text[$#text-1] =~ /(.*?\Q$search\E)(.*)/s;
$text[$#text-1] = $1;
$line = $2;
}
+ if(!$include) {
+ $text[$#text-1] =~ /(.*)(\Q$search\E.*)/s;
+ $text[$#text-1] = $1;
+ $line = $2.$line;
+ }
if (defined($line) and ($line ne "")) {
$self->unshiftline ($line,$text[$#text]);
}
@@ -898,6 +986,19 @@
Well... hmm... If this works for you now, you're using a very simple
document format ;)
+=head1 TODO LIST
+
+ATTRIBUTES
+
+MODIFY TAG TYPES FROM INHERITED MODULES
+(move the tag_types structure inside the $self hash?)
+
+XML HEADER (ENCODING)
+DOCTYPE (ENTITIES)
+INCLUDED FILES
+
+breaking tag inside non-breaking tag (possible?) causes ugly comments
+
=head1 SEE ALSO
L<po4a(7)>, L<Locale::Po4a::TransTranctor(3pm)>.
@@ -916,27 +1017,3 @@
=cut
1;
-
-
-##### TODO LIST #####
-#
-#OPTIONS
-#caseinsensitive
-#attributes
-#
-#MODIFY TAG TYPES FROM INHERITED MODULES
-#(move the tag_types structure inside the $self hash?)
-#
-#DOCTYPE (ENTITIES)
-#INCLUDED FILES
-#
-#XML HEADER (ENCODING)
-#
-#breaking tag inside non-breaking tag (possible?) causes ugly comments
-
-# <abbrev>
-# W<acronym>
-# W<arg>
-# <artheader>
-# with 'w' meaning wrap (by default) and 'W' meaning don't wrap.
-# there should be the module option to select the default behavior
20 years, 4 months
[Po4a-devel]Are reference of composite sgml files now fixed?
by Martin Quinson
Hello,
I suspect that the bug #300589 on alioth is now fixed by this change:
po4a (0.16.4-1) unstable; urgency=low
[...]
Jordi Vilalta
[...]
* [TransTractor.pm] Fix a by one offset in the line number reference
Could someone check that? I have no composite document at hand (file
including files).
The question is to know whether the reference (file:line stuff in the
comments) is right even if there is some included files. In perticular, the
content of the included file may well suffer of a -1 offset:
[Sgml.pm]
# Prepare the reference indirection stuff
my @refs;
my @lines = split(/\n/, $origfile);
for (my $i=0; $i<scalar @lines; $i++) {
push @refs,"$filename:$i";
}
We may want to push "$filename:".($i+1);
Then, the rest of the file after the include may also suffer from an offset,
not sure about that.
Thanks, Mt.
--
Dans un pays d'extrême droite, On se torche avec les doigts,
Y'a plus de journaux pour ça.
-- Frères misère
20 years, 4 months
[Po4a-devel]Introducing po4a
by Martin Quinson
Hello,
that's the first time I post on perl-doc, so let me introduce myself. I'm
one of the coordinator of the french translation effort within Debian. I'm
not really translator, and mainly work on on the infrastruture allowing
translators to do their work, detecting when their work needs to get
updated, and so on.
To that extend, I came up with a tool suite called po4a (po for anything)
which helps the documentation translation. The idea is to extract the
strings to translate from the original document, put them in the po format
which translators love so much, and put the result of the translation back
into the structure of the original document.
The advantages include:
- makes the track of the changes in the original easy, using the classical
gettext tools
- make possible to get some stats about the completness of the translations
- translators ability to mess with the original structure is reduced (even
if not zeroed)
It is implemented in Perl and is rather modular. For now the supported
formats are:
- pod: Perl Online Documentation format.
- man: Good old manual page format.
- sgml: either debiandoc or docbook DTD.
- kernelhelp: Help messages of each kernel (2.4.x) compilation option.
- dia: uncompressed Dia diagrams.
(The sgml module provides some *very basic* support for xml documents, and
a more complete/correct module for xml is underway in the CVS)
The tool itself is completely translated in french, spanish and catalan. Its
documentation is partially translated to spanish and french.
I write about this here on perl-doc because I saw in the archive that the
perl documentation translation effort was trying to organize. I'm in the
process of converting the existing french translation of the pod to this
system, and so far, it seems to work well. I just have "tiny" issues with
the gettext tools having trouble to deal with files of several megabytes.
There are in the process of getting addressed.
Homepage:
http://alioth.debian.org/projects/po4a/
Comments welcome,
Mt.
--
For every complex problem there is a solution which is simple, neat and wrong.
20 years, 4 months
[Po4a-devel][CVS] po4a/debian changelog,1.61,1.62
by Martin Quinson
Update of /cvsroot/po4a/po4a/debian
In directory haydn:/tmp/cvs-serv10845/debian
Modified Files:
changelog
Log Message:
Fix english
Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/debian/changelog,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- changelog 21 Jul 2004 01:54:52 -0000 1.61
+++ changelog 21 Jul 2004 02:10:06 -0000 1.62
@@ -12,8 +12,8 @@
- Rephrase some error messages here and there (sorry for keeping fuzzing
the translation ;)
- fix several brain dead errors in po4a (I swear I tested version 0.17 !)
- - add a threshold option to po4a(1). If we cannot fix it from the config
- file, at least we can fix it from the command file.
+ - add a threshold option to po4a(1). If we cannot set it from the config
+ file, at least we can set it from the command file.
- Fix Man module:
- add support for the .na and .nh roff macro (ignored). Closes alioth's
#300845, and allows to tackle apt-proxy(8).
20 years, 4 months
[Po4a-devel]0.17.1 in the pipe, please update translations
by Martin Quinson
Hello,
I'd like to release 0.17.1 since it's full of good fixes in it. Indeed, I
would have released 2 or 3 dot releases in the process, but I kept
refraining myself from releasing something without letting you update your
translations, and fuzzying the strings at the same time...
So, let's say we're in string freeze (to break the cycles), and that we're
gonna release as soon as the [binary] translations are uptodate.
Thanks for your time, and sorry for the fuzzy ;)
Mt.
--
C combines the power of assembler with the portability of assembler.
20 years, 4 months
[Po4a-devel][CVS] po4a/debian changelog,1.60,1.61
by Martin Quinson
Update of /cvsroot/po4a/po4a/debian
In directory haydn:/tmp/cvs-serv8858/debian
Modified Files:
changelog
Log Message:
Release 0.17.1
Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/debian/changelog,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- changelog 21 Jul 2004 00:46:41 -0000 1.60
+++ changelog 21 Jul 2004 01:54:52 -0000 1.61
@@ -1,12 +1,10 @@
-po4a (0.17.1-0.1) unstable; urgency=low
-
- NOT YET RELEASED
+po4a (0.17.1-1) unstable; urgency=low
[Jordi Vilalta]
- sync to en po/bin/es.po and po/bin/ca.po
- Further improvement of the building mecanism
- [po/pod/es.po] Add Spanish translation
-
+
[Martin Quinson]
- sync to en po/bin/fr.po
- turn back my email address to tuxfamily instead of my professional one
@@ -20,8 +18,8 @@
- add support for the .na and .nh roff macro (ignored). Closes alioth's
#300845, and allows to tackle apt-proxy(8).
- .nf stops wrapping; .fi starts it again. The contrary was done.
-
- -- Martin Quinson <martin.quinson(a)tuxfamily.org> Thu, 15 Jul 2004 21:14:13 -0700
+
+ -- Martin Quinson <martin.quinson(a)tuxfamily.org> Tue, 20 Jul 2004 18:54:11 -0700
po4a (0.17-1) unstable; urgency=low
20 years, 4 months
[Po4a-devel][CVS] po4a/po/bin ca.po,1.7,1.8 es.po,1.9,1.10
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/po/bin
In directory haydn:/tmp/cvs-serv17850
Modified Files:
ca.po es.po
Log Message:
Sync ca and es to code (Let's release 0.17.1 ;)
Index: ca.po
===================================================================
RCS file: /cvsroot/po4a/po4a/po/bin/ca.po,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ca.po 18 Jul 2004 10:56:22 -0000 1.7
+++ ca.po 21 Jul 2004 01:25:00 -0000 1.8
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: po4a bin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-18 12:22+0200\n"
-"PO-Revision-Date: 2004-07-18 12:28+0100\n"
+"POT-Creation-Date: 2004-07-19 13:21-0700\n"
+"PO-Revision-Date: 2004-07-21 03:19+0100\n"
"Last-Translator: Jordi Vilalta <jvprat(a)wanadoo.es>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -239,27 +239,35 @@
#, perl-format
msgid ""
"po4a gettextize: Original have more strings that the translation (%d>%d).\n"
-"po4a gettextize: Please fix it by editing the translated version to add a "
+"po4a gettextize: Please fix it by editing the translated version to add some "
"dummy entry."
msgstr ""
"po4a gettextize: L'original té més cadenes que la traducció (%d>%d).\n"
-"po4a gettextize: Arregleu-ho editant la versió traduïda afegint entrades "
-"buides."
+"po4a gettextize: Arregleu-ho editant la versió traduïda afegint algunes "
+"entrades difuses."
#: ../../lib/Locale/Po4a/Po.pm:281
#, perl-format
msgid ""
"po4a gettextize: Original have less strings that the translation (%d<%d).\n"
-"po4a gettextize: Please fix it by removing the extra entry from the\n"
-"po4a gettextize: translated file. You may need an addendum, cf po4a(7)."
+"po4a gettextize: Please fix it by removing the extra entry from the "
+"translated file.\n"
+"po4a gettextize: You may need an addendum (cf po4a(7)) to reput the chunk in "
+"place after gettextization.\n"
+"po4a gettextize: A possible cause is that a text dupplicated in the original "
+"is not translated the same way each time. Remove one of the translations, "
+"and you're fine."
msgstr ""
"po4a gettextize: L'original té menys cadenes que la traducció (%d<%d).\n"
"po4a gettextize: Si us plau, arregleu-ho treient les entrades extra de "
-"l'arxiu\n"
-"po4a gettextize: traduït. Probablement necessiteu un annex, consulteu po4a"
-"(7)."
+"l'arxiu traduït.\n"
+"po4a gettextize: Probablement necessiteu un annex (consulteu po4a(7)) per "
+"tornar a inserir el fragment després de la gettextització.\n"
+"po4a gettextize: Una causa possible és que un text duplicat en l'original no "
+"estigui sempre traduït igual. Elimineu una de les traduccions, i ja hauria "
+"d'estar."
-#: ../../lib/Locale/Po4a/Po.pm:315
+#: ../../lib/Locale/Po4a/Po.pm:317
#, perl-format
msgid ""
"po4a gettextization: Structure disparity between original and translated "
@@ -267,21 +275,23 @@
"msgid (at %s) is of type '%s' while\n"
"msgstr (at %s) is of type '%s'.\n"
"Original text: %s\n"
-"Translated text: %s"
+"Translated text: %s\n"
+"(result so far dumped to /tmp/gettextization.failed.po)"
msgstr ""
"po4a gettextization: L'estructura de l'arxiu original i del traduït "
"difereixen:\n"
"msgid (a %s) és del tipus '%s' mentre que\n"
"msgstr (a %s) és del tipus '%s'.\n"
"Text original: %s\n"
-"Text traduït: %s"
+"Text traduït: %s\n"
+"(el resultat fins al moment s'ha desat a /tmp/gettextization.failed.po)"
-#: ../../lib/Locale/Po4a/Po.pm:581
+#: ../../lib/Locale/Po4a/Po.pm:584
#, perl-format
msgid "msgid defined twice: %s"
msgstr "msgid definit més d'una vegada: %s"
-#: ../../lib/Locale/Po4a/Po.pm:593
+#: ../../lib/Locale/Po4a/Po.pm:596
#, perl-format
msgid ""
"Translations don't match for:\n"
Index: es.po
===================================================================
RCS file: /cvsroot/po4a/po4a/po/bin/es.po,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- es.po 18 Jul 2004 10:56:22 -0000 1.9
+++ es.po 21 Jul 2004 01:25:00 -0000 1.10
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: po4a bin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-18 12:22+0200\n"
-"PO-Revision-Date: 2004-07-18 12:31+0100\n"
+"POT-Creation-Date: 2004-07-19 13:21-0700\n"
+"PO-Revision-Date: 2004-07-21 03:18+0100\n"
"Last-Translator: Jordi Vilalta <jvprat(a)wanadoo.es>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -240,26 +240,35 @@
#, perl-format
msgid ""
"po4a gettextize: Original have more strings that the translation (%d>%d).\n"
-"po4a gettextize: Please fix it by editing the translated version to add a "
+"po4a gettextize: Please fix it by editing the translated version to add some "
"dummy entry."
msgstr ""
"po4a gettextize: El original tiene más cadenas que la traducción (%d>%d).\n"
"po4a gettextize: Por favor, arréglelo editando la versión traducida "
-"añadiendo entradas vacías."
+"añadiendo algunas entradas difusas."
#: ../../lib/Locale/Po4a/Po.pm:281
#, perl-format
msgid ""
"po4a gettextize: Original have less strings that the translation (%d<%d).\n"
-"po4a gettextize: Please fix it by removing the extra entry from the\n"
-"po4a gettextize: translated file. You may need an addendum, cf po4a(7)."
+"po4a gettextize: Please fix it by removing the extra entry from the "
+"translated file.\n"
+"po4a gettextize: You may need an addendum (cf po4a(7)) to reput the chunk in "
+"place after gettextization.\n"
+"po4a gettextize: A possible cause is that a text dupplicated in the original "
+"is not translated the same way each time. Remove one of the translations, "
+"and you're fine."
msgstr ""
"po4a gettextize: El original tiene menos cadenas que la traducción (%d<%d).\n"
"po4a gettextize: Por favor, arréglelo quitando las entradas extra del "
"archivo\n"
-"po4a gettextize: traducido. Puede que necesite un apéndice, consulte po4a(7)."
+"po4a gettextize: traducido. Puede que necesite un apéndice (consulte po4a"
+"(7)) para volver a poner el fragmento después de la gettextización.\n"
+"po4a gettextize: Una posible causa es que haya un texto duplicado en el "
+"original que se haya traducido de formas diferentes. Elimine una de las "
+"traducciones, eso debería bastar."
-#: ../../lib/Locale/Po4a/Po.pm:315
+#: ../../lib/Locale/Po4a/Po.pm:317
#, perl-format
msgid ""
"po4a gettextization: Structure disparity between original and translated "
@@ -267,21 +276,24 @@
"msgid (at %s) is of type '%s' while\n"
"msgstr (at %s) is of type '%s'.\n"
"Original text: %s\n"
-"Translated text: %s"
+"Translated text: %s\n"
+"(result so far dumped to /tmp/gettextization.failed.po)"
msgstr ""
"po4a gettextization: Difiere la estructura del archivo original y del "
"traducido:\n"
"msgid (en %s) es del tipo '%s' mientras que\n"
"msgstr (en %s) es del tipo '%s'.\n"
"Texto original: %s\n"
-"Texto traducido:%s"
+"Texto traducido:%s\n"
+"(el resultado hasta el momento se ha guardado en /tmp/gettextization.failed."
+"po)"
-#: ../../lib/Locale/Po4a/Po.pm:581
+#: ../../lib/Locale/Po4a/Po.pm:584
#, perl-format
msgid "msgid defined twice: %s"
msgstr "msgid definido más de una vez: %s"
-#: ../../lib/Locale/Po4a/Po.pm:593
+#: ../../lib/Locale/Po4a/Po.pm:596
#, perl-format
msgid ""
"Translations don't match for:\n"
20 years, 4 months
[Po4a-devel]Large scale po4a test report
by Martin Quinson
Hello,
I gave po4a a try on a very large scale project: the perl documentation.
I've found an existing french translation for a bunch of them (2.2Mo of
translated material). The gettextization was a *very* bad experience. The
translations were against 6 differents versions of the source, and some
where updated from a version to another, but badly. During the update, some
parts were not translated, and so on.
It took me a while (15h) to gettextize it, but now it's done. The resulting
po file is about 5.5Mo...
The po4a tools handle it rather fine, but I'm still in the process of
msgmerging it against the lastest pot file. It runs since 30 hours on a 1Ghz
G4 box, and it's still not done. The extraction took less than 30 sec. I
hope that it's only the first msgmerge which takes that long. If msgmerge is
programmed well, it will be the case. If not, I'm gonna bug msgmerge ;)
More to come on that.
Then, I still will have to review the po. All strings are marked fuzzy due
to the gettextization. But I hope to find people to help me with it, and
that's not a po4a issue anymore.
So, the conclusions are the following:
- po4a can deal with very large projects in a reasonable amount of time
- msgmerge may not scale enought for po4a
- we may get a whole bunch of excellent perl hacker looking into po4a in
the next months (once I propose the inclusion of this into the perl
distribution ;).
- I was wondering if the perl documentation was also translated into
spanish, catalan or german (or something else). I gave a try to google,
but my knowledge of those languages is too limited to guide google
properly...
Thanks,
Mt.
--
Learning and doing is the true spirit of free software -- learning without
doing gets you academic sterility, and doing without learning is all too
often the way things are done in proprietary software.
-- Raph Levien
20 years, 4 months
[Po4a-devel][CVS] po4a/debian changelog,1.59,1.60
by Martin Quinson
Update of /cvsroot/po4a/po4a/debian
In directory haydn:/tmp/cvs-serv8172/debian
Modified Files:
changelog
Log Message:
document last changes
Index: changelog
===================================================================
RCS file: /cvsroot/po4a/po4a/debian/changelog,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- changelog 19 Jul 2004 11:57:56 -0000 1.59
+++ changelog 21 Jul 2004 00:46:41 -0000 1.60
@@ -16,6 +16,10 @@
- fix several brain dead errors in po4a (I swear I tested version 0.17 !)
- add a threshold option to po4a(1). If we cannot fix it from the config
file, at least we can fix it from the command file.
+ - Fix Man module:
+ - add support for the .na and .nh roff macro (ignored). Closes alioth's
+ #300845, and allows to tackle apt-proxy(8).
+ - .nf stops wrapping; .fi starts it again. The contrary was done.
-- Martin Quinson <martin.quinson(a)tuxfamily.org> Thu, 15 Jul 2004 21:14:13 -0700
20 years, 4 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a Man.pm,1.19,1.20
by Martin Quinson
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv23379/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
.fi allows wrap again, .nf stops it, not the other way round (bug fixed)
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Man.pm 21 Jul 2004 00:39:01 -0000 1.19
+++ Man.pm 21 Jul 2004 00:45:02 -0000 1.20
@@ -639,9 +639,9 @@
# .fi => wrap again
if ($macro eq 'nf' || $macro eq 'fi') {
if ($macro eq 'fi') {
- $wrapped_mode='MACRONO';
- } else {
$wrapped_mode='YES';
+ } else {
+ $wrapped_mode='MACRONO';
}
$self->pushline($line."\n");
goto LINE;
20 years, 4 months