X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=build%2Fi18n-scan.pl;h=3b61bc3843f2c027b1eed69e4ad9e9a81afd58ce;hb=9199b2ca02510d796be62d9b1fea46aff6dbe05d;hp=8523ced1ab904ce8ceab20b98703f05446599ac7;hpb=58b3b2156fa807332a102e7145d18eec62c69f4b;p=project%2Fluci.git diff --git a/build/i18n-scan.pl b/build/i18n-scan.pl index 8523ced1a..3b61bc384 100755 --- a/build/i18n-scan.pl +++ b/build/i18n-scan.pl @@ -4,7 +4,7 @@ use strict; use warnings; use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged); -@ARGV == 1 || die "Usage: $0 \n"; +@ARGV >= 1 || die "Usage: $0 \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 ) ) {