pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Drop all msgstr[N] translations besides msgst...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e5d9970eb5f7
branches: trunk
changeset: 511460:e5d9970eb5f7
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Apr 14 22:37:38 2006 +0000
description:
Drop all msgstr[N] translations besides msgstr[0] and msgstr[1] because
those translations can have no corresponding msgid anchor in the old
PO file format. This allows all of the *.po files in gnome-vfs2 to
build correctly into *.mo files.
diffstat:
mk/tools/msgfmt.sh | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r fb813d4f25bc -r e5d9970eb5f7 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh Fri Apr 14 22:23:25 2006 +0000
+++ b/mk/tools/msgfmt.sh Fri Apr 14 22:37:38 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.10 2006/04/14 22:23:25 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.11 2006/04/14 22:37:38 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -248,6 +248,19 @@
if (result < 0) break
}
+ # We drop all other "msgstr[N]" translations since the
+ # old format only supported a single translation per
+ # plural form.
+ #
+ MSGSTRN_RE = ORE "msgstr[[]([2-9]|[1-9][0-9]+)[]][ ]+"
+ if ($0 ~ MSGSTRN_RE) {
+ while (result = getline) {
+ if ($0 !~ ORE "[ ]*\"") break
+ print $0
+ }
+ if (result < 0) break
+ }
+
# Pass remaining lines verbatim
if ($0 ~ /^#/ || $0 ~ /^[ ]*$/) {
print $0
Home |
Main Index |
Thread Index |
Old Index