pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/seahorse/files Add script for munging locale ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a0b2858d8584
branches:  trunk
changeset: 549448:a0b2858d8584
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Nov 03 06:52:04 2008 +0000

description:
Add script for munging locale files.

diffstat:

 security/seahorse/files/msgfmtstrip |  18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 45ae70e73681 -r a0b2858d8584 security/seahorse/files/msgfmtstrip
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/seahorse/files/msgfmtstrip       Mon Nov 03 06:52:04 2008 +0000
@@ -0,0 +1,18 @@
+# $Id: msgfmtstrip,v 1.1 2008/11/03 06:52:04 wiz 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;
+}



Home | Main Index | Thread Index | Old Index