summaryrefslogtreecommitdiff
path: root/multimedia/gnome-media/files/msgfmtstrip
blob: 2309639b8cca02f7155d589cfd021ba474c43f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $Id: msgfmtstrip,v 1.1 2009/03/16 22:09:28 jmcneill Exp $
# Simple awk script to strip out .po entries with "msgctxt" or "#~|", so the
# resultant file can be handled by the msgfmt 0.14.4 in NetBSD 4.0
{
if (/^$/) { entry_end(); }
else if ($1 == "msgctxt" || $2 == "msgctxt") { skip = 1; }
else if ($1 == "#~|") { skip = 1; }
else { entry = entry $0 "\n" }
}

END { entry_end(); }

function entry_end() {
    if (!skip)
	print entry;
    entry = "";
    skip = 0;
}