projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b9c6f8a
)
locales.pl: Suche nach nicht benutzten Templates gefixt
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 5 Jun 2013 08:00:42 +0000
(10:00 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 5 Jun 2013 08:05:10 +0000
(10:05 +0200)
scripts/locales.pl
patch
|
blob
|
history
diff --git
a/scripts/locales.pl
b/scripts/locales.pl
index
d8df862
..
c4adf1c
100755
(executable)
--- a/
scripts/locales.pl
+++ b/
scripts/locales.pl
@@
-43,6
+43,10
@@
our $self = {};
our $missing = {};
our @lost = ();
our $missing = {};
our @lost = ();
+my %ignore_unused_templates = (
+ map { $_ => 1 } qw(common/help_overlay.html ct/testpage.html generic/autocomplete.html oe/periodic_invoices_email.txt part/testpage.html t/render.html t/render.js)
+);
+
my (%referenced_html_files, %locale, %htmllocale, %alllocales, %cached, %submit, %jslocale);
my ($ALL_HEADER, $MISSING_HEADER, $LOST_HEADER);
my (%referenced_html_files, %locale, %htmllocale, %alllocales, %cached, %submit, %jslocale);
my ($ALL_HEADER, $MISSING_HEADER, $LOST_HEADER);
@@
-655,7
+659,7
@@
sub search_unused_htmlfiles {
if (-d $entry) {
push @unscanned_dirs, $entry;
if (-d $entry) {
push @unscanned_dirs, $entry;
- } elsif (
($entry =~ /_master.html$/)
&& -f $entry && !$referenced_html_files{$entry}) {
+ } elsif (
!$ignore_unused_templates{strip_base($entry)}
&& -f $entry && !$referenced_html_files{$entry}) {
print "W: unused HTML template: " . strip_base($entry) . "\n";
}
print "W: unused HTML template: " . strip_base($entry) . "\n";
}