From 83aba66a85ae41a746aab3f428c0fe68adfb8b65 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 1 Jun 2015 17:35:47 +0200 Subject: [PATCH] cli: fix error message localization Valid values must not be translated in error messages generated in nmc_string_to_bool() and nmc_string_to_tristate(). (cherry picked from commit bd4e1f37f88baddc743b79b68886112882deca9a) --- clients/cli/utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 43d69b63ba..3cc836d83e 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -407,7 +407,10 @@ nmc_string_to_bool (const char *str, gboolean *val_bool, GError **error) if (g_strcmp0 (str, "o") == 0) { g_set_error (error, 1, 0, - _("'%s' is ambiguous (on x off)"), str); + /* Translators: the first %s is the partial value entered by + * the user, the second %s a list of compatible values. + */ + _("'%s' is ambiguous (%s)"), str, "on x off"); return FALSE; } @@ -435,7 +438,10 @@ nmc_string_to_tristate (const char *str, NMCTriStateValue *val, GError **error) if (g_strcmp0 (str, "o") == 0) { g_set_error (error, 1, 0, - _("'%s' is ambiguous (on x off)"), str); + /* Translators: the first %s is the partial value entered by + * the user, the second %s a list of compatible values. + */ + _("'%s' is ambiguous (%s)"), str, "on x off"); return FALSE; }