[libvirt] [PATCH 3/4] virsh: add event command, for lifecycle events
Eric Blake
eblake at redhat.com
Thu Feb 20 18:25:43 UTC 2014
On 02/20/2014 11:14 AM, Daniel P. Berrange wrote:
>>>> + case VIR_DOMAIN_EVENT_DEFINED:
>>>> + ret = _("Defined");
>>>> + break;
>>>
>>
>>> How about using VIR_ENUM ?
>>>
>>> We avoided it in the event-test.c file since we wanted it to
>>> be example code people can compile outside libvirt. Using
>>> enums would be fine for virsh though i think
>>
>> VIR_ENUM doesn't allow _("") translation. This output is human legible,
>> so we want it to appear in the user's locale (see also
>> vshDomainVcpuStateToString() and friends).
>
> This is what the N_("") macro is for though isn't it. Marks the
> string for translation, but actual gettext call is done at time of
> use instead.
That should work - I'll do it as a separate patch, since there's a lot
more places that can be cleaned up.
--
Eric Blake eblake 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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140220/4c83ea6e/attachment-0001.sig>
More information about the libvir-list
mailing list