applications/luci-splash: Fix typo
[project/luci.git] / build / i18n-scan.pl
index 8523ced..3b61bc3 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged);
 
-@ARGV == 1 || die "Usage: $0 <source direcory>\n";
+@ARGV >= 1 || die "Usage: $0 <source direcory>\n";
 
 
 my %stringtable;
@@ -24,6 +24,7 @@ sub dec_lua_str
 sub dec_tpl_str
 {
        my $s = shift;
+       $s =~ s/-$//;
        $s =~ s/[\s\n]+/ /g;
        $s =~ s/^ //;
        $s =~ s/ $//;
@@ -31,7 +32,7 @@ sub dec_tpl_str
 }
 
 
-if( open F, "find $ARGV[0] -type f '(' -name '*.htm' -or -name '*.lua' ')' |" )
+if( open F, "find @ARGV -type f '(' -name '*.htm' -or -name '*.lua' ')' |" )
 {
        while( defined( my $file = readline F ) )
        {