Ignore:
Timestamp:
Mar 23, 2010, 10:50:48 PM (14 years ago)
Author:
plg
Message:

improvement: piwigo_dir can be set from the command line

bug fixed: changing filters for files to check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/missing_keys.pl

    r5286 r5296  
    99our %registered_keys = ();
    1010
    11 my $piwigo_dir = '/home/pierrick/public_html/piwigo/dev/trunk';
    12 my $type = $ARGV[0]; # common, admin, install, upgrade
     11my $piwigo_dir = $ARGV[0]; # '/home/pierrick/public_html/piwigo/dev/trunk';
     12my $type = $ARGV[1];      # common, admin, install, upgrade
    1313
    1414find(\&used_keys, $piwigo_dir);
     
    1919
    2020    if (not defined $registered_keys{$key}) {
    21         print "{".$key."}", ' is missing', "\n";
    22         # print '$lang[\''.$key.'\'] = \''.$key.'\';', "\n";
     21        # print "{".$key."}", ' is missing', "\n";
     22        print '$lang[\''.$key.'\'] = \''.$key.'\';', "\n";
    2323    }
    2424}
     
    3535    }
    3636
    37     if ($File::Find::name =~ m{/(plugins|language)/}) {
     37    if ($File::Find::name =~ m{/(plugins|language|_data)/}) {
    3838        return 0;
    3939    }
     
    7070            $is_admin = 1;
    7171        }
     72        if ($File::Find::name =~ m{/admin\.php$}) {
     73            $is_admin = 1;
     74        }
    7275
    7376        if (not $is_admin) {
     
    8386            return 0;
    8487        }
    85         if ($File::Find::name =~ m{/admin/} or $File::Find::name =~ m{themes/default/template/mail}) {
     88        if ($File::Find::name =~ m{/admin(/|\.php)} or $File::Find::name =~ m{themes/default/template/mail}) {
    8689            return 0;
    8790        }
Note: See TracChangeset for help on using the changeset viewer.