X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Flocales.pl;h=baf0dc6615fc0cdd12aa5b2ea376a2b2b6739f5d;hb=bb8964ddfc59e40b62f6e65f5dd38cea9b7323d0;hp=5e6a8a5327f4f5eb39f5cf3e62952beeddf9e374;hpb=2d6a42eea58c70578fa6f540c3b80417cb7ea37b;p=kivitendo-erp.git diff --git a/scripts/locales.pl b/scripts/locales.pl index 5e6a8a532..baf0dc661 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -358,6 +358,13 @@ sub scanfile { $cached{$file}{scannosubs}{"../../SL/${module}.pm"} = 1; } + # Some calls to render() are split over multiple lines. Deal + # with that. + while (/(?:parse_html_template2?|render)\s*\( *$/) { + $_ .= <$fh>; + chomp; + } + # is this a template call? if (/(?:parse_html_template2?|render)\s*\(\s*[\"\']([\w\/]+)\s*[\"\']/) { my $new_file_base = "$basedir/templates/webpages/$1."; @@ -504,9 +511,11 @@ sub scanhtmlfile { while ($line =~ m/\[\%[^\w]*(\w+)\.\w+\(/g) { my $plugin = $1; - $plugins{needed}->{$plugin} = 1 if (first { $_ eq $plugin } qw(HTML LxERP JavaScript MultiColumnIterator L)); + $plugins{needed}->{$plugin} = 1 if (first { $_ eq $plugin } qw(HTML LxERP JavaScript JSON L P)); } + $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::