summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2006-04-06 21:42:23 +0000
committerjmmv <jmmv@pkgsrc.org>2006-04-06 21:42:23 +0000
commit350bfb7e781b08e1e3af6f2c5a8d84bcc32dacc1 (patch)
treee5bf2f853132df5ef74eec47d7da1ec4046e9185 /devel
parenteb404598fa2e8539aa1fd83a62b21b819516c09a (diff)
downloadpkgsrc-350bfb7e781b08e1e3af6f2c5a8d84bcc32dacc1.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')
-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 {