projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git@lx-office.linet-services.de:lx-office-erp
[kivitendo-erp.git]
/
scripts
/
locales.pl
diff --git
a/scripts/locales.pl
b/scripts/locales.pl
index
b26fe89
..
b972a49
100755
(executable)
--- a/
scripts/locales.pl
+++ b/
scripts/locales.pl
@@
-31,6
+31,7
@@
parse_args();
my $basedir = "../..";
my $locales_dir = ".";
my $bindir = "$basedir/bin/mozilla";
my $basedir = "../..";
my $locales_dir = ".";
my $bindir = "$basedir/bin/mozilla";
+my @progdirs = ( "$basedir/SL/Controller", "$basedir/SL/Template/Plugin" );
my $dbupdir = "$basedir/sql/Pg-upgrade";
my $dbupdir2 = "$basedir/sql/Pg-upgrade2";
my $menufile = "menu.ini";
my $dbupdir = "$basedir/sql/Pg-upgrade";
my $dbupdir2 = "$basedir/sql/Pg-upgrade2";
my $menufile = "menu.ini";
@@
-42,11
+43,17
@@
my ($ALL_HEADER, $MISSING_HEADER, $LOST_HEADER);
init();
opendir DIR, "$bindir" or die "$!";
init();
opendir DIR, "$bindir" or die "$!";
-my @progfiles = grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR;
+my @progfiles =
map { [ $_, $bindir ] }
grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR;
seekdir DIR, 0;
my @customfiles = grep /_custom/, readdir DIR;
closedir DIR;
seekdir DIR, 0;
my @customfiles = grep /_custom/, readdir DIR;
closedir DIR;
+foreach my $dir (@progdirs) {
+ opendir DIR, $dir or die "$!";
+ push @progfiles, map { [ $_, $dir ] } grep { /\.pm$/ } readdir DIR;
+ closedir DIR;
+}
+
# put customized files into @customfiles
my @menufiles;
# put customized files into @customfiles
my @menufiles;
@@
-91,7
+98,7
@@
chomp $charset;
my %old_texts = %{ $self->{texts} || {} };
my %old_texts = %{ $self->{texts} || {} };
-map({ handle_file(
$_, $bindir
); } @progfiles);
+map({ handle_file(
@{ $_ }
); } @progfiles);
map({ handle_file($_, $dbupdir); } @dbplfiles);
map({ handle_file($_, $dbupdir2); } @dbplfiles2);
map({ handle_file($_, $dbupdir); } @dbplfiles);
map({ handle_file($_, $dbupdir2); } @dbplfiles2);
@@
-324,6
+331,8
@@
sub scanfile {
my ($is_submit, $line_no, $sub_line_no) = (0, 0, 0);
while (<$fh>) {
my ($is_submit, $line_no, $sub_line_no) = (0, 0, 0);
while (<$fh>) {
+ last if /^\s*__END__/;
+
$line_no++;
# is this another file
$line_no++;
# is this another file
@@
-339,7
+348,7
@@
sub scanfile {
}
# is this a template call?
}
# is this a template call?
- if (/
parse_html_template2?
\s*\(\s*[\"\']([\w\/]+)\s*[\"\']/) {
+ if (/
(?:parse_html_template2?|render)
\s*\(\s*[\"\']([\w\/]+)\s*[\"\']/) {
my $newfile = "$basedir/templates/webpages/$1.html";
if (/parse_html_template2/) {
print "E: " . strip_base($file) . " is still using 'parse_html_template2' for " . strip_base($newfile) . ".\n";
my $newfile = "$basedir/templates/webpages/$1.html";
if (/parse_html_template2/) {
print "E: " . strip_base($file) . " is still using 'parse_html_template2' for " . strip_base($newfile) . ".\n";