[Libvir] RFC: Add a short doc with libvirt coding style guidelines

Richard W.M. Jones rjones at redhat.com
Mon Jan 14 12:39:23 UTC 2008


Daniel P. Berrange wrote:
> There's a few coding style guidelines we've kind of informally agreed upon
> wrt to libvirt patches, and perhaps more that we ought to make decisions on.
> For the benefit of people sending patches I reckon its worth writing these
> down. So I'm attaching a proposed doc 'HACKING' in which we can detail the
> guidelines.  And yes, we don't uniformly comply with these guidelines in
> all places....all the more reason to list them & fix cases where we don't
> comply :-)

   5. Ensure any user visible strings are marked for translation

       eg wrap all strings with _(...)

         virXendError(xend, VIR_ERR_INTERNAL_ERROR,
                      _("domain information incomplete, missing domid"));

Translating error messages is a bad idea: (1) Naive users ignore error 
messages anyway. (2) It makes the error message much less useful when 
doing an internet search for solutions. (3) If an error message is 
posted to this list, it's much less useful if it isn't in English.

It seems a large body of our users are Japanese, so I'd like to hear 
what they think about this issue.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080114/1968de99/attachment-0001.bin>


More information about the libvir-list mailing list