Revision 34af475f
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
scripts/locales.pl | ||
---|---|---|
18 | 18 |
use Getopt::Long; |
19 | 19 |
use IO::Dir; |
20 | 20 |
use List::Util qw(first); |
21 |
use POSIX; |
|
22 | 21 |
use Pod::Usage; |
23 | 22 |
|
24 | 23 |
$OUTPUT_AUTOFLUSH = 1; |
... | ... | |
35 | 34 |
my $locales_dir = "."; |
36 | 35 |
my $bindir = "$basedir/bin/mozilla"; |
37 | 36 |
my @progdirs = ( "$basedir/SL" ); |
38 |
my $menufile = "menu.ini";
|
|
37 |
my @menufiles = ("${basedir}/menu.ini", "${basedir}/admin-menu.ini");
|
|
39 | 38 |
my @javascript_dirs = ($basedir .'/js', $basedir .'/templates/webpages'); |
40 | 39 |
my $javascript_output_dir = $basedir .'/js'; |
41 | 40 |
my $submitsearch = qr/type\s*=\s*[\"\']?submit/i; |
... | ... | |
89 | 88 |
push @progfiles, map { m:^(.+)/([^/]+)$:; [ $2, $1 ] } grep { /\.pm$/ } map { find_files($_) } @progdirs; |
90 | 89 |
|
91 | 90 |
# put customized files into @customfiles |
92 |
my (@menufiles, %dir_h);
|
|
91 |
my %dir_h;
|
|
93 | 92 |
|
94 | 93 |
if ($opt_n) { |
95 | 94 |
@customfiles = (); |
96 |
@menufiles = ($menufile); |
|
97 | 95 |
} else { |
98 | 96 |
tie %dir_h, 'IO::Dir', $basedir; |
99 |
@menufiles = map { "$basedir/$_" } grep { /.*?_$menufile$/ } keys %dir_h; |
|
100 |
unshift @menufiles, "$basedir/$menufile"; |
|
97 |
push @menufiles, map { "$basedir/$_" } grep { /.*_menu.ini$/ } keys %dir_h; |
|
101 | 98 |
} |
102 | 99 |
|
103 | 100 |
my @dbplfiles; |
... | ... | |
724 | 721 |
close $fh; |
725 | 722 |
} |
726 | 723 |
|
727 |
sub slurp { |
|
728 |
my $file = shift; |
|
729 |
do { local ( @ARGV, $/ ) = $file; <> } |
|
730 |
} |
|
731 |
|
|
732 | 724 |
__END__ |
733 | 725 |
|
734 | 726 |
=head1 NAME |
Auch abrufbar als: Unified diff
Administrationsbereich mit Menüsystem versehen