summaryrefslogtreecommitdiff
path: root/devel/gettext
diff options
context:
space:
mode:
authorjmmv <jmmv>2006-04-06 21:42:23 +0000
committerjmmv <jmmv>2006-04-06 21:42:23 +0000
commit80115fc28417b306637eddf65bd4d6392e4c51a3 (patch)
treee5bf2f853132df5ef74eec47d7da1ec4046e9185 /devel/gettext
parent58b750a44c70f0c65dee97988f4e74fbc5835bb7 (diff)
downloadpkgsrc-80115fc28417b306637eddf65bd4d6392e4c51a3.tar.gz
Skip blank lines after msgid so that "incorrectly formatted" po files do
not break when using this script. This should avoid having to patch some po files to "fix" them.
Diffstat (limited to 'devel/gettext')
-rw-r--r--devel/gettext/files/msgfmt.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/devel/gettext/files/msgfmt.pl b/devel/gettext/files/msgfmt.pl
index 0d5149408cf..332f851d2cd 100644
--- a/devel/gettext/files/msgfmt.pl
+++ b/devel/gettext/files/msgfmt.pl
@@ -1,11 +1,11 @@
#!@PERL@
#
-# $NetBSD: msgfmt.pl,v 1.2 2005/08/20 12:04:09 jmmv Exp $
+# $NetBSD: msgfmt.pl,v 1.3 2006/04/06 21:42:23 jmmv Exp $
#
# msgfmt.pl - Workaround uses of msgid_plural to work with implementations
# that don't support it.
#
-# Copyright (c) 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
+# Copyright (c) 2004, 2005, 2006 Julio M. Merino Vidal <jmmv@NetBSD.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -70,6 +70,8 @@ while (<INFILE>) {
if (/^msgid[ \t]+(.*)$/) {
push @msgid_singular, "$1\n";
while (<INFILE>) {
+ next if /^$/;
+
if (/^[ \t]*"/) {
push @msgid_singular, $_;
} else {