[Po4a-devel][CVS] po4a MANIFEST,1.13,1.14
by Jordi Vilalta
Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv20724
Modified Files:
MANIFEST
Log Message:
Added the Xml module and the encoding tests
Index: MANIFEST
===================================================================
RCS file: /cvsroot/po4a/po4a/MANIFEST,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- MANIFEST 19 Jul 2004 11:57:55 -0000 1.13
+++ MANIFEST 9 Aug 2004 16:26:56 -0000 1.14
@@ -17,6 +17,7 @@
lib/Locale/Po4a/Sgml.pm
lib/Locale/Po4a/Dia.pm
lib/Locale/Po4a/TransTractor.pm
+lib/Locale/Po4a/Xml.pm
po/bin/fr.po
po/bin/es.po
po/bin/ca.po
@@ -60,6 +61,19 @@
t/data-03/man.fr.add3
t/data-03/man.fr.add4
t/data-03/man.po-ok
+
+t/04-charsets.t
+t/data-04/ascii.po-ok
+t/data-04/ascii-iso8859.po-ok
+t/data-04/iso8859.po-ok
+t/data-04/text-ascii.pod
+t/data-04/text-iso8859.pod
+t/data-04/text-iso8859_.pod
+t/data-04/text-iso8859.pod-ok
+t/data-04/trans.po
+t/data-04/utf.po
+t/data-04/utf.po-ok
+t/data-04/utf.pod-ok
t/10-discard-fuzzy.t
t/data-10/pod
20 years, 3 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a Dia.pm,1.5,1.6
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv13495
Modified Files:
Dia.pm
Log Message:
New Dia version (uses Xml.pm)
Index: Dia.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Dia.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Dia.pm 9 Aug 2004 12:58:30 -0000 1.5
+++ Dia.pm 9 Aug 2004 16:21:49 -0000 1.6
@@ -52,31 +52,14 @@
=head1 STATUS OF THIS MODULE
-It Works For Me (tm). Currently it only searches for translateable strings,
-without parsing the xml code around. It's quite simple, but it works, and
-gives a perfect output for valid input files. It only translates the content
-of the E<lt>dia:stringE<gt> tags, but it seems to be all the text present at the
-diagrams.
-
-It skips the content of the E<lt>dia:diagramdataE<gt> tag because there are usually
-some strings that are for internal use of Dia (not interesting for translation).
-
-Currently it tries to get the diagram encoding from the first line (the xml
-declaration), and else it assumes UTF-8, and creates the .po contens in the
-ISO-8859-1 character set. It would be nice if it could read the command line
-encoding options, but I haven't watched how to do it.
-
-It uses Locale::Recode from the package libintl to recode the character
-sets. You can get it from http://search.cpan.org/~guido/libintl-perl-1.10/
-There may be a better or more standard module to do this, but I didn't know.
-You're welcome to improve it.
-
-This module should work, and it shouldn't break anything, but it needs more
-testing.
+This module is fully functional, as it relies in the Locale::Po4a::Xml module.
+This only defines the translateable tags (E<lt>dia:stringE<gt>), and filters
+the internal strings (the content of the E<lt>dia:diagramdataE<gt> tag), not
+interesting for translation).
=head1 SEE ALSO
-L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>, L<Locale::Po4a::Pod(3pm)>.
+L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>, L<Locale::Po4a::Xml(3pm)>.
=head1 AUTHORS
@@ -97,119 +80,30 @@
use strict;
use warnings;
-require Exporter;
-use vars qw(@ISA @EXPORT);
-@ISA = qw(Locale::Po4a::TransTractor);
-@EXPORT = qw(new initialize);
-
-use Locale::Po4a::TransTractor;
-use Locale::gettext qw(gettext);
-#is there any better (or more standard) package than this to recode strings?
-use Locale::Recode;
+use Locale::Po4a::Xml;
-sub initialize {}
+use vars qw(@ISA);
+@ISA = qw(Locale::Po4a::Xml);
-sub read {
- my ($self,$filename)=@_;
- push @{$self->{DOCPOD}{infile}}, $filename;
- $self->Locale::Po4a::TransTractor::read($filename);
-}
+sub initialize {
+ my $self = shift;
+ my %options = @_;
-sub parse {
- my $self=shift;
- map {$self->parse_file($_)} @{$self->{DOCPOD}{infile}};
+ $self->SUPER::initialize(%options);
+ $self->{options}{'tagsonly'}=1;
+ $self->{options}{'tags'}.=' <dia:string>';
+ $self->treat_options;
}
-#
-# Parse file and translate it
-#
-sub parse_file {
- my ($self,$filename)=@_;
- my ($line,$ref);
- my ($paragraph,$reference); #The text to be translated
-
- #Initializing the recoding objects
- # d2p: dia to po
- # p2d: po to dia
- my ($d2p,$p2d,$charset_dia,$charset_po);
-
- ($line,$ref)=$self->shiftline();
- if (defined($line)) {
- #Try to get the document encoding from the xml header
- if ( $line =~ /<\?xml.*?encoding="(.*)".*\?>/ ) {
- $charset_dia = $1;
- } else {
- #Dia's default is UTF-8
- $charset_dia = 'UTF-8';
- warn "po4a::dia: ".dgettext("po4a","Couldn't find file encoding. Assuming UTF-8.")."\n";
- }
- #how to get command line options to override it?
- $charset_po = 'ISO-8859-1';
-
- $d2p = Locale::Recode->new(from => $charset_dia,
- to => $charset_po);
- die $d2p->getError if $d2p->getError;
+sub found_string {
+ my ($self,$text,$ref,$options)=@_;
- $p2d = Locale::Recode->new(from => $charset_po,
- to => $charset_dia);
- die $p2d->getError if $p2d->getError;
+ #We skip the paper type string
+ if ( $self->get_path() !~ /<dia:diagramdata>/ ) {
+ $text =~ /^#(.*)#$/s;
+ $text = "#".$self->translate($1,$ref,"String",
+ 'wrap'=>$self->{options}{'wrap'})."#";
}
- while (defined($line)) {
- #don't translate any string between <dia:diagramdata> tags
- if ( $line =~ /^<dia:diagramdata>(.*)/s ) {
- $line = $1;
- $self->pushline("<dia:diagramdata>");
- while ( $line !~ /<\/dia:diagramdata>/ ) {
- $self->pushline($line);
- ($line,$ref)=$self->shiftline();
- }
- $line =~ /(.*?<\/dia:diagramdata>)(.*)/s;
- $self->pushline($1);
- $line = $2;
- } else {
- if ( $line =~ /(.*?)(<dia:diagramdata>.*)/s ) {
- $self->unshiftline($2,$ref);
- $line = $1;
- }
- }
-
- #if current line has an opening <dia:string> tag, we get
- #all the paragraph to translate (posibly from next lines)
- if ( $line =~ /(.*?)<dia:string>#(.*)/s ) {
- #pushing the text before the tag as is
- $self->pushline($1);
-
- #save the beginning of the tag contens and its position
- $paragraph = $2;
- $reference = $ref;
-
- #append the following lines to the paragraph until we
- #find the closing tag
- while ( $paragraph !~ /.*#<\/dia:string>/ ) {
- ($line,$ref)=$self->shiftline();
- $paragraph .= $line;
- }
- $paragraph =~ /(.*?)#<\/dia:string>(.*)/s;
- $paragraph = $1;
-
- #put the text after the closing tag back to the input
- #(there could be more than one string to translate on
- #the same line)
- $self->unshiftline($2,$ref);
- #recode the paragraph to the po character set
- $d2p->recode($paragraph);
- $paragraph = $self->translate($paragraph,$reference,"<dia:string>");
- #recode the translation to the dia character set
- $p2d->recode($paragraph);
- #inserts translation to output
- $self->pushline("<dia:string>#".$paragraph."#</dia:string>");
- } else {
- #doesn't have text to translate: push line as is
- $self->pushline($line);
- }
-
- #get next line
- ($line,$ref)=$self->shiftline();
- }
+ return $text;
}
20 years, 3 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a TransTractor.pm,1.32,1.33
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv12939
Modified Files:
TransTractor.pm
Log Message:
Added encoding support and improved documentation a little
Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- TransTractor.pm 8 Aug 2004 19:58:48 -0000 1.32
+++ TransTractor.pm 9 Aug 2004 16:14:44 -0000 1.33
@@ -22,6 +22,7 @@
use Locale::gettext qw(dgettext);
use File::Path; # mkdir before write
+use Encode;
use Encode::Guess;
=head1 NAME
@@ -34,7 +35,7 @@
interestingly, the maintenance of translations) using gettext tools on
areas where they were not expected like documentation.
-This class is the ancestor of all po4a parsers used to parse a document to
+This class is the ancestor of all the po4a parsers used to parse a document to
search translatable strings, extract them to a po file and replace them by
their translation in the output document.
@@ -84,7 +85,7 @@
=item parse()
-This is where all the work take place: the parsing of input documents, the
+This is where all the work takes place: the parsing of input documents, the
generation of output, and the extraction of the translatable strings. This
is pretty simple using the provided functions presented in the section
"INTERNAL FUNCTIONS" below. See also the synopsis, which present an
@@ -97,9 +98,9 @@
=item docheader()
This function returns the header we should add to the produced document,
-quoted properly to be comment in the target language. See the section
-"Educating developers about translations", from po4a(7), for what it is
-good for.
+quoted properly to be a comment in the target language. See the section
+"Educating developers about translations", from L<po4a(7)|po4a.7>, for what
+it is good for.
=back
@@ -111,7 +112,7 @@
=head1 SYNOPSIS
-The following example parse a list paragraphs begining with "<p>". For sake
+The following example parses a list of paragraphs begining with "<p>". For sake
of simplicity, we assume that the document is well formatted, ie that '<p>'
tags are the only tags present, and that this tag is at the very begining
of each paragraph.
@@ -124,7 +125,7 @@
if ($line =~ m/<p>/ && !$first--; ) {
# Not the first time we see <p>.
# Reput the current line in input,
- # and put the builded paragraph to output
+ # and put the built paragraph to output
$document->unshiftline($line,$lref);
# Now that the document is formed, translate it:
@@ -161,7 +162,7 @@
=item process(%)
This function can do all you need to do with a po4a document in one
-invocation:. Its arguments must be packed as a hash. ACTIONS:
+invocation. Its arguments must be packed as a hash. ACTIONS:
=over 3
@@ -175,11 +176,11 @@
=item c.
-Parse the document
+Parses the document
=item d.
-Read and apply all the addendum specified
+Reads and applies all the addendum specified
=item e.
@@ -187,11 +188,11 @@
=item f.
-Write the extracted po file to po_out_name (if given)
+Writes the extracted po file to po_out_name (if given)
=back
-ARGUMENTS, beside the ones accepted by new()(with expected type):
+ARGUMENTS, beside the ones accepted by new() (with expected type):
=over 4
@@ -199,6 +200,11 @@
list of filenames where we should read the input document.
+=item file_in_charset ($)
+
+character set used in the input document (if it isn't specified, it will try
+to detect it from the input document).
+
=item file_out_name ($)
filename where we should write the output document.
@@ -217,6 +223,10 @@
list of filenames where we should read the addendum from.
+=item addendum_charset ($)
+
+character set for the addendum.
+
=back
=item new(%)
@@ -227,7 +237,11 @@
=item verbose ($)
-If an argument is passed, set the verbosity. Otherwise, return the verbosity.
+Sets the verbosity.
+
+=item debug ($)
+
+Sets the debugging.
=back
@@ -247,11 +261,16 @@
next if ($_ eq 'po_in_name' ||
$_ eq 'po_out_name' ||
$_ eq 'file_in_name' ||
+ $_ eq 'file_in_charset' ||
$_ eq 'file_out_name' ||
- $_ eq 'addendum');
+ $_ eq 'addendum' ||
+ $_ eq 'addendum_charset');
$newparams{$_}=$params{$_};
}
+ $self->{TT}{'file_in_charset'}=$params{'file_in_charset'};
+ $self->{TT}{'addendum_charset'}=$params{'addendum_charset'};
+
foreach my $file (@{$params{'po_in_name'}}) {
print STDERR "readpo($file)... " if $self->debug();
$self->readpo($file);
@@ -312,6 +331,9 @@
}
# Input document is in ascii until we prove the opposite (in read())
$self->{TT}{ascii_input}=1;
+ # We try not to use utf unless it's forced from the outside (in case the
+ # document isn't in ascii)
+ $self->{TT}{utf_mode}=0;
## initialize the plugin
$self->initialize(%options);
@@ -321,7 +343,7 @@
=back
-=head2 manipulating document files
+=head2 Manipulating document files
=over 4
@@ -457,8 +479,8 @@
=item addendum($)
-Please refer to po4a(7) for more information on what addendum are, and how
-translators should write them. To apply an addendum to the translated
+Please refer to L<po4a(7)|po4a.7> for more information on what addendum are,
+and how translators should write them. To apply an addendum to the translated
document, simply pass its filename to this function and you are done ;)
This function returns a non-nul integer on error.
@@ -674,7 +696,7 @@
=head2 Marking strings as translatable
-Two functions are provided to handle the text which should be translated.
+One function is provided to handle the text which should be translated.
=over 4
@@ -695,8 +717,8 @@
=item -
The type of this string (ie, the textual description of its structural role
-; used in Locale::Po4a::Po::gettextization() ; see also po4a(7), section
-I<Gettextization: how does it work?>)
+; used in Locale::Po4a::Po::gettextization() ; see also L<po4a(7)|po4a.7>,
+section I<Gettextization: how does it work?>)
=back
@@ -733,6 +755,11 @@
Returns the translation of the string (as found in po_in) so that the
parser can build the doc_out.
+=item -
+
+Handles the character sets to recode the strings before sending them to
+po_out and before returning the translations.
+
=back
=back
@@ -755,15 +782,58 @@
# unless $validoption{$_};
# }
+ my $in_charset;
+ if ($self->{TT}{ascii_input}) {
+ $in_charset = "ascii";
+ } else {
+ if (defined($self->{TT}{'file_in_charset'}) and
+ length($self->{TT}{'file_in_charset'}) and
+ $self->{TT}{'file_in_charset'} ne "CHARSET" and
+ $self->{TT}{'file_in_charset'} ne "ascii") {
+ $in_charset=$self->{TT}{'file_in_charset'};
+ } else {
+ die dgettext("po4a","Couldn't determine the input document's character set before finding the first string that needs recoding. Please specify it in the command line.")."\n"
+ }
+ }
+
+ my $transstring = $self->{TT}{po_in}->gettext($string,
+ 'wrap' => $options{'wrap'}||0,
+ 'wrapcol' => $options{'wrapcol'});
+
+ if ($self->{TT}{po_in}->get_charset ne "CHARSET") {
+ Encode::from_to($transstring,$self->{TT}{po_in}->get_charset,
+ $self->get_out_charset);
+ }
+
+ # If the input document isn't completely in ascii, we should see what to
+ # do with the current string
+ unless ($self->{TT}{ascii_input}) {
+ my $out_charset = $self->{TT}{po_out}->get_charset;
+ # We set the output po charset
+ if ($out_charset eq "CHARSET") {
+ if ($self->{TT}{utf_mode}) {
+ $out_charset="utf-8";
+ } else {
+ $out_charset=$in_charset;
+ }
+ $self->{TT}{po_out}->set_charset($out_charset);
+ }
+ if ( $in_charset !~ /^$out_charset$/i ) {
+ Encode::from_to($string,$in_charset,$out_charset);
+ }
+ }
+
$self->{TT}{po_out}->push('msgid' => $string,
'reference' => $ref,
'type' => $type,
'wrap' => $options{'wrap'}||0,
'wrapcol' => $options{'wrapcol'});
- return $self->{TT}{po_in}->gettext($string,
- 'wrap' => $options{'wrap'}||0,
- 'wrapcol' => $options{'wrapcol'});
+# if ($self->{TT}{po_in}->get_charset ne "CHARSET") {
+# Encode::from_to($transstring,$self->{TT}{po_in}->get_charset,
+# $self->get_out_charset);
+# }
+ return $transstring;
}
=head2 Misc functions
@@ -790,13 +860,85 @@
Returns if the debug option was passed during the creation of the
TransTractor.
-=back
-
=cut
sub debug {
return $_[0]->{TT}{debug};
}
+
+=item detected_charset($)
+
+This tells TransTractor that a new character set (the first argument) has been
+detected from the input document. It can usually be read from the document
+header. Only the first character set will remain, coming either from the
+process() arguments or detected from the document.
+
+=cut
+
+sub detected_charset {
+ my ($self,$charset)=(shift,shift);
+ unless (defined($self->{TT}{'file_in_charset'}) and
+ length($self->{TT}{'file_in_charset'}) ) {
+
+ $self->{TT}{'file_in_charset'}=$charset;
+ }
+}
+
+=item get_out_charset()
+
+This function will return the character set that should be used in the output
+document (usually useful to substitute the input document's detected character
+set where it has been found).
+
+If no character set is specified for the output document, it will use the
+input po's character set, and if the input po has the default "CHARSET", it
+will return the input document's character set, so that no encoding is
+performed.
+
+=cut
+
+sub get_out_charset {
+ my $self=shift;
+ my $charset;
+ if ($self->{TT}{utf_mode} && $self->{TT}{ascii_input}) {
+ $charset="utf-8";
+ } else {
+ $charset=$self->{TT}{po_in}->get_charset;
+ $charset=$self->{TT}{'file_in_charset'}
+ if $charset eq "CHARSET" and
+ defined($self->{TT}{'file_in_charset'}) and
+ length($self->{TT}{'file_in_charset'});
+ $charset="ascii"
+ if $charset eq "CHARSET";
+ }
+ return $charset;
+}
+
+=item recode_skipped_text($)
+
+This function returns the recoded text passed as argument, from the input
+document's character set to the output document's one. This isn't needed when
+translating a string (translate() recodes everything itself), but it is when
+you skip a string from the input document and you want the output document to
+be consistent with the global encoding.
+
+=cut
+
+sub recode_skipped_text {
+ my ($self,$text)=(shift,shift);
+ unless (!$self->{TT}{'ascii_input'}) {
+ if(defined($self->{TT}{'file_in_charset'}) and
+ length($self->{TT}{'file_in_charset'}) ) {
+ Encode::from_to($text,$self->{TT}{'file_in_charset'},
+ $self->get_out_charset);
+ return $text;
+ } else {
+ die dgettext("po4a","Couldn't determine the input document's character set before finding the first string that needs recoding. Please specify it in the command line.")."\n";
+ }
+ }
+}
+
+=back
=head1 FUTURE DIRECTIONS
20 years, 3 months
[Po4a-devel][CVS] po4a/t 04-charsets.t,1.2,1.3
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/t
In directory haydn:/tmp/cvs-serv6861
Modified Files:
04-charsets.t
Log Message:
I was ignoring some of the lines I wanted to test :-\
Index: 04-charsets.t
===================================================================
RCS file: /cvsroot/po4a/po4a/t/04-charsets.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- 04-charsets.t 9 Aug 2004 15:09:44 -0000 1.2
+++ 04-charsets.t 9 Aug 2004 15:13:25 -0000 1.3
@@ -11,7 +11,7 @@
mkdir "t/tmp" unless -e "t/tmp";
my $diff_po_flags = " -I '^# SOME' -I '^# Test' ".
- "-I '^\"POT-Creation-Date: ' -I '^\"Content-Type:' -I '^\"Content-Transfer-Encoding:'";
+ "-I '^\"POT-Creation-Date: ' -I '^\"Content-Transfer-Encoding:'";
$tests[0]{'run'} = 'perl ../po4a-gettextize -f pod -m data-04/text-ascii.pod -M iso-8859-1 -p tmp/ascii.po';
$tests[0]{'test'} = "diff -u $diff_po_flags data-04/ascii.po-ok tmp/ascii.po";
20 years, 3 months
[Po4a-devel][CVS] po4a/t 04-charsets.t,1.1,1.2
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/t
In directory haydn:/tmp/cvs-serv6007
Modified Files:
04-charsets.t
Log Message:
Change description
Index: 04-charsets.t
===================================================================
RCS file: /cvsroot/po4a/po4a/t/04-charsets.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- 04-charsets.t 9 Aug 2004 15:00:10 -0000 1.1
+++ 04-charsets.t 9 Aug 2004 15:09:44 -0000 1.2
@@ -1,5 +1,5 @@
#! /usr/bin/perl
-# DIA module tester.
+# Character sets tester.
#########################
20 years, 3 months
[Po4a-devel][CVS] po4a/t/data-04 trans.po,NONE,1.1 utf.po,NONE,1.1 ascii-iso8859.po-ok,NONE,1.1 ascii.po-ok,NONE,1.1 iso8859.po-ok,NONE,1.1 utf.po-ok,NONE,1.1 text-ascii.pod,NONE,1.1 text-iso8859_.pod,NONE,1.1 text-iso8859.pod,NONE,1.1 text-iso8859.pod-ok,NONE,1.1 utf.pod-ok,NONE,1.1
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/t/data-04
In directory haydn:/tmp/cvs-serv5529
Added Files:
trans.po utf.po ascii-iso8859.po-ok ascii.po-ok iso8859.po-ok
utf.po-ok text-ascii.pod text-iso8859_.pod text-iso8859.pod
text-iso8859.pod-ok utf.pod-ok
Log Message:
Encoding tests
--- NEW FILE: utf.po-ok ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-09 16:41+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-iso8859_.pod:1
#, fuzzy
msgid "Test title (á)"
msgstr "TÃtulo de prueba"
# type: textblock
#: data-04/text-iso8859_.pod:3
#, fuzzy
msgid "blablabla lelelele"
msgstr "blÚbleble lálalala"
--- NEW FILE: ascii.po-ok ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-08 16:59+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-ascii.pod:1
msgid "Test title"
msgstr ""
# type: textblock
#: data-04/text-ascii.pod:3
msgid "blablabla lelelele"
msgstr ""
--- NEW FILE: utf.pod-ok ---
*****************************************************
* GENERATED FILE, DO NOT EDIT *
* THIS IS NO SOURCE FILE, BUT RESULT OF COMPILATION *
*****************************************************
This file was generated by po4a(7) version 0.17.2. Do not store
it (in cvs, for example), but store the po file used as source file by
pod-translate.
In fact, consider this as a binary, and the po file as a regular .c file:
If the po get lost, keeping this translation up-to-date will be harder.
=head1 TÃtulo de prueba
blÚbleble lálalala
--- NEW FILE: ascii-iso8859.po-ok ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-08 17:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-ascii.pod:1
#, fuzzy
msgid "Test title"
msgstr "Título de prueba"
# type: textblock
#: data-04/text-ascii.pod:3
#, fuzzy
msgid "blablabla lelelele"
msgstr "blèbleble lálalala"
--- NEW FILE: text-ascii.pod ---
=head1 Test title
blablabla
lelelele
--- NEW FILE: iso8859.po-ok ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-08 17:01+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-iso8859.pod:1
msgid "TÃtulo de prueba"
msgstr ""
# type: textblock
#: data-04/text-iso8859.pod:3
msgid "blÚbleble lálalala"
msgstr ""
--- NEW FILE: text-iso8859.pod-ok ---
*****************************************************
* GENERATED FILE, DO NOT EDIT *
* THIS IS NO SOURCE FILE, BUT RESULT OF COMPILATION *
*****************************************************
This file was generated by po4a(7) version 0.17.2. Do not store
it (in cvs, for example), but store the po file used as source file by
pod-translate.
In fact, consider this as a binary, and the po file as a regular .c file:
If the po get lost, keeping this translation up-to-date will be harder.
=head1 Título de prueba
blèbleble lálalala
--- NEW FILE: utf.po ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-09 16:41+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-iso8859_.pod:1
msgid "Test title"
msgstr "TÃtulo de prueba"
# type: textblock
#: data-04/text-iso8859_.pod:3
msgid "blablabla lelelele"
msgstr "blÚbleble lálalala"
--- NEW FILE: text-iso8859_.pod ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: trans.po ---
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2004-08-08 17:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: ENCODING"
# type: =head1
#: data-04/text-ascii.pod:1
msgid "Test title"
msgstr "Título de prueba"
# type: textblock
#: data-04/text-ascii.pod:3
msgid "blablabla lelelele"
msgstr "blèbleble lálalala"
--- NEW FILE: text-iso8859.pod ---
(This appears to be a binary file; contents omitted.)
20 years, 3 months
[Po4a-devel][CVS] po4a/t 04-charsets.t,NONE,1.1
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/t
In directory haydn:/tmp/cvs-serv5241
Added Files:
04-charsets.t
Log Message:
Encoding tests
--- NEW FILE: 04-charsets.t ---
#! /usr/bin/perl
# DIA module tester.
#########################
use strict;
use warnings;
my @tests;
mkdir "t/tmp" unless -e "t/tmp";
my $diff_po_flags = " -I '^# SOME' -I '^# Test' ".
"-I '^\"POT-Creation-Date: ' -I '^\"Content-Type:' -I '^\"Content-Transfer-Encoding:'";
$tests[0]{'run'} = 'perl ../po4a-gettextize -f pod -m data-04/text-ascii.pod -M iso-8859-1 -p tmp/ascii.po';
$tests[0]{'test'} = "diff -u $diff_po_flags data-04/ascii.po-ok tmp/ascii.po";
$tests[0]{'doc'} = 'using ascii when it\'s enough';
$tests[1]{'run'} = 'perl ../po4a-gettextize -f pod -m data-04/text-iso8859.pod -M iso-8859-1 -p tmp/iso8859.po';
$tests[1]{'test'} = "diff -u $diff_po_flags data-04/iso8859.po-ok tmp/iso8859.po";
$tests[1]{'doc'} = 'use utf-8 when master file is non-ascii';
$tests[2]{'run'} = 'perl ../po4a-gettextize -f pod -m data-04/text-ascii.pod -l data-04/text-iso8859.pod -L iso-8859-1 -p tmp/ascii-iso8859.po';
$tests[2]{'test'} = "diff -u $diff_po_flags data-04/ascii-iso8859.po-ok tmp/ascii-iso8859.po";
$tests[2]{'doc'} = 'using translation\'s encoding when master is ascii';
$tests[3]{'run'} = 'perl ../po4a-translate -f pod -m data-04/text-ascii.pod -p data-04/trans.po -l tmp/text-iso8859.pod';
$tests[3]{'test'} = "diff -u $diff_po_flags data-04/text-iso8859.pod-ok tmp/text-iso8859.pod";
$tests[3]{'doc'} = 'translation without recoding output';
$tests[4]{'run'} = 'perl ../po4a-gettextize -f pod -m data-04/text-iso8859_.pod -M iso-8859-1 -l data-04/text-iso8859.pod -L iso-8859-1 -p tmp/utf.po';
$tests[4]{'test'} = "diff -u $diff_po_flags data-04/utf.po-ok tmp/utf.po";
$tests[4]{'doc'} = 'convert msgstrs to utf-8 when master file is non-ascii';
$tests[5]{'run'} = 'perl ../po4a-translate -f pod -m data-04/text-ascii.pod -p data-04/utf.po -l tmp/utf.pod';
$tests[5]{'test'} = "diff -u $diff_po_flags data-04/utf.pod-ok tmp/utf.pod";
$tests[5]{'doc'} = 'use input po\'s charset';
use Test::More tests =>12; # tests * (run+validity)
for (my $i=0; $i<scalar @tests; $i++) {
chdir "t" || die "Can't chdir to my test directory";
my ($val,$name);
my $cmd=$tests[$i]{'run'};
$val=system($cmd);
$name=$tests[$i]{'doc'}.' runs';
ok($val == 0,$name);
diag(%{$tests[$i]{'run'}}) unless ($val == 0);
SKIP: {
skip ("Command don't run, can't test the validity of its return",1)
if $val;
$val=system($tests[$i]{'test'});
$name=$tests[$i]{'doc'}.' returns what is expected';
ok($val == 0,$name);
unless ($val == 0) {
diag ("Failed (retval=$val) on:");
diag ($tests[$i]{'test'});
diag ("Was created with:");
diag ($tests[$i]{'run'});
}
}
# system("rm -f tmp/* 2>&1");
chdir ".." || die "Can't chdir back to my root";
}
0;
20 years, 3 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a Po.pm,1.24,1.25
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv27387
Modified Files:
Po.pm
Log Message:
Where dit that get_text() come from? :S
Index: Po.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Po.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Po.pm 8 Aug 2004 23:00:55 -0000 1.24
+++ Po.pm 9 Aug 2004 13:24:30 -0000 1.25
@@ -307,7 +307,7 @@
$potrans->to_utf;
$pores->set_charset("utf-8");
} else {
- if ($potrans->get_text eq "CHARSET") {
+ if ($potrans->get_charset eq "CHARSET") {
$pores->set_charset("ascii");
} else {
$pores->set_charset($potrans->get_charset);
20 years, 3 months
[Po4a-devel][CVS] po4a/lib/Locale/Po4a Pod.pm,1.10,1.11 Man.pm,1.23,1.24 Sgml.pm,1.32,1.33 Xml.pm,1.15,1.16 Dia.pm,1.4,1.5
by Jordi Vilalta
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv22311
Modified Files:
Pod.pm Man.pm Sgml.pm Xml.pm Dia.pm
Log Message:
Little documentation enhancements (fuzzy time!). Correct me if I broke the
meaning of some paragraphs. I tried to rewrite some small parts to reflect
better the code.
Index: Dia.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Dia.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Dia.pm 7 Aug 2004 04:51:33 -0000 1.4
+++ Dia.pm 9 Aug 2004 12:58:30 -0000 1.5
@@ -76,7 +76,7 @@
=head1 SEE ALSO
-L<po4a(7)>, L<Locale::Po4a::TransTractor(3pm)>, L<Locale::Po4a::Pod(3pm)>.
+L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>, L<Locale::Po4a::Pod(3pm)>.
=head1 AUTHORS
Index: Pod.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Pod.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Pod.pm 30 Jul 2004 00:17:41 -0000 1.10
+++ Pod.pm 9 Aug 2004 12:58:29 -0000 1.11
@@ -163,7 +163,7 @@
CE<lt>" #n"E<gt>
-Lake of luck, in the po4a version, this was splited on the space by the
+Lack of luck, in the po4a version, this was splited on the space by the
wrapping. As result, in the original version, the man contain
" #n"
@@ -195,7 +195,7 @@
calls either parse_from_filehandle() or parse_from_file().
new() can take options, in the form of key/value pairs, that control the
-behavior of the parser. The recognized options common to all Pod:;Parser
+behavior of the parser. The recognized options common to all Pod::Parser
children are:
=over 4
@@ -256,9 +256,9 @@
=item pomode
-In fact, this parser can work in to modes. When pomode=write, it reads a
-pod file, and extract the string which should be translated to a pot
-file. When pomode=read (the default), it reads a pod file and write a
+In fact, this parser can work in two modes. When pomode=write, it reads a
+pod file, and extracts the strings which should be translated to a pot
+file. When pomode=read (the default), it reads a pod file and writes a
similar pod file, but translating all strings on the way (the translation
is read from the po file).
@@ -271,7 +271,7 @@
=head1 SEE ALSO
-L<Pod::Parser>, L<po4a(7)>, L<Locale::Po4a::TransTractor(3pm)>,
+L<Pod::Parser>, L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>,
L<Locale::Po4a::Man(3pm)>,
=head1 AUTHORS
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Xml.pm 8 Aug 2004 19:10:25 -0000 1.15
+++ Xml.pm 9 Aug 2004 12:58:30 -0000 1.16
@@ -153,11 +153,11 @@
Example: WE<lt>chapterE<gt><title>
-=item attributes (TODO)
+=item attributes
Space-separated list of the tag's attributes you want to translate. You can
specify the attributes by their name (for example, "lang"), but you can
-prefix it with a tag hierarchy, to specify that this tag will only be
+prefix it with a tag hierarchy, to specify that this attribute will only be
translated when it's into the specified tag. For example: <bbb><aaa>lang
specifies that the lang attribute will only be translated if it's into an
<aaa> tag, and it's into a <bbb> tag.
@@ -194,9 +194,9 @@
}
}
- #It will mantain the list of the translateable tags
+ #It will mantain the list of the translatable tags
$self->{tags}=();
- #It will mantain the list of the translateable attributes
+ #It will mantain the list of the translatable attributes
$self->{attributes}=();
#It will mantain the list of the inline tags
$self->{inline}=();
@@ -233,6 +233,24 @@
that contains extra information to control what strings to translate, how
to translate them and to generate the comment.
+This options hash has different contents depending on what kind of string
+it is (specified in an entry of this hash):
+
+=over
+
+=item type="tag"
+
+The found string is the contents of a translatable tag. The entry "tag_options"
+contains the option characters in front of the tag hierarchy in the module
+"tags" option.
+
+=item type="attribute"
+
+Means that the found string is the value of a translatable attribute. The
+entry "attribute" has the name of the attribute.
+
+=back
+
It must return the text that will replace the original in the translated
document. Here's a basic example of this function:
@@ -306,16 +324,17 @@
=item f_extract
-If you leave this key undefined, the extraction function will have to extract
-the tag itself. It's useful for tags that can have other tags or special
-structures in them, so that the main parser doesn't get mad. This function
-receives a boolean that says if the tag should be removed from the input
-stream or not.
+If you leave this key undefined, the generic extraction function will have to
+extract the tag itself. It's useful for tags that can have other tags or
+special structures in them, so that the main parser doesn't get mad. This
+function receives a boolean that says if the tag should be removed from the
+input stream or not.
=item f_translate
-This function returns the translated tag (translated attributes or all needed
-transformations) as a single string.
+This function receives the tag (in the get_string_until() format) and returns
+the translated tag (translated attributes or all needed transformations) as a
+single string.
=back
@@ -374,10 +393,10 @@
my $tag = $self->join_lines(@tag);
$tag =~ /encoding=(("|')|)(.*?)(\s|\2)/s;
my $in_charset=$3;
- my $out_charset=$self->detected_charset($in_charset);
+ $self->detected_charset($in_charset);
+ my $out_charset=$self->get_out_charset;
- $tag =~ s/$in_charset/$out_charset/
- unless !defined($out_charset) or $out_charset eq "";
+ $tag =~ s/$in_charset/$out_charset/;
return $tag;
}
@@ -504,7 +523,7 @@
=over 4
-=item get_path
+=item get_path()
This function returns the path to the current tag from the document's root,
in the form <html><body><p>.
@@ -520,7 +539,7 @@
}
}
-=item tag_type
+=item tag_type()
This function returns the index from the tag_types list that fits to the next
tag in the input stream, or -1 if it's at the end of the input file.
@@ -568,7 +587,7 @@
}
}
-=item extract_tag
+=item extract_tag($$)
This function returns the next tag from the input stream without the beginning
and end, in an array form, to mantain the references from the input file. It
@@ -593,7 +612,7 @@
return ($eof,@tag);
}
-=item get_tag_name
+=item get_tag_name(@)
This function returns the name of the tag passed as an argument, in the array
form returned by extract_tag.
@@ -606,7 +625,7 @@
return $1;
}
-=item breaking_tag
+=item breaking_tag()
This function returns a boolean that says if the next tag in the input stream
is a breaking tag or not (inline tag). It leaves the input stream intact.
@@ -631,7 +650,7 @@
return $break;
}
-=item treat_tag
+=item treat_tag()
This function translates the next tag from the input stream. Using each
tag type's custom translation functions.
@@ -659,12 +678,12 @@
return $eof;
}
-=item tag_in_list
+=item tag_in_list($@)
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). 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
+matched tag's options (the characters in front of the tag) or 1 (if that tag
doesn't have options).
=back
@@ -704,12 +723,12 @@
=over 4
-=item treat_attributes
+=item treat_attributes(@)
This function handles the tags attributes' translation. It receives the tag
without the beginning / end marks, and then it finds the attributes, and it
-translates the translateables (specified by the option "attributes"). This
-returns a plain string with the translated tag.
+translates the translatables (specified by the module option "attributes").
+This returns a plain string with the translated tag.
=back
@@ -894,7 +913,7 @@
=over 4
-=item treat_options
+=item treat_options()
This function fills the internal structures that contain the tags, attributes
and inline data with the options of the module (specified in the command-line
@@ -924,10 +943,10 @@
=over
-=item get_string_until
+=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 an options
+document 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:
@@ -1014,7 +1033,7 @@
return ($eof,@text);
}
-=item skip_spaces
+=item skip_spaces(\@)
This function receives as argument the reference to a paragraph (in the format
returned by get_string_until), skips his heading spaces and returns them as
@@ -1040,7 +1059,7 @@
return $space;
}
-=item join_lines
+=item join_lines(@)
This function returns a simple string with the text from the argument array
(discarding the references).
@@ -1062,12 +1081,13 @@
=head1 STATUS OF THIS MODULE
-Well... hmm... If this works for you now, you're using a very simple
-document format ;)
+This module can translate tags and attributes.
-=head1 TODO LIST
+Support for entities and included files is in the TODO list.
-XML HEADER (ENCODING)
+The writing of derivate modules is rather limited.
+
+=head1 TODO LIST
DOCTYPE (ENTITIES)
@@ -1080,7 +1100,7 @@
=head1 SEE ALSO
-L<po4a(7)>, L<Locale::Po4a::TransTractor(3pm)>.
+L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>.
=head1 AUTHORS
Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- Sgml.pm 7 Aug 2004 21:09:02 -0000 1.32
+++ Sgml.pm 9 Aug 2004 12:58:30 -0000 1.33
@@ -78,9 +78,9 @@
=item ignore
Tags ignored and considered as plain char data by po4a. That is to say that
-they can be part of a msgid. For example, E<gt>bE<lt> is a good candidate
+they can be part of a msgid. For example, E<lt>bE<gt> is a good candidate
for this category since putting it in the translate section would create
-msgid not being whole sentences, which is bad.
+msgids not being whole sentences, which is bad.
=item force
@@ -88,7 +88,7 @@
=item include-all
-By default, msgid containing only one entity (like '&version') are skipped
+By default, msgids containing only one entity (like '&version;') are skipped
for the translator comfort. Activating this option prevents this
optimisation. It can be useful if the document contains a construction like
"<title>&Acute;</title>", even if I doubt such things to ever happen...
@@ -850,6 +850,7 @@
}
1;
+
=head1 AUTHORS
This module is an adapted version of sgmlspl (SGML postprocesser for the
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Man.pm 8 Aug 2004 20:36:19 -0000 1.23
+++ Man.pm 9 Aug 2004 12:58:30 -0000 1.24
@@ -18,8 +18,8 @@
This module tries pretty hard to make translator's life easier. For that,
the text presented to translators isn't a verbatim copy of the text found
-in the man page. Indeed, the cruder parts of the nroff format are hiden, so
-that translators can't mess up with it.
+in the man page. Indeed, the cruder parts of the nroff format are hidden, so
+that translators can't mess up with them.
=head2 Text wrapping
@@ -74,9 +74,9 @@
real nroff interpreter. It would be possible to do a real nroff
interpreter, to allow authors to use all the existing macros, or even to
define new ones in their pages, but we didn't want to. It would be too
-difficult, and we didn't though it was necessary. We do think that if
+difficult, and we thought it wasn't necessary. We do think that if
manpage authors want to see their production translated, they may have to
-adapt to ease the work of translaters.
+adapt to ease the work of translators.
So, the man parser implemented in po4a have some known limitations we are
not really inclined to correct, and which will constitute some pitfalls
@@ -85,32 +85,32 @@
=head2 Don't use the mdoc macro set
-The macro set described in mdoc(7) (and widly used under BSD, IIRC) isn't
+The macro set described in mdoc(7) (and widely used under BSD, IIRC) isn't
supported at all by po4a, and won't be. It would need a completely separate
-parser for this, and I'm not inclined to do so. On my machine, there is
-only 63 pages based on mdoc, from 4323 pages. If someone implement the mdoc
+parser for this, and I'm not inclined to do so. On my machine, there are
+only 63 pages based on mdoc, from 4323 pages. If someone implements the mdoc
support, I'll happilly include this, though.
=head2 Don't programm in nroff
nroff is a complete programming language, with macro definition,
conditionals and so on. Since this parser isn't a fully featured nroff
-interpreter, it will fail on pages using these facilities (There is about
+interpreter, it will fail on pages using these facilities (There are about
200 such pages on my box).
=head2 Avoid file inclusion when possible
The '.so' groff macro used to include another file in the current one is
-supported, but from my personnal experiment, it makes harder to manipulate
+supported, but from my own experience, it makes harder to manipulate
the man page, since all files have to be installed in the right location so
that you can see the result (ie, it breaks somehow the '-l' option of man).
=head2 Use the plain macro set
-There is still some macros which are not supported by po4a::man. This is
+There are still some macros which are not supported by po4a::man. This is
only because I failed to find any documentation about them. Here is the
list of unsupported macros used on my box. Note that this list isn't
-exaustive since the program fails on the first encountered unsupported
+exhaustive since the program fails on the first encountered unsupported
macro. If you have any information about some of these macros, I'll
happilly add support for them. Because of these macros, about 250 pages on
my box are inaccessible to po4a::man.
@@ -131,13 +131,13 @@
Some authors escape spaces to make sure that the wrapping tool won't mangle
them. po4a::man I<will> eat them. Use the .nf/.fi groff macro to control
-wheather the text should be wrapped or not.
+whether the text should be wrapped or not.
=head2 Don't mess nest font specifier.
In order to make translator's life easier, po4a::man will change all font
specifiers in the way explained above. This process is sometimes fragile,
-and need some love from you. For example, don't write the following:
+and needs some love from you. For example, don't write the following:
\fB bold text \fI italic text \fR back to roman
@@ -156,7 +156,7 @@
=head2 Conclusion
-To summarise this section, keep simple, and don't try to be cleaver while
+To summarise this section, keep simple, and don't try to be clever while
authoring your man pages. A lot of things are possible in nroff, and not
supported by this parser. For example, don't try to mess with \c to
interrupt the text processing (like 40 pages on my box do). Or, be sure to
@@ -167,8 +167,8 @@
Of course, another possibility is to use another format, more translator
friendly (like pod using po4a::pod, or one of the xml familly like sgml),
but thanks to po4a::man it isn't needed anymore. That being said, if the
-source format of your documentation is pod, or xml, it may be cleaver to
-translate the source format and not this generated one. In most case,
+source format of your documentation is pod, or xml, it may be clever to
+translate the source format and not this generated one. In most cases,
po4a::man will detect generated pages and issue a warning. It will even
refuse to process Pod generated pages, because those pages are perfectly
handled by po4a::pod, and because their nroff counterpart defines a lot of
@@ -219,7 +219,7 @@
=head1 SEE ALSO
-L<po4a(7)>, L<Locale::Po4a::TransTractor(3pm)>,
+L<po4a(7)|po4a.7>, L<Locale::Po4a::TransTractor(3pm)>,
L<Locale::Po4a::Pod(3pm)>.
=head1 AUTHORS
20 years, 3 months