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

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

On 02/20/2014 11:14 AM, Daniel P. Berrange wrote:

>>>> +        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

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