From 24bff6e45ea380c65791b68745f615763d9472ab Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 5 Jun 2013 10:00:42 +0200 Subject: [PATCH] locales.pl: Suche nach nicht benutzten Templates gefixt --- scripts/locales.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/locales.pl b/scripts/locales.pl index d8df86296..c4adf1cf1 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -43,6 +43,10 @@ our $self = {}; 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); @@ -655,7 +659,7 @@ sub search_unused_htmlfiles { 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"; } -- 2.20.1