+Version 0.18.2 - July 2010
+
+* libgettextpo library:
+ - The initial msgstr of a new message is now "", not NULL.
+ - Bug fixes in the functions po_message_is_range, po_file_check_all,
+ po_message_check_all.
+\f
Version 0.18.1 - June 2010
* msggrep: A '$' anchor in a regular expression now also matches the end of
+2010-06-06 Bruno Haible <bruno@clisp.org>
+
+ Bug fixes in libgettextpo.
+ * gettext-po.c (po_message_create): Initialize msgstr with the empty
+ string, not with NULL.
+ (po_message_is_range): Assign to output parameters correctly.
+ (po_file_check_all, po_message_check_all): Have check_message_list
+ ignore untranslated and fuzzy messages.
+
2010-06-06 Bruno Haible <bruno@clisp.org>
Avoid link error in programs that use libgettextpo.
/* Public API for GNU gettext PO files.
- Copyright (C) 2003-2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
{
lex_pos_ty pos = { NULL, 0 };
- return (po_message_t) message_alloc (NULL, NULL, NULL, NULL, 0, &pos);
+ return (po_message_t) message_alloc (NULL, NULL, NULL, xstrdup (""), 1, &pos);
}
if (has_range_p (mp->range))
{
*minp = mp->range.min;
- *minp = mp->range.max;
+ *maxp = mp->range.max;
return 1;
}
else
mdlp = file->mdlp;
for (k = 0; k < mdlp->nitems; k++)
- check_message_list (mdlp->item[k]->messages, 1, 1, 1, 0, 0, 0);
+ check_message_list (mdlp->item[k]->messages, 1, 1, 1, 1, 1, 0, 0, 0);
/* Restore error handler. */
po_xerror = textmode_xerror;
if (mp != header)
message_list_append (&ml, mp);
- check_message_list (&ml, 1, 1, 1, 0, 0, 0);
+ check_message_list (&ml, 1, 1, 1, 1, 1, 0, 0, 0);
}
}
+2010-06-06 Bruno Haible <bruno@clisp.org>
+
+ Bug fixes in libgettextpo.
+ * msgl-check.h (check_message_list): Add ignore_untranslated_messages,
+ ignore_fuzzy_messages arguments.
+ * msgl-check.c (check_plural, check_message_list): Likewise.
+ * msgfmt.c (main): Update.
+
2010-06-04 Bruno Haible <bruno@clisp.org>
* gettext-0.18.1 released.
for (domain = domain_list; domain != NULL; domain = domain->next)
nerrors +=
check_message_list (domain->mlp,
+ /* Untranslated and fuzzy messages have already
+ been dealt with during parsing, see below in
+ msgfmt_frob_new_message. */
+ 0, 0,
1, check_format_strings, check_header,
check_compatibility,
check_accelerators, accelerator_char);
/* Checking of messages in PO files.
- Copyright (C) 1995-1998, 2000-2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2008, 2010 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
This program is free software: you can redistribute it and/or modify
If no errors, returns in *DISTRIBUTION information about the plural_eval
values distribution. */
static int
-check_plural (message_list_ty *mlp, struct plural_distribution *distributionp)
+check_plural (message_list_ty *mlp,
+ int ignore_untranslated_messages,
+ int ignore_fuzzy_messages,
+ struct plural_distribution *distributionp)
{
int seen_errors = 0;
const message_ty *has_plural;
{
message_ty *mp = mlp->item[j];
- if (!mp->obsolete && mp->msgid_plural != NULL)
+ if (!mp->obsolete
+ && !(ignore_untranslated_messages && mp->msgstr[0] == '\0')
+ && !(ignore_fuzzy_messages && (mp->is_fuzzy && !is_header (mp)))
+ && mp->msgid_plural != NULL)
{
const char *p;
const char *p_end;
Return the number of errors that were seen. */
int
check_message_list (message_list_ty *mlp,
+ int ignore_untranslated_messages,
+ int ignore_fuzzy_messages,
int check_newlines,
int check_format_strings,
int check_header,
distribution.histogram = NULL;
if (check_header)
- seen_errors += check_plural (mlp, &distribution);
+ seen_errors += check_plural (mlp, ignore_untranslated_messages,
+ ignore_fuzzy_messages, &distribution);
for (j = 0; j < mlp->nitems; j++)
{
message_ty *mp = mlp->item[j];
- if (!mp->obsolete)
+ if (!mp->obsolete
+ && !(ignore_untranslated_messages && mp->msgstr[0] == '\0')
+ && !(ignore_fuzzy_messages && (mp->is_fuzzy && !is_header (mp))))
seen_errors += check_message (mp, &mp->pos,
check_newlines,
check_format_strings,
/* Checking of messages in PO files.
- Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
/* Perform all checks on a message list.
Return the number of errors that were seen. */
extern int check_message_list (message_list_ty *mlp,
+ int ignore_untranslated_messages,
+ int ignore_fuzzy_messages,
int check_newlines,
int check_format_strings,
int check_header,