[libvirt] [PATCH] maint: prohibit translations in testsuite

Eric Blake eblake at redhat.com
Mon Aug 20 15:30:01 UTC 2012


On 08/20/2012 08:33 AM, Daniel P. Berrange wrote:
> On Mon, Aug 20, 2012 at 08:30:07AM -0600, Eric Blake wrote:
>> 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 | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/cfg.mk b/cfg.mk
>> index 224f89f..4fd3165 100644
>> --- a/cfg.mk
>> +++ b/cfg.mk
>> @@ -587,10 +587,15 @@ 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'				\
>>  	  $(_sc_search_regexp)
>> +	@prohibit='\<N?_ *\('						\
>> +	in_vc_files='^(tests|examples)/'				\
>> +	halt='$(ME): no translations in tests or examples'		\

Hmm, I intentionally triggered a violation to test this rule, and it
resulted in errors that says:
maint.mk: maint.mk: no translations in tests or examples

>> +	  $(_sc_search_regexp)
>>
>>  # Enforce recommended preprocessor indentation style.
>>  sc_preprocessor_indentation:
> 
> ACK

I pushed with a modification of removing the redundant $(ME) (which is
already provided by _sc_search_regexp), and I'm now working on a gnulib
patch to fix other offenders.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120820/2a90f75a/attachment-0001.sig>


More information about the libvir-list mailing list