/* xgettext PO, JavaProperties, and NXStringTable backends.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014, 2018, 2020, 2023 Free Software Foundation, Inc.
+ Copyright (C) 1995-2024 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
char *prev_msgid_plural,
bool force_fuzzy, bool obsolete)
{
- /* See whether we shall exclude this message. */
- if (exclude != NULL && message_list_search (exclude, msgctxt, msgid) != NULL)
- goto discard;
-
/* If the msgid is the empty string, it is the old header. Throw it
away, we have constructed a new one. Only remember its charset.
But if no new one was constructed, keep the old header. This is useful
return;
}
+ /* See whether we shall exclude this message. */
+ if (exclude != NULL && message_list_search (exclude, msgctxt, msgid) != NULL)
+ goto discard;
+
/* Invoke superclass method. */
default_add_message (this, msgctxt, msgid, msgid_pos, msgid_plural,
msgstr, msgstr_len, msgstr_pos,
xgettext-php-5 \
xgettext-php-stackovfl-1 xgettext-php-stackovfl-2 \
xgettext-php-stackovfl-3 xgettext-php-stackovfl-4 \
- xgettext-po-1 xgettext-po-2 xgettext-po-3 xgettext-po-4 \
+ xgettext-po-1 xgettext-po-2 xgettext-po-3 xgettext-po-4 xgettext-po-5 \
xgettext-properties-1 xgettext-properties-2 xgettext-properties-3 \
xgettext-properties-4 \
xgettext-rst-1 xgettext-rst-2 \
--- /dev/null
+#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test PO extractor with non-ASCII input file with header entry and
+# --exclude-file option.
+
+cat <<\EOF > xg-po-5.exclusions
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "no"
+msgstr ""
+EOF
+
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --no-location -d xg-po-5.tmp --exclude-file xg-po-5.exclusions \
+ "$wabs_srcdir"/testdata/xg-po-3.po \
+ || Exit 1
+func_filter_POT_Creation_Date xg-po-5.tmp.po xg-po-5.pot
+
+cat <<\EOF > xg-po-5.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "ΓΌ"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-po-5.ok xg-po-5.pot || Exit 1
+
+Exit 0