3 # Examine all translation files to create a report that shows how
4 # many translations are missing from each translation file.
6 #######################################################################
8 $inc_dir = "../includes";
10 $transdir = "../translations";
12 opendir ( DIR, $transdir ) || die "Error opening $transdir: $!";
13 @files = sort readdir ( DIR );
16 # ignore everything except .txt files
17 @files = grep ( /.txt$/, @files );
20 printf "%-20s %s\n", "Language file", "No. missing translations";
22 foreach $f ( @files ) {
23 $out = `perl check_translation.pl ../translations/$f`;
24 if ( $out =~ / missing./ ) {
25 # missing some translations
26 @lines = split ( /\n/, $out );
27 ( $l ) = grep ( / translation.s. missing/, @lines );
28 if ( $l =~ /^(\d+).*\((\d\S+)% complete/ ) {
29 printf "%-20s %d (%1.1f%% complete)\n", $f . ":", $1, $2;
32 # all translations found :-)
33 printf "%-20s %s\n", $f . ":", "Complete";