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
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
