Lines 30-35
use File::Temp qw/tempdir/;
Link Here
|
30 |
use IPC::Open3; |
30 |
use IPC::Open3; |
31 |
use File::Spec; |
31 |
use File::Spec; |
32 |
use Symbol qw(gensym); |
32 |
use Symbol qw(gensym); |
|
|
33 |
use FindBin qw($Bin); |
34 |
use Cwd qw(abs_path); |
33 |
use utf8; |
35 |
use utf8; |
34 |
|
36 |
|
35 |
my $po_dir = tempdir(CLEANUP => 1); |
37 |
my $po_dir = tempdir(CLEANUP => 1); |
Lines 46-52
opendir ( $dh, $staff_dir ) or die "can't opendir $staff_dir: $!";
Link Here
|
46 |
my @staff_themes = grep { not /^\.|lib|js/ } readdir($dh); |
48 |
my @staff_themes = grep { not /^\.|lib|js/ } readdir($dh); |
47 |
close $dh; |
49 |
close $dh; |
48 |
|
50 |
|
49 |
chdir "misc/translator"; # for now, tmpl_process3.pl works only if run from its directory |
51 |
my $misc_translator_dir = abs_path("$Bin/../../misc/translator"); |
|
|
52 |
|
53 |
chdir $misc_translator_dir; # for now, tmpl_process3.pl works only if run from its directory |
50 |
|
54 |
|
51 |
# Check translatable of OPAC themes |
55 |
# Check translatable of OPAC themes |
52 |
for my $theme ( @opac_themes ) { |
56 |
for my $theme ( @opac_themes ) { |
Lines 63-69
sub test_string_extraction {
Link Here
|
63 |
my $template_dir = shift; |
67 |
my $template_dir = shift; |
64 |
my $po_dir = shift; |
68 |
my $po_dir = shift; |
65 |
|
69 |
|
66 |
my $command = "./tmpl_process3.pl create -i $template_dir -s $po_dir/$module.po -r --pedantic-warnings"; |
70 |
my $command = "PERL5LIB=\$PERL5LIB:$misc_translator_dir ./tmpl_process3.pl create -i $template_dir -s $po_dir/$module.po -r --pedantic-warnings"; |
67 |
|
71 |
|
68 |
open (NULL, ">", File::Spec->devnull); |
72 |
open (NULL, ">", File::Spec->devnull); |
69 |
print NULL "foo"; # avoid warning; |
73 |
print NULL "foo"; # avoid warning; |
70 |
- |
|
|