Commit 17b0479b authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Add cpanfile to translation catalog.

parent 5aee8bf3
......@@ -145,6 +145,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
src/bin/*.pl.in src/libexec/*.pl.in src/sbin/*.pl.in \
src/lib/*.pm src/lib/Sympa/*.pm src/lib/Sympa/*/*.pm \
src/lib/Sympa/*/*/*.pm \
cpanfile \
src/cgi/*.fcgi.in \
default/web_tt2/*.tt2 default/mail_tt2/*.tt2 \
default/mhonarc-ressources.tt2 default/topics.conf \
......
......@@ -240,6 +240,13 @@ foreach my $file (@ordered_files) {
print STDERR "Cannot open $file\n";
next;
}
# cpanfile
if ($file eq 'cpanfile') {
CPANFile::load();
next;
}
open F, $file or die $!;
$_ = <F>;
$filename =~ s!^./!!;
......@@ -686,7 +693,38 @@ sub dump_var {
}
}
package CPANFile;
use strict;
use warnings;
use lib qw(.);
my @entries;
sub feature {
push @entries,
{
expression => $_[1],
filename => 'cpanfile',
line => [caller]->[2],
};
}
sub on { $_[1]->() }
sub recommends { }
sub requires { }
sub load {
do 'cpanfile';
die unless @entries;
foreach my $entry (@entries) {
main::add_expression($entry);
}
}
1;
__END__
=encoding utf-8
=head1 ACKNOWLEDGMENTS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment