Re: [PATCH 3/4] virsh: add event command, for lifecycle events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]