locales.pl: Multi-Zeilen-Aufrufe von render() behandeln können
[kivitendo-erp.git] / scripts / locales.pl
index 5e6a8a5..d8ff9c6 100755 (executable)
@@ -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.";