]> git.proxmox.com Git - proxmox-i18n.git/commitdiff
jsgettext.pl: correctly skip gettext function definition
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Dec 2017 12:44:48 +0000 (13:44 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Dec 2017 12:44:48 +0000 (13:44 +0100)
jsgettext.pl

index 033e7423a3ab74c2da14d4d6512c914850cd4640..6dd7391246315ce24eeb6dfeaeda544a8ba744f7 100755 (executable)
@@ -118,7 +118,7 @@ sub extract_msg {
 foreach my $s (@$sources) {
     open(SRC, $s) || die "unable to open file '$s' - $!\n";
     while(defined(my $line = <SRC>)) {
 foreach my $s (@$sources) {
     open(SRC, $s) || die "unable to open file '$s' - $!\n";
     while(defined(my $line = <SRC>)) {
-       next if $line =~ m/^function gettext/;
+       next if $line =~ m/^\s*function gettext/;
        if ($line =~ m/gettext\s*\(/) {
            extract_msg($s, $., $line);
        }
        if ($line =~ m/gettext\s*\(/) {
            extract_msg($s, $., $line);
        }