From: Jo-Philipp Wich Date: Tue, 3 Apr 2012 00:35:54 +0000 (+0000) Subject: build: rework checks in i18n-scan.pl X-Git-Tag: 0.11.0~841 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=3501cbea52d17bc19dea2bc90312ba8954d938a1;ds=sidebyside build: rework checks in i18n-scan.pl --- diff --git a/build/i18n-scan.pl b/build/i18n-scan.pl index 1243545ac..781ac6480 100755 --- a/build/i18n-scan.pl +++ b/build/i18n-scan.pl @@ -60,7 +60,7 @@ if( open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' ')' |" ) if( $code =~ /^['"]/ ) { - while( defined $sub && length($sub) > 0 ) + while( defined $sub ) { ( $sub, $code ) = extract_delimited($code, q{'"}, q{\s*(?:\.\.\s*)?}); @@ -68,6 +68,10 @@ if( open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' ')' |" ) { $res .= substr $sub, 1, length($sub) - 2; } + else + { + undef $sub; + } } } elsif( $code =~ /^(\[=*\[)/ )