]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgcomm must keep the header entry.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jul 2001 12:24:02 +0000 (12:24 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jul 2001 12:24:02 +0000 (12:24 +0000)
src/ChangeLog
src/msgcomm.c
tests/ChangeLog
tests/Makefile.am
tests/msgcomm-12
tests/msgcomm-13
tests/msgcomm-14
tests/msgcomm-22 [new file with mode: 0755]

index 8279689610bc87e51c28a2f37d46b91303c31d39..154fbc0a0f7ddc8a7d816d5fa21f37dc0b0fadb4 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-05  Bruno Haible  <haible@clisp.cons.org>
+
+       * msgcomm.c (is_message_selected): Keep the header entry.
+
 2001-07-01  Bruno Haible  <haible@clisp.cons.org>
 
        * po-charset.h (po_lex_charset): New declaration.
index b5b33edf1b02fe5c30d17a43244d158863c6b59c..7d223a8fa3e35e213a974fd141315284b41a6097 100644 (file)
@@ -459,8 +459,8 @@ static bool
 is_message_selected (mp)
      const message_ty *mp;
 {
-  /* FIXME: Add mp->msgid[0] == '\0' || ... here? */
-  return (mp->used > more_than && mp->used < less_than);
+  return (mp->msgid[0] == '\0') /* keep the header entry, see msgcomm-17 test */
+        || (mp->used > more_than && mp->used < less_than);
 }
 
 
index 2b6512fa819a31c6bbd80bd67e082c06e63a0a96..35716cbb1855a2a6292eaa6e0df0565bdc43f751 100644 (file)
@@ -1,3 +1,11 @@
+2001-07-05  Bruno Haible  <haible@clisp.cons.org>
+
+       * msgcomm-22: New file, based on a report by Karl Eichwalder.
+       * Makefile.am (TESTS): Add msgcomm-22.
+       * msgcomm-12: Add the first header entry to the expected output.
+       * msgcomm-13: Likewise.
+       * msgcomm-14: Likewise.
+
 2001-06-23  Bruno Haible  <haible@clisp.cons.org>
 
        * msgcomm-18: New file, from Karl Eichwalder with modifications.
index fce856decb96288670ac19bf298060d73fd28327..28ad2829a927b4a8ff5c64dbbda20fbe3e79e9fd 100644 (file)
@@ -24,7 +24,7 @@ TESTS = gettext-1 gettext-2 \
        msgcomm-1 msgcomm-2 msgcomm-3 msgcomm-4 msgcomm-5 msgcomm-6 msgcomm-7 \
        msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \
        msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 msgcomm-18 msgcomm-19 \
-       msgcomm-20 msgcomm-21 \
+       msgcomm-20 msgcomm-21 msgcomm-22 \
        msgfmt-1 msgfmt-2 msgfmt-3 msgfmt-4 msgfmt-5 \
        msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-6 \
        msgmerge-7 msgmerge-8 msgmerge-9 msgmerge-10 msgmerge-11 \
index cd58475297883053e47b5436be7812af5bd2775b..7bf3ba319eaceb1109e6aaad8ffae1ba80f45284 100755 (executable)
@@ -73,6 +73,17 @@ ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test12.out \
 
 tmpfiles="$tmpfiles mcomm-test12.ok"
 cat << EOF > mcomm-test12.ok
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU one 1.2.3\n"
+"POT-Creation-Date: 2000-12-11 20:49+0100\n"
+"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
 # unique
 msgid "2"
 msgstr ""
index 7e5871611af2fdb2c351d9596a6117e858f2ecd7..40a9ed4f3035d66ba646f8fdd61656f543cec8c6 100755 (executable)
@@ -76,6 +76,17 @@ ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test13.out \
 
 tmpfiles="$tmpfiles mcomm-test13.ok"
 cat << EOF > mcomm-test13.ok
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU one 1.2.3\n"
+"POT-Creation-Date: 2000-12-11 20:49+0100\n"
+"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
 # unique
 msgid "2"
 msgstr ""
index 296876c7a82bdb0e6b590dcb027261be52dcc6ac..1e461312f320d9e7612d27a2430d82c62ea7b3a2 100755 (executable)
@@ -71,6 +71,16 @@ ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test14.out \
 
 tmpfiles="$tmpfiles mcomm-test14.ok"
 cat << EOF > mcomm-test14.ok
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU one 1.2.3\n"
+"POT-Creation-Date: 2000-12-11 20:49+0100\n"
+"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
 EOF
 
 : ${DIFF=diff}
diff --git a/tests/msgcomm-22 b/tests/msgcomm-22
new file mode 100755 (executable)
index 0000000..f96dcc2
--- /dev/null
@@ -0,0 +1,117 @@
+#! /bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# keep header file entry, otherwise the encoding is unknown
+
+tmpfiles="mcomm-test22.in1 mcomm-test22.in2"
+cat <<EOF > mcomm-test22.in1
+# German translations for GNU gettext package.
+# Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
+# Karl Eichwalder <ke@suse.de>, 2001.
+# Ulrich Drepper <drepper@gnu.org>, 1995-1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.36\n"
+"POT-Creation-Date: 2001-05-23 23:03+0200\n"
+"PO-Revision-Date: 2001-04-11 06:44+02:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/gettext.c:140 src/msgcmp.c:140 src/msgcomm.c:279 src/msgfmt.c:270
+#: src/msgmerge.c:255 src/msgunfmt.c:170 src/ngettext.c:120 src/xgettext.c:388
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions.  There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright © %s Free Software Foundation, Inc.\n"
+"Dies ist freie Software; in den Quellen befindet sich die Lizenzbedingung.\n"
+"Es gibt KEINERLEI Garantie; nicht einmal für die TAUGLICHKEIT oder\n"
+"die VERWENDBARKEIT ZU EINEN ANGEGEBENEN ZWECK.\n"
+EOF
+
+cat <<EOF > mcomm-test22.in2
+# German translations for GNU gettext package.
+# Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
+# Karl Eichwalder <ke@suse.de>, 2001.
+# Ulrich Drepper <drepper@gnu.org>, 1995-1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.36\n"
+"POT-Creation-Date: 2001-05-23 23:03+0200\n"
+"PO-Revision-Date: 2001-04-11 06:44+02:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/obstack.c:474 lib/xmalloc.c:86 src/po.c:308 src/po.c:381 src/po.c:389
+#: src/po.c:395 src/po.c:415 src/po.c:422 src/po.c:427 src/po.c:444
+msgid "memory exhausted"
+msgstr "virtueller Speicher erschöpft"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test22.out"
+rm -f mcomm-test22.out
+
+: ${MSGCOMM=msgcomm}
+
+${MSGCOMM} --less-than=2 -o mcomm-test22.out \
+    mcomm-test22.in1 mcomm-test22.in2
+
+tmpfiles="$tmpfiles mcomm-test22.ok"
+cat << EOF > mcomm-test22.ok
+# German translations for GNU gettext package.
+# Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
+# Karl Eichwalder <ke@suse.de>, 2001.
+# Ulrich Drepper <drepper@gnu.org>, 1995-1997.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU gettext 0.10.36\n"
+"POT-Creation-Date: 2001-05-23 23:03+0200\n"
+"PO-Revision-Date: 2001-04-11 06:44+02:00\n"
+"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/gettext.c:140 src/msgcmp.c:140 src/msgcomm.c:279 src/msgfmt.c:270
+#: src/msgmerge.c:255 src/msgunfmt.c:170 src/ngettext.c:120 src/xgettext.c:388
+#, c-format, no-wrap
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions.  There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+"Copyright © %s Free Software Foundation, Inc.\n"
+"Dies ist freie Software; in den Quellen befindet sich die Lizenzbedingung.\n"
+"Es gibt KEINERLEI Garantie; nicht einmal für die TAUGLICHKEIT oder\n"
+"die VERWENDBARKEIT ZU EINEN ANGEGEBENEN ZWECK.\n"
+
+#: lib/obstack.c:474 lib/xmalloc.c:86 src/po.c:308 src/po.c:381 src/po.c:389
+#: src/po.c:395 src/po.c:415 src/po.c:422 src/po.c:427 src/po.c:444
+msgid "memory exhausted"
+msgstr "virtueller Speicher erschöpft"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test22.ok mcomm-test22.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result