mirror of
https://git.proxmox.com/git/proxmox-i18n
synced 2025-10-04 16:13:44 +00:00
js generator: avoid doing two tests per line
combine the checks and make the second dependent from the former Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d310270dc7
commit
052bd210b1
@ -122,8 +122,7 @@ sub extract_msg {
|
|||||||
foreach my $s (@$sources) {
|
foreach my $s (@$sources) {
|
||||||
open(my $SRC_FH, '<', $s) || die "unable to open file '$s' - $!\n";
|
open(my $SRC_FH, '<', $s) || die "unable to open file '$s' - $!\n";
|
||||||
while(defined(my $line = <$SRC_FH>)) {
|
while(defined(my $line = <$SRC_FH>)) {
|
||||||
next if $line =~ m/^\s*function gettext/;
|
if ($line =~ m/gettext\s*\(/ && $line !~ m/^\s*function gettext/) {
|
||||||
if ($line =~ m/gettext\s*\(/) {
|
|
||||||
extract_msg($s, $., $line);
|
extract_msg($s, $., $line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user