diff options
author | Finnish Language Team <finnish> | 2000-07-26 21:45:04 +0000 |
---|---|---|
committer | Finnish Language Team <finnish> | 2000-07-26 21:45:04 +0000 |
commit | 153403d822384670a7b47aa09323d4f4be55b188 (patch) | |
tree | b5b02cd8c0bf4b4dc37cb9280ebe26f9d36d6907 /check_trans.pl | |
parent | 3c1598abb483f2b3901dd5edeba2ba06d5e23a24 (diff) |
Added -q (quiet): Don't whine about missing files
(For more fine grained 'quiet', touch .transignore in directories you
aren't going to translate.)
Now check_trans removes trailing slash from target
language. (Happens for me usually because I use tab completition.)
CVS version numbers
check_trans.pl: 1.9 -> 1.10
Diffstat (limited to 'check_trans.pl')
-rwxr-xr-x | check_trans.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/check_trans.pl b/check_trans.pl index 9702b37a430..00ba508da5c 100755 --- a/check_trans.pl +++ b/check_trans.pl @@ -12,6 +12,7 @@ # Option: # -v enable verbose mode # -d output diff +# -q don't whine about missing files # Translators need to embed in the files they translate a comment # in its own line with the revision of the file they translated such as: @@ -30,7 +31,7 @@ use IO::Handle; $opt_d = 0; $opt_s = ''; $opt_p = undef; -getopts('vds:p:'); +getopts('vdqs:p:'); warn "Checking subtree $opt_s only\n" if $opt_v; @@ -52,6 +53,9 @@ else $from = 'english'; $to = shift || $defaultlanguage; +# Remove slash from end +$to =~ s%/$%%; + $from = "$from/$opt_s"; $to = "$to/$opt_s"; @@ -74,7 +78,7 @@ foreach (@en) { sub load_entries { my ($name) = shift; my (%data); - warn "Loading $name\n" if $opt_v; + warn "Loading $name\n" if ($opt_v && !$opt_q); open(F, $name) || die $!; while(<F>) { next unless m#^/#; @@ -105,7 +109,7 @@ sub check_file { my ($oldr, $oldname); warn "Checking $name\n" if $opt_v; unless (-r $name) { - print "Missing $name\n"; + print "Missing $name\n" unless $opt_q; return; } open(F, $name) || die $!; |