#!/usr/bin/perl
use CGI;
require "plans_config.pl";
require "plans_lib.pl";
#if ($ARGV[0] eq "" || $ARGV[1] eq "")
$file0 = $language_file;
$file1 = "us_english.pl";
# init cgi stuff
$q = new CGI;
$script_url = $q->url(-path_info>=1);
$script_url =~ /(.*)\//; # remove trailing / and all text after
$script_url = $1; # remove trailing / and all text after
$theme_url = "$script_url/theme";
$css_path = "$theme_url/plans.css"; # css file
open (FH, "$file0") or die "Error! unable to read from $file0!";
flock FH,2;
@lines=;
close FH;
my %f0_vars = %{&extract_variables(\@lines)};
open (FH, "$file1") or die "Error! unable to read from $file1!";
flock FH,2;
@lines=;
close FH;
my %f1_vars = %{&extract_variables(\@lines)};
my $results1="";
my $results2="";
foreach $var (keys %f0_vars)
{
if ($f1_vars{$var} != 1)
{
$results1 .= "$var found in $file0 but not $file1\n";
}
}
foreach $var (keys %f1_vars)
{
if ($f0_vars{$var} != 1)
{
$results2 .= "$var found in $file1 but not $file0\n";
}
}
if ($ENV{HTTP_USER_AGENT} eq "")
{
print "$results1\n$results2";
}
else
{
$results1 =~ s/\n/
This utility compares the language file defined in plans_config.pl with us_english.pl. It reports which variables
are different between the two. Make sure you have the latest us_english.pl in the plans directory before running this.