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

Re: [libvirt] [PATCH] util: fix translation of error message strings



On Mon, Dec 17, 2018 at 16:04:24 +0000, Daniel Berrange wrote:
> The arguments to the N_() macro must only ever be a literal string. It
> is not possible to use macro arguments, or use macro string
> concatenation in this context. The N_() macro is a no-op whose only
> purpose is to act as a marker for xgettext when it extracts translatable
> strings from the source code. Anything other than a literal string will
> be silently ignored by xgettext.
> 
> Unfortunately this means that the clever MSG, MSG2 & MSG_EXISTS macros
> used for building up error message strings have prevented any of the
> error messages getting marked for translation. We must sadly, revert to
> a more explicit listing of strings for now.
> 
> Signed-off-by: Daniel P. Berrangé <berrange redhat com>
> ---
>  src/util/virerror.c | 431 +++++++++++++++++++++++++++++++-------------
>  1 file changed, 303 insertions(+), 128 deletions(-)
> 
> diff --git a/src/util/virerror.c b/src/util/virerror.c
> index b08427005f..3cdc825157 100644
> --- a/src/util/virerror.c
> +++ b/src/util/virerror.c
> @@ -908,138 +908,313 @@ typedef struct {
>  } virErrorMsgTuple;

[...]

> +    [VIR_ERR_XML_DETAIL] = {
> +        N_("parsers error"),

This was "parser error" before.

ACK with the above message fixed.

Attachment: signature.asc
Description: PGP signature


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