[libvirt] [PATCH 02/30] esx: Mark error messages for translation

Matthias Bolte matthias.bolte at googlemail.com
Tue Apr 6 17:37:17 UTC 2010


2010/4/5 Eric Blake <eblake at redhat.com>:
> On 04/04/2010 11:36 AM, Matthias Bolte wrote:
>> ---
>>  cfg.mk                   |    2 +
>>  po/POTFILES.in           |    6 +
>>  src/esx/esx_driver.c     |  211 +++++++++++++++++----------------
>>  src/esx/esx_util.c       |   58 +++++-----
>>  src/esx/esx_vi.c         |  274 +++++++++++++++++++++---------------------
>>  src/esx/esx_vi_methods.c |    8 +-
>>  src/esx/esx_vi_types.c   |   70 ++++++-----
>>  src/esx/esx_vmx.c        |  300 +++++++++++++++++++++++-----------------------
>>  8 files changed, 481 insertions(+), 448 deletions(-)
>>
>> diff --git a/cfg.mk b/cfg.mk
>> index 619a8e2..8073f34 100644
>> --- a/cfg.mk
>> +++ b/cfg.mk
>> @@ -169,6 +169,8 @@ sc_prohibit_gethostby:
>>
>>  msg_gen_function =
>>  msg_gen_function += ReportError
>> +msg_gen_function += ESX_ERROR
>> +msg_gen_function += ESX_VI_ERROR
>
> ACK; the rest of the patch is mostly mechanical fallout.
>
>> @@ -837,19 +845,19 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
>>          }
>>      }
>>
>> -#define _DESERIALIZE_NUMBER(_type, _xsdType, _name, _min, _max)           \
>> +#define _DESERIALIZE_NUMBER(_type, _xsdType, _name, _min, _max)               \
>>          do {                                                                  \
>>              if (virStrToLong_ll((*anyType)->value, NULL, 10, &number) < 0) {  \
>>                  ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,                          \
>> -                             "Unknown value '%s' for "_xsdType,               \
>> -                             (*anyType)->value);                              \
>> +                             _("Unknown value '%s' for %s"),                  \
>> +                             (*anyType)->value, _xsdType);                    \
>
> My spot checking noticed that this one was not as trivial as most of the
> conversions, but it still looks correct.
>

Yep, had to change this to make it translatable.

Thanks, I merged patch 21/30 into this one and pushed the result.

Matthias




More information about the libvir-list mailing list