pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Now that I understand why we strip "#~" from ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b1055f81a6e8
branches: trunk
changeset: 511435:b1055f81a6e8
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Apr 14 14:06:54 2006 +0000
description:
Now that I understand why we strip "#~" from the head of lines, strip
it consistently whenever we read a new line of input throughout the
script. Note that this was actually broken in the original msgfmt.pl
script as well.
diffstat:
mk/tools/msgfmt.sh | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (72 lines):
diff -r 564e4c041883 -r b1055f81a6e8 mk/tools/msgfmt.sh
--- a/mk/tools/msgfmt.sh Fri Apr 14 13:51:06 2006 +0000
+++ b/mk/tools/msgfmt.sh Fri Apr 14 14:06:54 2006 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: msgfmt.sh,v 1.5 2006/04/14 13:49:17 jlam Exp $
+# $NetBSD: msgfmt.sh,v 1.6 2006/04/14 14:06:54 jlam Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -113,9 +113,10 @@
# Treat "obsolete" messages identically with non-"obsolete"
# ones so that we do not need to specially handle lines
- # starting with "#~".
+ # starting with "#~". We run this below whenever we read a
+ # new line of input.
#
- sub("^#~", "")
+ sub("^#~[ ]*", "")
# Buffer any "msgid" statements into the singular array.
if ($0 ~ /^msgid[ ]+/) {
@@ -123,6 +124,7 @@
singular[s++] = $0
while (getline) {
if ($0 ~ /^$/) continue
+ sub("^#~[ ]*", "")
if ($0 ~ /^[ ]*"/)
singular[s++] = $0
else
@@ -135,6 +137,7 @@
sub("^msgid_plural[ ]+", "");
plural[p++] = $0
while (getline) {
+ sub("^#~[ ]*", "")
if ($0 ~ /^[ ]*"/)
plural[p++] = $0
else
@@ -154,6 +157,7 @@
}
print "msgstr " $0
while (getline) {
+ sub("^#~[ ]*", "")
if ($0 ~ /^[ ]*"/)
print $0
else
@@ -173,6 +177,7 @@
}
print "msgstr " $0
while (getline) {
+ sub("^#~[ ]*", "")
if ($0 ~ /^[ ]*"/)
print $0
else
@@ -202,6 +207,7 @@
}
if (equal == 1) {
while (getline) {
+ sub("^#~[ ]*", "")
if ($0 !~ /^[ ]*"/) break
}
s = 0; p = 0
@@ -215,6 +221,7 @@
}
print "msgstr " $0
while (getline) {
+ sub("^#~[ ]*", "")
if ($0 ~ /^[ ]*"/)
print $0
else
Home |
Main Index |
Thread Index |
Old Index