summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-05 13:36:14 +0000
committerjlam <jlam>2006-06-05 13:36:14 +0000
commitd0d7c0f18b62811c945fa3712df5923fb9041e4f (patch)
treebb0dc89b8edda2649b49a39aaf263c3640125ba3 /mk/tools
parentb604a14af027ef128c2487bea05fcd8fbd73279d (diff)
downloadpkgsrc-d0d7c0f18b62811c945fa3712df5923fb9041e4f.tar.gz
Minor fix for last commit... in the case where msgstr is just the
empty string (because no translation has yet been made), it's okay to have mismatching "\n" in the msgid and msgstr texts. This should fix PR pkg/33645 by Carl Brewer.
Diffstat (limited to 'mk/tools')
-rwxr-xr-xmk/tools/msgfmt.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/mk/tools/msgfmt.sh b/mk/tools/msgfmt.sh
index 43884f0ba16..57a3e8425ea 100755
--- a/mk/tools/msgfmt.sh
+++ b/mk/tools/msgfmt.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.20 2006/06/04 23:18:38 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.21 2006/06/05 13:36:14 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -213,9 +213,7 @@ BEGIN {
while ((t > 1) && (translation[t-1] ~ /^""$/)) t--
if ((singular[s-1] ~ /\\n"$/) &&
(translation[t-1] !~ /\\n"$/)) {
- if (translation[t-1] ~ /""/)
- translation[t-1] = "\" \\n\""
- else
+ if (translation[t-1] !~ /""/)
sub("\"$", "\\n\"", translation[t-1])
}
if (t > 0) {
@@ -254,9 +252,7 @@ BEGIN {
while ((t > 1) && (translation[t-1] ~ /^""$/)) t--
if ((singular[s-1] ~ /\\n"$/) &&
(translation[t-1] !~ /\\n"$/)) {
- if (translation[t-1] ~ /""/)
- translation[t-1] = "\" \\n\""
- else
+ if (translation[t-1] !~ /""/)
sub("\"$", "\\n\"", translation[t-1])
}
if (t > 0) {
@@ -319,9 +315,7 @@ BEGIN {
while ((t > 1) && (translation[t-1] ~ /^""$/)) t--
if ((plural[p-1] ~ /\\n"$/) &&
(translation[t-1] !~ /\\n"$/)) {
- if (translation[t-1] ~ /""/)
- translation[t-1] = "\" \\n\""
- else
+ if (translation[t-1] !~ /""/)
sub("\"$", "\\n\"", translation[t-1])
}
if (t > 0) {