* msgmerge is faster now on CPUs with multiple execution units, if compiled
with GCC 4.2 or newer.
+* msgcmp now ignores fuzzy and untranslated messages in the PO file.
+ Previously it considered fuzzy and untranslated messages the same way as
+ translated messages, which was hardly useful. The previous behaviour can
+ be obtained through the options --use-fuzzy --use-untranslated.
+
* gettextize, when invoked without --intl option, now installs only the .m4
files that are needed: gettext.m4, iconv.m4, lib-ld.m4, lib-link.m4,
lib-prefix.m4, nls.m4, po.m4, progtest.m4.
+2006-10-03 Bruno Haible <bruno@clisp.org>
+
+ * msgcmp.texi: Document --use-fuzzy and --use-untranslated options.
+
2006-10-01 Bruno Haible <bruno@clisp.org>
* gettext.texi (AM_GNU_GETTEXT): Mention the AM_GNU_GETTEXT_NEED
@opindex --multi-domain@r{, @code{msgcmp} option}
Apply @var{ref}.pot to each of the domains in @var{def}.po.
+@item --use-fuzzy
+@opindex --use-fuzzy@r{, @code{msgcmp} option}
+Consider fuzzy messages in the @var{def}.po file like translated messages.
+Note that using this option is usually wrong, because fuzzy messages are
+exactly those which have not been validated by a human translator.
+
+@item --use-untranslated
+@opindex --use-untranslated@r{, @code{msgcmp} option}
+Consider untranslated messages in the @var{def}.po file like translated
+messages. Note that using this option is usually wrong.
+
@end table
@subsection Input file syntax
+2006-10-03 Bruno Haible <bruno@clisp.org>
+
+ * msgcmp.c (include_fuzzies, include_untranslated): New variables.
+ (long_options): Add options --use-fuzzy, --use-untranslated.
+ (main): Handle them.
+ (usage): Document them.
+ (match_domain): Consider include_fuzzies and include_untranslated.
+
2006-10-02 Bruno Haible <bruno@clisp.org>
* gettext-po.h.in (LIBGETTEXTPO_VERSION): Bump version number.
/* Apply the .pot file to each of the domains in the PO file. */
static bool multi_domain_mode = false;
+/* Whether to consider fuzzy messages as translations. */
+static bool include_fuzzies = false;
+
+/* Whether to consider untranslated messages as translations. */
+static bool include_untranslated = false;
+
/* Long options. */
static const struct option long_options[] =
{
{ "multi-domain", no_argument, NULL, 'm' },
{ "properties-input", no_argument, NULL, 'P' },
{ "stringtable-input", no_argument, NULL, CHAR_MAX + 1 },
+ { "use-fuzzy", no_argument, NULL, CHAR_MAX + 2 },
+ { "use-untranslated", no_argument, NULL, CHAR_MAX + 3 },
{ "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
};
do_version = true;
break;
- case CHAR_MAX + 1: /* --stringtable-input */
+ case CHAR_MAX + 1: /* --stringtable-input */
input_syntax = syntax_stringtable;
break;
+ case CHAR_MAX + 2: /* --use-fuzzy */
+ include_fuzzies = true;
+ break;
+
+ case CHAR_MAX + 3: /* --use-untranslated */
+ include_untranslated = true;
+ break;
+
default:
usage (EXIT_FAILURE);
break;
Operation modifiers:\n"));
printf (_("\
-m, --multi-domain apply ref.pot to each of the domains in def.po\n"));
+ printf (_("\
+ --use-fuzzy consider fuzzy entries\n"));
+ printf (_("\
+ --use-untranslated consider untranslated entries\n"));
printf ("\n");
printf (_("\
Input file syntax:\n"));
/* See if it is in the other file. */
defmsg = message_list_search (defmlp, refmsg->msgctxt, refmsg->msgid);
if (defmsg)
- defmsg->used = 1;
+ {
+ if (!include_untranslated && defmsg->msgstr[0] == '\0')
+ {
+ (*nerrors)++;
+ po_gram_error_at_line (&defmsg->pos, _("\
+this message is untranslated"));
+ }
+ else if (!include_fuzzies && defmsg->is_fuzzy && !is_header (defmsg))
+ {
+ (*nerrors)++;
+ po_gram_error_at_line (&defmsg->pos, _("\
+this message needs to be reviewed by the translator"));
+ }
+ else
+ defmsg->used = 1;
+ }
else
{
/* If the message was not defined at all, try to find a very
+2006-10-03 Bruno Haible <bruno@clisp.org>
+
+ * msgmerge-18: Invoke msgcmp with options --use-fuzzy and
+ --use-untranslated.
+
2006-10-01 Bruno Haible <bruno@clisp.org>
* xgettext-perl-6: New file.
EOF
: ${MSGCMP=msgcmp}
-${MSGCMP} mm-test18.po mm-test18.pot 2>/dev/null
+${MSGCMP} --use-fuzzy --use-untranslated mm-test18.po mm-test18.pot 2>/dev/null
test $? = 1 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mm-test18.new.po"
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
: ${MSGCMP=msgcmp}
-${MSGCMP} mm-test18.new.po mm-test18.pot
+${MSGCMP} --use-fuzzy --use-untranslated mm-test18.new.po mm-test18.pot
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
rm -fr $tmpfiles