3 # GNOME entry finder utility.
4 # (C) 2000 The Free Software Foundation
6 # Author(s): Kenneth Christiansen
9 $VERSION = "1.0.0 beta 5";
15 print "desk.pl: missing file arguments\n";
16 print "Try `desk.pl --help' for more information.\n";
28 if ("$LANG" eq "--version" || "$LANG" eq "-V"){
29 print "GNOME Entry finder $VERSION\n";
30 print "Written by Kenneth Christiansen <kenneth\@gnome.org>, 2000.\n\n";
31 print "Copyright (C) 2000 Free Software Foundation, Inc.\n";
32 print "This is free software; see the source for copying conditions. There is NO\n";
33 print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
37 elsif ($LANG eq "--help" || "$LANG" eq "-H"){
38 print "Usage: ./desk.pl [OPTIONS] ...LANGCODE ENTRY\n";
39 print "Checks .desktop and alike files for missing translations.\n\n";
40 print " -V, --version shows the version\n";
41 print " -H, --help shows this help page\n";
42 print "\nReport bugs to <kenneth\@gnome.org>.\n";
47 print "desk.pl: invalid option -- $LANG\n";
48 print "Try `desk.pl --help' for more information.\n";
55 $a="find ../ -print | egrep '.*\\.(desktop|soundlist"
58 $b="find ../ -print | egrep '.*\\.(desktop|soundlist"
61 print "Searching for missing $SEARCH\[$LANG\] entries...\n";
67 foreach my $file (@buf1){
70 if ($_=~/$SEARCH\[$LANG\]\=/o){
71 $file = unpack("x2 A*",$file) . "\n";
79 foreach my $file (@buf2){
82 if ($_=~/$SEARCH\=/o){
83 $file = unpack("x2 A*",$file) . "\n";
90 @bufff1 = sort (@buff1);
91 @bufff2 = sort (@buff2);
99 if (!exists($in2{$_})){
104 open(OUT1
, ">MISSING.$LANG.$SEARCH");
109 stat("MISSING.$LANG.$SEARCH");
110 print "\nWell, you need to fix these:\n\n" if -s _
;
111 print @result if -s _
;
112 print "\nThe list is saved in MISSING.$LANG.$SEARCH\n" if -s _
;
113 print "\nWell, it's all perfect! Congratulation!\n" if -z _
;
114 unlink "MISSING.$LANG.$SEARCH" if -z _
;