1#! /bin/sh
2
3# Shell script to convert an Analog language file to a fwAnalog one.
4# Usage: mklangfile.us.sh {infile} [> outfile]
5# $Id: mklangfile.us.sh,v 1.4 2002/05/11 19:05:06 bb Exp $
6
7cat $1 \
8	| sed 's/request/blocked packet/g' \
9	| sed 's/virtual host/interface/g' \
10	| sed 's/directory/blocked packet/g' \
11	| sed 's/directories/blocked packets/g' \
12	| sed 's/^URL/source port/g' \
13	| sed 's/Web Server Statistics for/Block statistics of your firewall, created by/g' \
14	| sed 's/Busiest month:/Month with the most blocked packets:/g' \
15	| sed 's/Busiest week:/Week with the most blocked packets:/g' \
16	| sed 's/Busiest day:/Day with the most blocked packets:/g' \
17	| sed 's/Busiest hour:/Hour with the most blocked packets:/g' \
18	| sed 's/Busiest quarter of an hour:/Quarter-hour with the most blocked packets:/g' \
19	| sed 's/Busiest five minutes:/Five minutes with the most blocked packets:/g' \
20	| sed 's/Virtual Host/Interface/g' \
21	| sed 's/virtual host/interface/g' \
22	| sed 's/Host Report/Packet Source Host Report/g' \
23	| sed 's/Directory Report/Blocked Packet Report/g' \
24	| sed 's/Referrer Report/Source Port Report/g' \
25	| sed 's/referring URL/source port/g' \
26	| sed 's/File/Packet/g' \
27	| sed 's/Browsers/MAC Addresses/g' \
28	| sed 's/browsers/MAC addresses/g' \
29	| sed 's/Browser/MAC Address/g' \
30	| sed 's/browser/MAC address/g' \
31	| sed 's/Successful/Blocked/g' \
32	| sed 's/successful/blocked/g' \
33	| sed 's/Distinct hosts served/Distinct hosts blocked/g' \
34	| sed 's/Unwanted logfile entries/Unwanted logfile entries (because of a date range, EXCLUDE etc.)/g' \
35	| sed 's/Data transferred/Size of all dropped packets together/g' \
36	| sed 's/Average data transferred per day/Average size of dropped packets per day/g' \
37	| sed 's/#reqs/#blocks/g' \
38	| sed 's/%reqs/%blocks/g' \
39	| sed 's/Blocked blocked/Blocked/g' \
40	| sed 's/blocked blocked/blocked/g' \
41	| sed 's/User/Log Prefix/g' \
42	| sed 's/users/log prefixes/g' \
43	| sed 's/user/log prefix/g' \
44	| sed 's!^files!ports/ICMP types!g' \
45	| sed 's!^file!port/ICMP type!g' \
46	| sed 's!Request Report!Port/ICMP Type Report!g' \
47	| sed 's/Distinct files blocked packeted/Distinct blocked packets/g' \
48	| perl -pwe "s!^## This is a language file for analog!## Converted from $1 on `date` \\n## by mklangfile.us.sh (from the fwanalog distribution)\\n## More info: http://tud.at/programm/fwanalog/\\n##\\n## This is a language file for analog!"
49