summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-04-02 23:57:11 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-04-02 23:57:11 +0000
commitc024eca0fc232957077038dbdda0d630a11b4484 (patch)
treee8b6e85cbe9248e14621f233b43fdd39ca4f02e2 /build
parent4c48b568755f1288606ae36acf750125381ec77a (diff)
build: rework i18n-scan.pl defined checks
Diffstat (limited to 'build')
-rwxr-xr-xbuild/i18n-scan.pl8
1 files changed, 2 insertions, 6 deletions
diff --git a/build/i18n-scan.pl b/build/i18n-scan.pl
index 3f7327109..1243545ac 100755
--- a/build/i18n-scan.pl
+++ b/build/i18n-scan.pl
@@ -60,15 +60,11 @@ if( open F, "find @ARGV -type f '(' -name '*.htm' -o -name '*.lua' ')' |" )
if( $code =~ /^['"]/ )
{
- while( defined $sub )
+ while( defined $sub && length($sub) > 0 )
{
( $sub, $code ) = extract_delimited($code, q{'"}, q{\s*(?:\.\.\s*)?});
- if( length($sub) < 1 ) {
- undef $sub;
- }
-
- if( defined $sub )
+ if( defined $sub && length($sub) > 2 )
{
$res .= substr $sub, 1, length($sub) - 2;
}