2
# find_missing_messages.pl
3
# This script finds error and notice messages missing from wwsympa.fcgi, and outputs them
4
# in a form similar to these files so you can simply copy-paste it. Don't forget to set the dir variable!
5
# Author: Gábor Hargitai <higany@sch.bme.hu.>
8
my $dir="./sympa-5.0b.1";
10
open(wwsympa,"<$dir/wwsympa/wwsympa.fcgi");
11
open(error,"<$dir/web_tt2/error.tt2");
14
if (/.*\&error_message\(\'(\w*)\'(.*)\);/) {
19
if (/.*error\.msg[ =]*\'(\w*)\'.*/) {
20
if (defined($errors{$1})) {
25
print "Missing error messages:\n\n\n";
27
while (($name,$param) = each(%errors)) {
28
# printf "%15s%s\n",$name,$param;
29
print "[% ELSIF error.msg == '$name' %]\n";
32
$param =~ /.*,.*\{\'(\w*)\'.*=>.*/;
35
print "%]*****************[%END%]\n\n";
39
open(notice,"<$dir/web_tt2/notice.tt2");
42
if (/.*\&message\(\'(\w*)\'(.*)\);/) {
47
if (/.*notice\.msg[ =]*\'(\w*)\'.*/) {
48
if (defined($notices{$1})) {
53
print "\n\n\n\nMissing notice messages:\n\n\n";
55
while (($name,$param) = each(%notices)) {
56
# printf "%15s%s\n",$name,$param;
57
print "[% ELSIF notice.msg == '$name' %]\n";
60
$param =~ /.*,.*\{\'(\w*)\'.*=>.*/;
64
print "%]*****************[%END%]\n\n";