+2001-12-12 Bruno Haible <bruno@clisp.org>
+
+ * xgettext.texi: Document option --copyright-holder.
+
2001-12-17 Bruno Haible <bruno@clisp.org>
* msggrep.texi: Document that --location arguments may be wildcards.
two invocations of @code{xgettext} on the same files with the same
options at different times are guaranteed to produce the same results.
+@item --copyright-holder=@var{string}
+Set the copyright holder in the output. Translators are expected to transfer
+the copyright for their translations, so that package maintainers can
+distribute them without legal risk. If @var{string} is empty, the output
+files are marked as being in the public domain; in this case, the translators
+are expected to disclaim their copyright, again so that package maintainers
+can distribute them without legal risk.
+
+The default value for @var{string} is the Free Software Foundation, Inc.
+This is recommended also for packages outside the GNU project, because the
+FSF is a well trusted organization.
+
@item --foreign-user
-Omit FSF copyright in output. This can be useful for translators
-outside the GNU project.
+Omit FSF copyright in output. This option is equivalent to
+@samp{--copyright-holder=''}. It can be useful for packages outside the GNU
+project that want their translations to be in the public domain.
@item -m [@var{string}]
@itemx --msgstr-prefix[=@var{string}]
+2001-12-12 Bruno Haible <bruno@clisp.org>
+
+ * gettext.m4 (AM_PO_SUBDIRS): Reject xgettext versions that don't
+ support the --copyright-holder option.
+
2001-12-17 Bruno Haible <bruno@clisp.org>
* fnmatch.m4: New file, inspired by autoconf-2.13 and autoconf-2.52.
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- dnl Search for GNU xgettext in the PATH.
+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1], :)
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1; then
: ;
else
AC_MSG_RESULT(
+2001-12-12 Bruno Haible <bruno@clisp.org>
+
+ * Makevars (COPYRIGHT_HOLDER): New variable.
+ * Makefile.in.in ($(DOMAIN).pot): Pass --copyright-holder option to
+ xgettext.
+
2001-12-18 Bruno Haible <bruno@clisp.org>
* sl.po: Update from
$(srcdir)/$(DOMAIN).pot: $(POTFILES) $(srcdir)/POTFILES.in
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
- --files-from=$(srcdir)/POTFILES.in \
+ --files-from=$(srcdir)/POTFILES.in
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
&& test ! -f $(DOMAIN).po \
|| ( rm -f $(srcdir)/$(DOMAIN).pot \
&& mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot )
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Translators are expected to transfer the copyright
+# for their translations to this person or entity. The empty string stands
+# for the public domain; in this case the translators are expected to
+# disclaim their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+2001-12-12 Bruno Haible <bruno@clisp.org>
+
+ * xgettext.c: Include <limits.h>.
+ (copyright_holder): New variable.
+ (foreign_user): Remove variable.
+ (long_options): Add --copyright-holder option.
+ (main): Implement --copyright-holder option.
+ (usage): Document --copyright-holder option.
+ (construct_header): Use the copyright_holder variable. If it is
+ empty, add a "public domain" comment.
+
2001-12-17 Bruno Haible <bruno@clisp.org>
* msggrep.c: Include <fnmatch.h>.
#include <stdlib.h>
#include <stdbool.h>
#include <locale.h>
+#include <limits.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
/* Force output of PO file even if empty. */
static int force_po;
-/* If nonzero a non GNU related user wants to use this. Omit the FSF
- copyright in the output. */
-static int foreign_user;
+/* Copyright holder of the output file and the translations. */
+static const char *copyright_holder = "THE PACKAGE'S COPYRIGHT HOLDER";
/* String used as prefix for msgstr. */
static const char *msgstr_prefix;
{ "add-comments", optional_argument, NULL, 'c' },
{ "add-location", no_argument, &line_comment, 1 },
{ "c++", no_argument, NULL, 'C' },
+ { "copyright-holder", required_argument, NULL, CHAR_MAX + 1 },
{ "debug", no_argument, &do_debug, 1 },
{ "default-domain", required_argument, NULL, 'd' },
{ "directory", required_argument, NULL, 'D' },
{ "extract-all", no_argument, NULL, 'a' },
{ "files-from", required_argument, NULL, 'f' },
{ "force-po", no_argument, &force_po, 1 },
- { "foreign-user", no_argument, &foreign_user, 1 },
+ { "foreign-user", no_argument, NULL, CHAR_MAX + 2 },
{ "help", no_argument, NULL, 'h' },
{ "indent", no_argument, NULL, 'i' },
{ "join-existing", no_argument, NULL, 'j' },
case 'x':
read_exclusion_file (optarg);
break;
+ case CHAR_MAX + 1: /* --copyright-holder */
+ copyright_holder = optarg;
+ break;
+ case CHAR_MAX + 2: /* --foreign-user */
+ copyright_holder = "";
+ break;
default:
usage (EXIT_FAILURE);
/* NOTREACHED */
-s, --sort-output generate sorted output\n\
-F, --sort-by-file sort output by file location\n\
--omit-header don't write header with `msgid \"\"' entry\n\
+ --copyright-holder=STRING set copyright holder in output\n\
--foreign-user omit FSF copyright in output for foreign user\n\
-m, --msgstr-prefix[=STRING] use STRING or \"\" as prefix for msgstr entries\n\
-M, --msgstr-suffix[=STRING] use STRING or \"\" as suffix for msgstr entries\n\
mp = message_alloc ("", NULL, msgstr, strlen (msgstr) + 1, &pos);
- if (foreign_user)
- message_comment_append (mp, "\
+ message_comment_append (mp,
+ copyright_holder[0] != '\0'
+ ? xasprintf ("\
SOME DESCRIPTIVE TITLE.\n\
-FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n");
- else
- message_comment_append (mp, "\
+Copyright (C) YEAR %s\n\
+This file is distributed under the same license as the PACKAGE package.
+FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n",
+ copyright_holder)
+ : "\
SOME DESCRIPTIVE TITLE.\n\
-Copyright (C) YEAR Free Software Foundation, Inc.\n\
+This file is put in the public domain.\n\
FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n");
mp->is_fuzzy = true;
+2001-12-15 Bruno Haible <bruno@clisp.org>
+
+ * xgettext-14: Change expected output.
+
2001-12-18 Bruno Haible <bruno@clisp.org>
* msgfilter-1: Avoid failure on Solaris, due to broken 'fold' program.
tmpfiles="$tmpfiles xg-test14.ok"
cat <<EOF > xg-test14.ok
# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy