diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-06-01 17:35:47 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2015-06-04 17:32:29 +0200 |
commit | 7b4d9e04b07b07d07bfe9f071b07fc53455b617d (patch) | |
tree | f782b48af4f1e290505da6964f08cb98e380f338 | |
parent | 329bb9809d0b6472aecd1b0394aadf24a4ca3f2d (diff) | |
download | NetworkManager-7b4d9e04b07b07d07bfe9f071b07fc53455b617d.tar.gz |
nmcli: fix error message localization
Valid values must not be translated in error messages generated in
nmc_string_to_bool() and nmc_string_to_tristate().
-rw-r--r-- | clients/cli/utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clients/cli/utils.c b/clients/cli/utils.c index ce4749bfd1..575ece7c0c 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -500,7 +500,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; } @@ -528,7 +531,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; } |