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 bd4e1f37f8)
This commit is contained in:
Beniamino Galvani 2015-06-01 17:35:47 +02:00
parent 975afac6a4
commit 83aba66a85

View file

@ -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;
}