]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Improve msgfmt error message about format directive mismatches in msgstr[i].
authorBruno Haible <bruno@clisp.org>
Sat, 6 Jun 2009 10:44:35 +0000 (10:44 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:16:07 +0000 (12:16 +0200)
25 files changed:
gettext-tools/src/ChangeLog
gettext-tools/src/format-awk.c
gettext-tools/src/format-boost.c
gettext-tools/src/format-c.c
gettext-tools/src/format-csharp.c
gettext-tools/src/format-elisp.c
gettext-tools/src/format-gcc-internal.c
gettext-tools/src/format-gfc-internal.c
gettext-tools/src/format-java.c
gettext-tools/src/format-kde.c
gettext-tools/src/format-librep.c
gettext-tools/src/format-lisp.c
gettext-tools/src/format-pascal.c
gettext-tools/src/format-perl-brace.c
gettext-tools/src/format-perl.c
gettext-tools/src/format-php.c
gettext-tools/src/format-python.c
gettext-tools/src/format-qt-plural.c
gettext-tools/src/format-qt.c
gettext-tools/src/format-scheme.c
gettext-tools/src/format-sh.c
gettext-tools/src/format-tcl.c
gettext-tools/src/format-ycp.c
gettext-tools/src/format.c
gettext-tools/src/format.h

index 6a8f7ff730440c7e2d4590ae7ff3212acd28c4eb..22b8b4a0ef9083ad1f1f0625ac1046bb6a6603a6 100644 (file)
@@ -1,3 +1,34 @@
+2009-05-29  Bruno Haible  <bruno@clisp.org>
+
+       Improve msgfmt error message about format directive mismatches
+       in msgstr[i].
+       * format.h (struct formatstring_parser): Add pretty_msgid argument to
+       'check' member.
+       * format-awk.c (format_check): Add pretty_msgid argument.
+       * format-boost.c (format_check): Likewise.
+       * format-c.c (format_check): Likewise.
+       * format-csharp.c (format_check): Likewise.
+       * format-elisp.c (format_check): Likewise.
+       * format-gcc-internal.c (format_check): Likewise.
+       * format-gfc-internal.c (format_check): Likewise.
+       * format-java.c (format_check): Likewise.
+       * format-kde.c (format_check): Likewise.
+       * format-librep.c (format_check): Likewise.
+       * format-lisp.c (format_check): Likewise.
+       * format-pascal.c (format_check): Likewise.
+       * format-perl-brace.c (format_check): Likewise.
+       * format-perl.c (format_check): Likewise.
+       * format-php.c (format_check): Likewise.
+       * format-python.c (format_check): Likewise.
+       * format-qt.c (format_check): Likewise.
+       * format-qt-plural.c (format_check): Likewise.
+       * format-scheme.c (format_check): Likewise.
+       * format-sh.c (format_check): Likewise.
+       * format-tcl.c (format_check): Likewise.
+       * format-ycp.c (format_check): Likewise.
+       * format.c (check_msgid_msgstr_format_i): Pass either "msgid" or
+       "msgid_plural" as pretty_msgid argument.
+
 2009-05-23  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (libgettextsrc_la_LINK, msgattrib_LINK, msgcat_LINK,
index 10796e71a0d71315e60a85b665c1b806033b9d3d..e931bea639861570c2fac930b74bfc9db3144c87 100644 (file)
@@ -1,5 +1,5 @@
 /* awk format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
    This program is free software: you can redistribute it and/or modify
@@ -481,7 +481,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -506,8 +506,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -536,8 +537,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index b4696ca87ce7780eccc8d170d45aa197b1819e08..b24d7f6e86e7f24801176adf0f67c01673a7db19 100644 (file)
@@ -1,5 +1,5 @@
 /* Boost format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -589,7 +589,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -614,8 +614,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -644,8 +645,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index 2f1b820f56cf1828aa5852f3be19664fbc994cc7..025952700a844d22037a79e6ebbe5a3c1c6a5e7e 100644 (file)
@@ -1,5 +1,5 @@
 /* C format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -885,7 +885,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -898,8 +898,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       : spec1->unnumbered_arg_count < spec2->unnumbered_arg_count)
     {
       if (error_logger)
-       error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),
-                     pretty_msgstr);
+       error_logger (_("number of format specifications in '%s' and '%s' does not match"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
   else
@@ -907,8 +907,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (spec1->unnumbered[i].type != spec2->unnumbered[i].type)
        {
          if (error_logger)
-           error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                         pretty_msgstr, i + 1);
+           error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                         pretty_msgid, pretty_msgstr, i + 1);
          err = true;
        }
 
index aecde3440ae8082ad5742ad2a7d9f63b5cb6ae13..b054aa622758e22627e93d1fa0fa3902c3a03c13 100644 (file)
@@ -1,5 +1,5 @@
 /* C# format strings.
-   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -191,7 +191,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -203,8 +203,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       : spec1->numbered_arg_count < spec2->numbered_arg_count)
     {
       if (error_logger)
-       error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),
-                     pretty_msgstr);
+       error_logger (_("number of format specifications in '%s' and '%s' does not match"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
 
index 737c77e8b17754bae80da7ab05899965abe4fd66..c6f2f1efccabbe18b6f3c1f66d8c800a79f69db2 100644 (file)
@@ -1,5 +1,5 @@
 /* Emacs Lisp format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
    This program is free software: you can redistribute it and/or modify
@@ -320,7 +320,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -345,8 +345,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -375,8 +376,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index 254929b8560117619a69a830fb8eb47addb1aa6d..15510ba81d63905a1ee68f3dfe6650a2b001913c 100644 (file)
@@ -1,5 +1,5 @@
 /* GCC internal format strings.
-   Copyright (C) 2003-2008 Free Software Foundation, Inc.
+   Copyright (C) 2003-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -599,7 +599,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -624,8 +624,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -654,8 +655,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
@@ -672,11 +674,11 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (error_logger)
        {
          if (spec1->uses_err_no)
-           error_logger (_("'msgid' uses %%m but '%s' doesn't"),
-                         pretty_msgstr);
+           error_logger (_("'%s' uses %%m but '%s' doesn't"),
+                         pretty_msgid, pretty_msgstr);
          else
-           error_logger (_("'msgid' does not use %%m but '%s' uses %%m"),
-                         pretty_msgstr);
+           error_logger (_("'%s' does not use %%m but '%s' uses %%m"),
+                         pretty_msgid, pretty_msgstr);
        }
       err = true;
     }
index 2987e3e787fb14fab798535403b76b2657f87946..ebe9ddef452ed9dd9c7612bd5d6af76b352efd89 100644 (file)
@@ -347,7 +347,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -360,8 +360,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       : spec1->unnumbered_arg_count < spec2->unnumbered_arg_count)
     {
       if (error_logger)
-       error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),
-                     pretty_msgstr);
+       error_logger (_("number of format specifications in '%s' and '%s' does not match"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
   else
@@ -369,8 +369,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (spec1->unnumbered[i].type != spec2->unnumbered[i].type)
        {
          if (error_logger)
-           error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                         pretty_msgstr, i + 1);
+           error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                         pretty_msgid, pretty_msgstr, i + 1);
          err = true;
        }
 
@@ -380,11 +380,11 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (error_logger)
        {
          if (spec1->uses_currentloc)
-           error_logger (_("'msgid' uses %%C but '%s' doesn't"),
-                         pretty_msgstr);
+           error_logger (_("'%s' uses %%C but '%s' doesn't"),
+                         pretty_msgid, pretty_msgstr);
          else
-           error_logger (_("'msgid' does not use %%C but '%s' uses %%C"),
-                         pretty_msgstr);
+           error_logger (_("'%s' does not use %%C but '%s' uses %%C"),
+                         pretty_msgid, pretty_msgstr);
        }
       err = true;
     }
index 02afdbaa012a6ebc177df7c9916b33e598100097..dfc757ecdceae26722c37feeab6973bd63409dbb 100644 (file)
@@ -1,5 +1,5 @@
 /* Java format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -717,7 +717,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -742,8 +742,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument {%u}, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument {%u}, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -772,8 +773,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument {%u} are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument {%u} are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index d696e6339e88ad851be4f01c5a35c7ec4cf033bd..f08576c8903e57f82fa6beaeea080f374d913a96 100644 (file)
@@ -1,5 +1,5 @@
 /* KDE format strings.
-   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software: you can redistribute it and/or modify
@@ -194,7 +194,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -220,8 +220,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -239,7 +240,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                {
                  if (error_logger)
                    error_logger (_("a format specification for arguments %u and %u doesn't exist in '%s', only one argument may be ignored"),
-                                 missing, spec1->numbered[i].number, pretty_msgstr);
+                                 missing, spec1->numbered[i].number,
+                                 pretty_msgstr);
                  err = true;
                  break;
                }
index 5d0009e06c1d3b714b1c79a3c1ed18fc010fdbb0..667a65324a98aad7304c4bf92c2f253a10f57504 100644 (file)
@@ -1,5 +1,5 @@
 /* librep format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -284,7 +284,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -309,8 +309,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -339,8 +340,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index 840db83b0f2763567cff79c4d006553bfa4080f2..cf155edc397dcdcc7c1cd239c1298b913cdfaa0a 100644 (file)
@@ -1,5 +1,5 @@
 /* Lisp format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -3460,7 +3460,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -3471,8 +3471,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (!equal_list (spec1->list, spec2->list))
        {
          if (error_logger)
-           error_logger (_("format specifications in 'msgid' and '%s' are not equivalent"),
-                         pretty_msgstr);
+           error_logger (_("format specifications in '%s' and '%s' are not equivalent"),
+                         pretty_msgid, pretty_msgstr);
          err = true;
        }
     }
@@ -3487,8 +3487,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                equal_list (intersection, spec2->list))))
        {
          if (error_logger)
-           error_logger (_("format specifications in '%s' are not a subset of those in 'msgid'"),
-                         pretty_msgstr);
+           error_logger (_("format specifications in '%s' are not a subset of those in '%s'"),
+                         pretty_msgstr, pretty_msgid);
          err = true;
        }
     }
index f0178fac0888c5ad8b0a3457a445778b6771cbb0..be5e3cc5eca26480efa5be8af13d33bba3cbc153 100644 (file)
@@ -1,5 +1,5 @@
 /* Object Pascal format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -373,7 +373,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -398,8 +398,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -428,8 +429,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index df2e0c011e79f3147fc30eeb4f93f26083bed12d..65f9d20ffbc2a64b51d98f040378426edac08811 100644 (file)
@@ -167,7 +167,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
index bd2cf7581fdac3949042b1df78bbafa289500bc5..7a7dbc37031d67023df2c9226735e23908d699a1 100644 (file)
@@ -1,5 +1,5 @@
 /* Perl format strings.
-   Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -556,7 +556,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -581,8 +581,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -611,8 +612,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index ef3d7885f89d2bfd424408051a58f3c59bc34b8f..19735cb2cd5bf9adc542c0089d46ecaf12de9240 100644 (file)
@@ -1,5 +1,5 @@
 /* PHP format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
    This program is free software: you can redistribute it and/or modify
@@ -322,7 +322,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -347,8 +347,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -377,8 +378,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index 889f732653a038f15fdb8e78276cf1da7143930d..55dbf1648b8ae330aeeef705bf1b5ce1f7ca7b8b 100644 (file)
@@ -1,5 +1,5 @@
 /* Python format strings.
-   Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -418,7 +418,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -427,15 +427,15 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
   if (spec1->named_arg_count > 0 && spec2->unnamed_arg_count > 0)
     {
       if (error_logger)
-       error_logger (_("format specifications in 'msgid' expect a mapping, those in '%s' expect a tuple"),
-                     pretty_msgstr);
+       error_logger (_("format specifications in '%s' expect a mapping, those in '%s' expect a tuple"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
   else if (spec1->unnamed_arg_count > 0 && spec2->named_arg_count > 0)
     {
       if (error_logger)
-       error_logger (_("format specifications in 'msgid' expect a tuple, those in '%s' expect a mapping"),
-                     pretty_msgstr);
+       error_logger (_("format specifications in '%s' expect a tuple, those in '%s' expect a mapping"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
   else
@@ -457,8 +457,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              if (cmp > 0)
                {
                  if (error_logger)
-                   error_logger (_("a format specification for argument '%s', as in '%s', doesn't exist in 'msgid'"),
-                                 spec2->named[j].name, pretty_msgstr);
+                   error_logger (_("a format specification for argument '%s', as in '%s', doesn't exist in '%s'"),
+                                 spec2->named[j].name, pretty_msgstr,
+                                 pretty_msgid);
                  err = true;
                  break;
                }
@@ -490,8 +491,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                                  || spec2->named[j].type == FAT_ANY))))
                      {
                        if (error_logger)
-                         error_logger (_("format specifications in 'msgid' and '%s' for argument '%s' are not the same"),
-                                       pretty_msgstr, spec2->named[j].name);
+                         error_logger (_("format specifications in '%s' and '%s' for argument '%s' are not the same"),
+                                       pretty_msgid, pretty_msgstr,
+                                       spec2->named[j].name);
                        err = true;
                        break;
                      }
@@ -510,8 +512,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (spec1->unnamed_arg_count != spec2->unnamed_arg_count)
            {
              if (error_logger)
-               error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),
-                             pretty_msgstr);
+               error_logger (_("number of format specifications in '%s' and '%s' does not match"),
+                             pretty_msgid, pretty_msgstr);
              err = true;
            }
          else
@@ -522,8 +524,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                            || spec2->unnamed[i].type == FAT_ANY))))
                {
                  if (error_logger)
-                   error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                 pretty_msgstr, i + 1);
+                   error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                 pretty_msgid, pretty_msgstr, i + 1);
                  err = true;
                }
        }
index 8b225fdda914a583bc3e6496149b27cd934bd554..b224253ec238d6198d983d837b2ae64ca1d1a470 100644 (file)
@@ -96,7 +96,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -107,8 +107,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       || (equality && spec1->directives > 0 && spec2->directives == 0))
     {
       if (error_logger)
-       error_logger (_("number of format specifications in 'msgid' and '%s' does not match"),
-                     pretty_msgstr);
+       error_logger (_("number of format specifications in '%s' and '%s' does not match"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
 
index 057348981893512ddc36957346d9fdd00e3b2638..2296d86cd286831298cbc395a8979f85f0c200a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Qt format strings.
-   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -139,7 +139,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -149,8 +149,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
   if (spec1->simple && !spec2->simple)
     {
       if (error_logger)
-       error_logger (_("'msgid' is a simple format string, but '%s' is not: it contains an 'L' flag or a double-digit argument number"),
-                     pretty_msgstr);
+       error_logger (_("'%s' is a simple format string, but '%s' is not: it contains an 'L' flag or a double-digit argument number"),
+                     pretty_msgid, pretty_msgstr);
       err = true;
     }
 
@@ -165,10 +165,14 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
        if (arg_used1 != arg_used2)
          {
            if (error_logger)
-             error_logger (arg_used1
-                           ? _("a format specification for argument %u doesn't exist in '%s'")
-                           : _("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                           i, pretty_msgstr);
+             {
+               if (arg_used1)
+                 error_logger (_("a format specification for argument %u doesn't exist in '%s'"),
+                               i, pretty_msgstr);
+               else
+                 error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                               i, pretty_msgstr, pretty_msgid);
+             }
            err = true;
            break;
          }
index 0f805736b5cc1e5e4418654f48fef4ddfb0e0a1c..77ec7fb3aa3af590423b046447d1df97d55f568f 100644 (file)
@@ -1,5 +1,5 @@
 /* Scheme format strings.
-   Copyright (C) 2001-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -3383,7 +3383,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -3394,8 +3394,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (!equal_list (spec1->list, spec2->list))
        {
          if (error_logger)
-           error_logger (_("format specifications in 'msgid' and '%s' are not equivalent"),
-                         pretty_msgstr);
+           error_logger (_("format specifications in '%s' and '%s' are not equivalent"),
+                         pretty_msgid, pretty_msgstr);
          err = true;
        }
     }
@@ -3410,8 +3410,8 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                equal_list (intersection, spec2->list))))
        {
          if (error_logger)
-           error_logger (_("format specifications in '%s' are not a subset of those in 'msgid'"),
-                         pretty_msgstr);
+           error_logger (_("format specifications in '%s' are not a subset of those in '%s'"),
+                         pretty_msgstr, pretty_msgid);
          err = true;
        }
     }
index 991a1fe947168aea39a3b86eac8c170c0522e6c7..5a7494ec46fe27599fef53621384564b63228410 100644 (file)
@@ -1,5 +1,5 @@
 /* Shell format strings.
-   Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -271,7 +271,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -294,8 +294,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument '%s', as in '%s', doesn't exist in 'msgid'"),
-                             spec2->named[j].name, pretty_msgstr);
+               error_logger (_("a format specification for argument '%s', as in '%s', doesn't exist in '%s'"),
+                             spec2->named[j].name, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
index c7aecc12205a38d6c4d68c47783f43255666e342..6549cdf0832b23a6d668b24a52db0ddc1a607753 100644 (file)
@@ -1,5 +1,5 @@
 /* Tcl format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
    This program is free software: you can redistribute it and/or modify
@@ -362,7 +362,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -387,8 +387,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
          if (cmp > 0)
            {
              if (error_logger)
-               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                             spec2->numbered[j].number, pretty_msgstr);
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             spec2->numbered[j].number, pretty_msgstr,
+                             pretty_msgid);
              err = true;
              break;
            }
@@ -417,8 +418,9 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
                if (spec1->numbered[i].type != spec2->numbered[j].type)
                  {
                    if (error_logger)
-                     error_logger (_("format specifications in 'msgid' and '%s' for argument %u are not the same"),
-                                   pretty_msgstr, spec2->numbered[j].number);
+                     error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),
+                                   pretty_msgid, pretty_msgstr,
+                                   spec2->numbered[j].number);
                    err = true;
                    break;
                  }
index e30c15e475d67ea32ffb37cd1931701c55277a7c..193f216ff746a4d73508140c225047600f7abfcd 100644 (file)
@@ -1,5 +1,5 @@
 /* YCP and Smalltalk format strings.
-   Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -124,7 +124,7 @@ format_get_number_of_directives (void *descr)
 static bool
 format_check (void *msgid_descr, void *msgstr_descr, bool equality,
              formatstring_error_logger_t error_logger,
-             const char *pretty_msgstr)
+             const char *pretty_msgid, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -139,10 +139,14 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
       if (equality ? (arg_used1 != arg_used2) : (!arg_used1 && arg_used2))
        {
          if (error_logger)
-           error_logger (arg_used1
-                         ? _("a format specification for argument %u doesn't exist in '%s'")
-                         : _("a format specification for argument %u, as in '%s', doesn't exist in 'msgid'"),
-                         i + 1, pretty_msgstr);
+           {
+             if (arg_used1)
+               error_logger (_("a format specification for argument %u doesn't exist in '%s'"),
+                             i + 1, pretty_msgstr);
+             else
+               error_logger (_("a format specification for argument %u, as in '%s', doesn't exist in '%s'"),
+                             i + 1, pretty_msgstr, pretty_msgid);
+           }
          err = true;
          break;
        }
index 68f5fe8ab395e0a232f26cb943f881c0f3311083..846ae6479189940c5f1c1cdc13e3e8c2f9c5f0c0 100644 (file)
@@ -91,6 +91,8 @@ check_msgid_msgstr_format_i (const char *msgid, const char *msgid_plural,
 
   if (msgid_descr != NULL)
     {
+      const char *pretty_msgid =
+       (msgid_plural != NULL ? "msgid_plural" : "msgid");
       char buf[18+1];
       const char *pretty_msgstr = "msgstr";
       bool has_plural_translations = (strlen (msgstr) + 1 < msgstr_len);
@@ -136,7 +138,7 @@ check_msgid_msgstr_format_i (const char *msgid, const char *msgid_plural,
 
              if (parser->check (msgid_descr, msgstr_descr,
                                 strict_checking,
-                                error_logger, pretty_msgstr))
+                                error_logger, pretty_msgid, pretty_msgstr))
                seen_errors++;
 
              parser->free (msgstr_descr);
@@ -144,9 +146,9 @@ check_msgid_msgstr_format_i (const char *msgid, const char *msgid_plural,
          else
            {
              error_logger (_("\
-'%s' is not a valid %s format string, unlike 'msgid'. Reason: %s"),
+'%s' is not a valid %s format string, unlike '%s'. Reason: %s"),
                            pretty_msgstr, format_language_pretty[i],
-                           invalid_reason);
+                           pretty_msgid, invalid_reason);
              seen_errors++;
              free (invalid_reason);
            }
index 136c9639868d6246f328d0469a4ec5ba304a9f6b..ac6ca2e5572f68589f089c2ed6adbc2a84281c42 100644 (file)
@@ -91,7 +91,7 @@ struct formatstring_parser
      msgstr_descr may omit some of the arguments of msgid_descr).
      If not, signal an error using error_logger (only if error_logger != NULL)
      and return true.  Otherwise return false.  */
-  bool (*check) (void *msgid_descr, void *msgstr_descr, bool equality, formatstring_error_logger_t error_logger, const char *pretty_msgstr);
+  bool (*check) (void *msgid_descr, void *msgstr_descr, bool equality, formatstring_error_logger_t error_logger, const char *pretty_msgid, const char *pretty_msgstr);
 };
 
 /* Format string parsers, each defined in its own file.  */