[libvirt] [PATCH] util: fix translation of error message strings
Peter Krempa
pkrempa at redhat.com
Mon Dec 17 17:08:24 UTC 2018
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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181217/6ccac18a/attachment-0001.sig>
More information about the libvir-list
mailing list