From 5828bfe58adf3be1d463392caf5c5fc29b30a8ac Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 17 Dec 2009 11:45:23 +0100 Subject: [PATCH] =?utf8?q?Verwendung=20des=20kommenden=20T8-Filters=20zur?= =?utf8?q?=20=C3=9Cbersetzung=20erkennen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- locale/de/locales.pl | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/locale/de/locales.pl b/locale/de/locales.pl index 7cc3c5302..bb30c7a90 100755 --- a/locale/de/locales.pl +++ b/locale/de/locales.pl @@ -558,6 +558,25 @@ sub scanhtmlfile { $plugins{needed}->{$plugin} = 1 if (first { $_ eq $plugin } qw(HTML LxERP JavaScript MultiColumnIterator)); } + while ($line =~ m/\[\% # Template-Start-Tag + [\-~#] # Whitespace-Unterdrückung + \s* # Optional beliebig viele Whitespace + [\'\"] # Anfang des zu übersetzenden Strings + (.*?) # Der zu übersetzende String + [\'\"] # Ende des zu übersetzenden Strings + \s*\|\s* # Pipe-Zeichen mit optionalen Whitespace davor und danach + \$T8 # Filteraufruf + .*? # Optionale Argumente für den Filter und Whitespaces + [\-~#] # Whitespace-Unterdrückung + \%\] # Template-Ende-Tag + /ix) { + print "Found filter >>>$1<<<\n"; + $cached{$_[0]}{all}{$1} = 1; + $cached{$_[0]}{html}{$1} = 1; + $plugins{needed}->{T8} = 1; + substr $line, $-[1], $+[0] - $-[0], ''; + } + while ("" ne $line) { if (!$copying) { if ($line =~ m||i) { @@ -608,9 +627,9 @@ sub scanhtmlfile { } # copy back into global arrays - map { $alllocales{$_} = 1 } keys %{$cached{$_[0]}{all}}; - map { $htmllocales{$_} = 1 } keys %{$cached{$_[0]}{html}}; - map { $submit{$_} = 1 } keys %{$cached{$_[0]}{submit}}; + map { $alllocales{$_} = 1 } keys %{$cached{$_[0]}{all}}; + map { $htmllocale{$_} = 1 } keys %{$cached{$_[0]}{html}}; + map { $submit{$_} = 1 } keys %{$cached{$_[0]}{submit}}; } sub converthtmlfile { -- 2.20.1