#!/usr/bin/perl

my %lex = ('Main' => 'Main');

use DBI;
use CGI;

eval require "../../etc/admin.conf";
if ( $@ ) {
    print $lex{Error}. " $@<br>\n";
    die $lex{Error}. " $@\n";
}

my $dsn = "DBI:$dbtype:dbname=$dbase";
my $dbh = DBI->connect($dsn,$user,$password);



my $sth = $dbh->prepare("select phrase from xlat_phrase");
$sth->execute;
if ( $DBI::errstr ){ print $DBI::errstr; die $DBI::errstr; }

my %phrase = ();

while ( my $phrase = $sth->fetchrow ) {
    my $bigphrase = uc( $phrase );

    if ( $phrase{$bigphrase} and $phrase ne $phrase{$bigphrase} ) {
	# previous phrase exists and current phrase is not same case
	print "$phrase{$bigphrase} - $phrase\n";
    } else {
	$phrase{$bigphrase} = $phrase;
    }
 
} 

