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

Eric Blake eblake at redhat.com
Mon Apr 5 16:09:14 UTC 2010


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.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100405/5ca4f2d1/attachment-0001.sig>


More information about the libvir-list mailing list