fix label.t to search for multiple i18n objects inside of a sub
This commit is contained in:
parent
7a2d82ac0c
commit
e035bd28f8
1 changed files with 11 additions and 9 deletions
|
|
@ -147,15 +147,17 @@ sub obj_finder_pm {
|
||||||
close $pmf;
|
close $pmf;
|
||||||
##Advance pos to first subroutine
|
##Advance pos to first subroutine
|
||||||
while ( my $subBody = extract_codeblock($libFile, '{}', qr/(?ms).*?^sub (\w+)\s*/) ) {
|
while ( my $subBody = extract_codeblock($libFile, '{}', qr/(?ms).*?^sub (\w+)\s*/) ) {
|
||||||
next unless $subBody =~ /(\w+)\s*=\s*WebGUI::International->new\($sess_arg(?:,\s*($quotelike))?\)/;
|
while ( $subBody =~ /(\w+)\s*=\s*WebGUI::International->new\($sess_arg(?:,\s*($quotelike))?\)/msgc) {
|
||||||
my ($obj, $namespace) = ($1,$2);
|
my $objBody = $subBody;
|
||||||
while ( $subBody =~ /$obj\->get\(($sub_args)\)/msgc ) {
|
my ($obj, $namespace) = ($1,$2);
|
||||||
my ($label, $local_name) = split /,\s*/, $1;
|
while ( $objBody =~ /$obj\->get\(($sub_args)\)/msgc ) {
|
||||||
push @objLabels, {
|
my ($label, $local_name) = split /,\s*/, $1;
|
||||||
file=>$File::Find::name,
|
push @objLabels, {
|
||||||
label=>$label,
|
file=>$File::Find::name,
|
||||||
namespace=>$local_name || $namespace || 'WebGUI',
|
label=>$label,
|
||||||
};
|
namespace=>$local_name || $namespace || 'WebGUI',
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue