From: Moritz Bunkus Date: Wed, 27 Feb 2013 15:56:33 +0000 (+0100) Subject: locales.pl: Multi-Zeilen-Aufrufe von render() behandeln können X-Git-Tag: release-3.1.0beta1~592 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9a18b6cc3f09a6b79a563d96589f87fc9a055194;p=kivitendo-erp.git locales.pl: Multi-Zeilen-Aufrufe von render() behandeln können Machmal sieht das nämlich so aus: $self->render( 'some/template', unicorn => 'Charlie', %params, COW => 'Moo!' ); --- diff --git a/scripts/locales.pl b/scripts/locales.pl index 5e6a8a532..d8ff9c66a 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.";