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

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

 



On Mon, Dec 17, 2018 at 16:04:24 +0000, Daniel P. Berrangé 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@xxxxxxxxxx>
> ---
>  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 {
...
> +    [VIR_ERR_XML_DETAIL] = {
> +        N_("parsers error"),

s/parsers/parser/

> +        "%s" },

After fixing the typo

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux