]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
maint: prohibit translations in testsuite
authorEric Blake <eblake@redhat.com>
Mon, 20 Aug 2012 14:26:58 +0000 (08:26 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 20 Aug 2012 15:34:22 +0000 (09:34 -0600)
Nothing in the testsuite or examples directory should be translated,
as it is not part of the normally installed binary.  We already
meet this rule, but enforcing it will make it easier to remember.

Suggested by Daniel P. Berrange.

* cfg.mk (sc_prohibit_useless_translation): Enhance rule.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index d2e54e374b2b52f1c60c6d3ee697bed23457cdb5..4cdfd1ba85af3a14e8c526ad9c32e0b52f16cc8c 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -587,9 +587,14 @@ sc_prohibit_diagnostic_without_format:
            exit 1; } || :
 
 # The strings "" and "%s" should never be marked for translation.
+# Files under tests/ and examples/ should not be translated.
 sc_prohibit_useless_translation:
        @prohibit='_\("(%s)?"\)'                                        \
-       halt='$(ME): found useless translation'                         \
+       halt='found useless translation'                                \
+         $(_sc_search_regexp)
+       @prohibit='\<N?_ *\('                                           \
+       in_vc_files='^(tests|examples)/'                                \
+       halt='no translations in tests or examples'                     \
          $(_sc_search_regexp)
 
 # Enforce recommended preprocessor indentation style.