maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
authorJim Meyering <meyering@redhat.com>
Sat, 4 Jun 2011 17:56:58 +0000 (19:56 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 4 Jun 2011 17:57:07 +0000 (19:57 +0200)
* top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the
function name, "error".
(_gl_translatable_diag_func_re): New configurable variable.

ChangeLog
top/maint.mk

index b38b724ce6a40639263e75ec2c8687aa8530568b..cdc4f06ec1f725a83d8c7d38e3f7a52f32bf1d1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-04  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
+       * top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the
+       function name, "error".
+       (_gl_translatable_diag_func_re): New configurable variable.
+
 2011-06-04  Bruno Haible  <bruno@clisp.org>
 
        getopt: Avoid gcc warning.
index c55571cb47fa589777128daedab943f397db887b..6f6b8be39157d77debda38ef0c3198d411f637fb 100644 (file)
@@ -684,11 +684,16 @@ sc_two_space_separator_in_usage:
        halt='help2man requires at least two spaces between an option and its description'\
          $(_sc_search_regexp)
 
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
 # Look for diagnostics that aren't marked for translation.
 # This won't find any for which error's format string is on a separate line.
 sc_unmarked_diagnostics:
        @grep -nE                                                       \
-           '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT))      \
+           '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+               $$($(VC_LIST_EXCEPT))                                   \
          | grep -Ev '(_|ngettext ?)\(' &&                              \
          { echo '$(ME): found unmarked diagnostic(s)' 1>&2;            \
            exit 1; } || :