diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-06-01 17:35:47 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2015-06-09 18:23:12 +0200 |
commit | bd4e1f37f88baddc743b79b68886112882deca9a (patch) | |
tree | 40bb7e1120c54c489fcdfd13bb9b47693edb5c9d | |
parent | 7e5e624dafc9ad4e6ec2dc32cc0d7013476ca2c6 (diff) | |
download | NetworkManager-bd4e1f37f88baddc743b79b68886112882deca9a.tar.gz |
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().
-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; } |