Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b04b96e
Showing
30 changed files
with
13,906 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.tmp | ||
_old_versions/ | ||
_doc/ | ||
.DS_Store | ||
*.*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Revision history for Perl extension POD2::ES. | ||
|
||
0.01 March 8, 2010 | ||
|
||
* Let's get cracking! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Revision history for Perl extension POD2::ES. | ||
|
||
0.01 Mon Aug 31 15:54:07 2009 | ||
- original version; created by h2xs 1.23 with options | ||
-A -X -n POD2::ES | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Changes | ||
Makefile.PL | ||
MANIFEST | ||
README | ||
t/00base.t | ||
lib/POD2/ES.pm | ||
|
||
META.yml Module meta-data (added by MakeMaker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Changes | ||
Makefile.PL | ||
MANIFEST | ||
README | ||
t/00base.t | ||
lib/POD2/ES.pm | ||
lib/POD2/ES/pod/perlbook.pod | ||
lib/POD2/ES/pod/perlcheat.pod | ||
lib/POD2/ES/pod/perldata.pod | ||
lib/POD2/ES/pod/perlfunc.pod | ||
lib/POD2/ES/pod/perl.pod | ||
lib/POD2/ES/pod/perlstyle.pod | ||
lib/POD2/ES/pod/perlsyn.pod | ||
|
||
META.yml Module meta-data (added by MakeMaker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- #YAML:1.0 | ||
name: POD2-ES | ||
version: 0.01 | ||
abstract: Spanish translation of Perl core documentation | ||
author: | ||
- Enrique Nell <blas.gordon@gmail.com> | ||
license: unknown | ||
distribution_type: module | ||
configure_requires: | ||
ExtUtils::MakeMaker: 0 | ||
build_requires: | ||
ExtUtils::MakeMaker: 0 | ||
requires: {} | ||
no_index: | ||
directory: | ||
- t | ||
- inc | ||
generated_by: ExtUtils::MakeMaker version 6.55_02 | ||
meta-spec: | ||
url: http://module-build.sourceforge.net/META-spec-v1.4.html | ||
version: 1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use ExtUtils::MakeMaker; | ||
# See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
# the contents of the Makefile that is written. | ||
WriteMakefile( | ||
NAME => 'POD2::ES', | ||
VERSION_FROM => 'lib/POD2/ES.pm', # finds $VERSION | ||
PREREQ_PM => {}, # e.g., Module::Name => 1.1 | ||
($] >= 5.005 ? ## Add these new keywords supported since 5.005 | ||
(ABSTRACT_FROM => 'lib/POD2/ES.pm', # retrieve abstract from module | ||
AUTHOR => 'Enrique Nell <blas.gordon@gmail.com>') : ()), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
POD2-ES version 0.01 | ||
==================== | ||
|
||
The README is used to introduce the module and provide instructions on | ||
how to install the module, any machine dependencies it may have (for | ||
example C compilers and installed libraries) and any other information | ||
that should be provided before the module is installed. | ||
|
||
A README file is required for CPAN modules since CPAN extracts the | ||
README file from a module distribution so that people browsing the | ||
archive can use it get an idea of the modules uses. It is usually a | ||
good idea to provide version information here so that people can | ||
decide whether fixes for the module are worth downloading. | ||
|
||
INSTALLATION | ||
|
||
To install this module type the following: | ||
|
||
perl Makefile.PL | ||
make | ||
make test | ||
make install | ||
|
||
|
||
COPYRIGHT AND LICENCE | ||
|
||
Copyright (C) 2010 by Enrique Nell | ||
|
||
This library is free software; you can redistribute it and/or modify | ||
it under the same terms as Perl itself, either Perl version 5.10.0 or, | ||
at your option, any later version of Perl 5 you may have available. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
POD2-ES version 0.01 | ||
==================== | ||
|
||
The README is used to introduce the module and provide instructions on | ||
how to install the module, any machine dependencies it may have (for | ||
example C compilers and installed libraries) and any other information | ||
that should be provided before the module is installed. | ||
|
||
A README file is required for CPAN modules since CPAN extracts the | ||
README file from a module distribution so that people browsing the | ||
archive can use it get an idea of the modules uses. It is usually a | ||
good idea to provide version information here so that people can | ||
decide whether fixes for the module are worth downloading. | ||
|
||
INSTALLATION | ||
|
||
To install this module type the following: | ||
|
||
perl Makefile.PL | ||
make | ||
make test | ||
make install | ||
|
||
|
||
COPYRIGHT AND LICENCE | ||
|
||
Copyright (C) 2009 by Enrique Nell | ||
|
||
This library is free software; you can redistribute it and/or modify | ||
it under the same terms as Perl itself, either Perl version 5.10.0 or, | ||
at your option, any later version of Perl 5 you may have available. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
package POD2::ES; | ||
|
||
use 5.005; | ||
use strict; | ||
use vars qw($VERSION); | ||
$VERSION = '0.01'; | ||
|
||
use base qw(Exporter); | ||
our @EXPORT = qw(print_pod print_pods search_perlfunc_re new pod_dirs); | ||
|
||
my $pods = { | ||
# perl => '5.12.0', | ||
# perlbook => '5.12.0', | ||
# perlcheat => '5.12.0', | ||
# perldata => '5.12.0', | ||
# perlfunc => '5.12.0', | ||
# perlstyle => '5.12.0', | ||
# perlsyn => '5.12.0', | ||
}; | ||
|
||
sub new { | ||
return __PACKAGE__; | ||
} | ||
|
||
sub pod_dirs { | ||
( my $mod = __PACKAGE__ . '.pm' ) =~ s|::|/|g; | ||
( my $dir = $INC{$mod} ) =~ s/\.pm\z//; | ||
return $dir; | ||
} | ||
|
||
sub print_pods { | ||
print_pod(sort keys %$pods); | ||
} | ||
|
||
sub print_pod { | ||
my @args = @_ ? @_ : @ARGV; | ||
|
||
while (@args) { | ||
(my $pod = lc(shift @args)) =~ s/\.pod$//; | ||
if ( exists $pods->{$pod} ) { | ||
print "\t'$pod' translated from Perl $pods->{$pod}\n"; | ||
} | ||
else { | ||
print "\t'$pod' doesn't yet exists\n"; | ||
} | ||
} | ||
} | ||
|
||
sub search_perlfunc_re { | ||
return 'Listado alfabético de funciones de Perl'; | ||
} | ||
|
||
1; | ||
__END__ | ||
=encoding utf8 | ||
=head1 NAME | ||
POD2::ES - Spanish translation of Perl core documentation | ||
=head1 SYNOPSIS | ||
%> perldoc POD2::ES::<podname> | ||
use POD2::ES; | ||
print_pods(); | ||
print_pod('pod_foo', 'pod_baz', ...); | ||
%> perl -MPOD2::ES -e print_pods | ||
%> perl -MPOD2::ES -e print_pod <podname1> <podname2> ... | ||
=head1 DESCRIPTION | ||
pod2es is the spanish translation project of core Perl pods. This has been (and | ||
currently still is) a very big work! :-) | ||
See http://... for more details about the project. | ||
Once the package has been installed, the translated documentation can be | ||
accessed with: | ||
%> perldoc POD2::ES::<podname> | ||
=head1 EXTENDING perldoc | ||
With the translated pods, unfortunately, the useful C<perldoc>'s C<-f> and C<-q> | ||
switches don't work no longer. | ||
So, we made a simple patch to F<Pod/Perldoc.pm> 3.14 in order to allow also the | ||
syntax: | ||
%> perldoc -L ES <podname> | ||
%> perldoc -L ES -f <function> | ||
%> perldoc -L ES -q <FAQregex> | ||
The patch adds the C<-L> switch that allows to define language code for desired | ||
language translation. If C<POD2::E<lt>codeE<gt>> package doesn't exists, the | ||
effect of the switch will be ignored. | ||
If you are particularly lazy you can add a system alias like: | ||
perldoc-es="perldoc -L ES " | ||
in order to avoid to write the C<-L> switch every time and to type directly: | ||
%> perldoc-es -f map | ||
You can apply the patch with: | ||
%> patch -p0 `/path/to/perl -MPod::Perldoc -e 'print $INC{"Pod/Perldoc.pm"}'` < /path/to/Perldoc.pm-3.14-patch | ||
The patch lives under F<./patches/Perldoc.pm-3.14-patch> shipped in this | ||
distribution. | ||
Note that the patch is for version 3.14 of L<Pod::Perldoc|Pod::Perldoc> | ||
(included into Perl 5.8.7 and Perl 5.8.8). If you have a previous Perl distro | ||
(but E<gt>= 5.8.1) and you are impatient to apply the patch, please upgrade | ||
your L<Pod::Perldoc|Pod::Perldoc> module to 3.14! ;-) | ||
See C<search_perlfunc_re> API for more information. | ||
I<Note: Perl 5.10 already contains this functionality, so you don't have to apply any patch.> | ||
=head1 API | ||
The package exports following functions: | ||
=over 4 | ||
=item * C<new> | ||
Added for compatibilty with Perl 5.10.1's C<perldoc>. | ||
Used by L<Pod::Perldoc> in order to return translation package name. | ||
=item * C<pod_dirs> | ||
Added for compatibilty with Perl 5.10.1's C<perldoc>. | ||
Used by L<Pod::Perldoc> in order to find out where to look for translated pods. | ||
=item * C<print_pods> | ||
Prints all translated pods and relative Perl original version. | ||
=item * C<print_pod> | ||
Prints relative Perl original version of all pods passed as arguments. | ||
=item * C<search_perlfunc_re> | ||
Since F<Pod/Perldoc.pm>'s C<search_perlfunc> method uses hard coded string | ||
"Alphabetical Listing of Perl Functions" (as regexp) to skip introduction, in | ||
order to make the patch to work with other languages with the option C<-L>,we | ||
used a simple plugin-like mechanism. | ||
C<POD2::E<lt>codeE<gt>> language package must export C<search_perlfunc_re> that | ||
returns a localized translation of the paragraph string above. This string will | ||
be used to skip F<perlfunc.pod> intro. Again, if | ||
C<POD2::E<lt>codeE<gt>-E<gt>search_perlfunc_re> fails (or doesn't exist), we'll | ||
come back to the default behavoiur. This mechanism allows to add additional | ||
C<POD2::*> translations without need to patch F<Pod/Perldoc.pm> every time. | ||
=back | ||
=head1 Como funciona el proyecto | ||
You (could) put here specific spanish project localized informations. | ||
=head1 AUTHORS | ||
pod2es is a larger translation project owned by ... | ||
See L<http://...> for more details. | ||
POD2::ES package is currently maintained by Joaquín Ferrero and Enrique Nell. | ||
=head1 SEE ALSO | ||
L<POD2::IT>, L<POD2::FR>, L<POD2::LT>, L<perl>. | ||
=head1 COPYRIGHT AND LICENCE | ||
Copyright (C) 2010 | ||
This library is free software; you can redistribute it and/or modify | ||
it under the same terms as Perl itself. | ||
=cut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Before `make install' is performed this script should be runnable with | ||
# `make test'. After `make install' it should work as `perl POD2-ES.t' | ||
|
||
######################### | ||
|
||
# change 'tests => 1' to 'tests => last_test_to_print'; | ||
|
||
use Test::More tests => 1; | ||
BEGIN { use_ok('POD2::ES') }; | ||
|
||
######################### | ||
|
||
# Insert your test code below, the Test::More module is use()ed here so read | ||
# its man page ( perldoc Test::More ) for help writing this test script. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<omegat> | ||
<project version="1.0"> | ||
<source_dir>__DEFAULT__</source_dir> | ||
<target_dir>__DEFAULT__</target_dir> | ||
<tm_dir>__DEFAULT__</tm_dir> | ||
<glossary_dir>__DEFAULT__</glossary_dir> | ||
<dictionary_dir>__DEFAULT__</dictionary_dir> | ||
<source_lang>EN-US</source_lang> | ||
<target_lang>ES</target_lang> | ||
<sentence_seg>true</sentence_seg> | ||
</project> | ||
</omegat> |
Oops, something went wrong.