+ $plugins{needed}->{T8} = 1 if $line =~ m/\[\%.*\|.*\$T8/;
+
+ while ($line =~ m/(?: # Start von Variante 1: LxERP.t8('...'); ohne darumliegende [% ... %]-Tags
+ (LxERP\.t8)\( # LxERP.t8( ::Parameter $1::
+ ([\'\"]) # Anfang des zu übersetzenden Strings ::Parameter $2::
+ (.*?) # Der zu übersetzende String ::Parameter $3::
+ (?<!\\)\2 # Ende des zu übersetzenden Strings
+ | # Start von Variante 2: [% '...' | $T8 %]
+ \[\% # Template-Start-Tag
+ [\-~#]? # Whitespace-Unterdrückung
+ \s* # Optional beliebig viele Whitespace
+ ([\'\"]) # Anfang des zu übersetzenden Strings ::Parameter $4::
+ (.*?) # Der zu übersetzende String ::Parameter $5::
+ (?<!\\)\4 # Ende des zu übersetzenden Strings
+ \s*\|\s* # Pipe-Zeichen mit optionalen Whitespace davor und danach
+ (\$T8) # Filteraufruf ::Parameter $6::
+ .*? # Optionale Argumente für den Filter
+ \s* # Whitespaces
+ [\-~#]? # Whitespace-Unterdrückung
+ \%\] # Template-Ende-Tag
+ )
+ /ix) {
+ my $module = $1 || $6;
+ my $string = $3 || $5;
+ print "Found filter >>>$string<<<\n" if $debug;
+ substr $line, $LAST_MATCH_START[1], $LAST_MATCH_END[0] - $LAST_MATCH_START[0], '';
+
+ $string = unescape_template_string($string);
+ $cached{$file}{all}{$string} = 1;
+ $cached{$file}{html}{$string} = 1;
+ $cached{$file}{submit}{$string} = 1 if $PREMATCH =~ /$submitsearch/;
+ $plugins{needed}->{T8} = 1 if $module eq '$T8';
+ $plugins{needed}->{LxERP} = 1 if $module eq 'LxERP.t8';
+ }