mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 02:30:11 +01:00
translations: avoid preprocessor strings inside translation macro
https://bugzilla.gnome.org/show_bug.cgi?id=740381 Reported-by: Yuri Chornoivan <yurchor@ukr.net>
This commit is contained in:
parent
01ca15993b
commit
943db815ee
3 changed files with 17 additions and 14 deletions
|
|
@ -61,7 +61,7 @@ usage_agent_polkit (void)
|
|||
"\n"
|
||||
"Registers nmcli as a polkit action for the user session.\n"
|
||||
"When a polkit daemon requires an authorization, nmcli asks the user and gives\n"
|
||||
"the reponse back to polkit.\n\n"));
|
||||
"the response back to polkit.\n\n"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -1968,8 +1968,9 @@ validate_int64 (NMSetting *setting, const char* prop, gint64 val, GError **error
|
|||
g_assert (G_IS_PARAM_SPEC (pspec));
|
||||
if (g_param_value_validate (pspec, &value)) {
|
||||
GParamSpecInt64 *pspec_int = (GParamSpecInt64 *) pspec;
|
||||
g_set_error (error, 1, 0, _("'%"G_GINT64_FORMAT"' is not valid; use <%"G_GINT64_FORMAT"-%"G_GINT64_FORMAT">"),
|
||||
val, pspec_int->minimum, pspec_int->maximum);
|
||||
G_STATIC_ASSERT (sizeof (long long) >= sizeof (gint64));
|
||||
g_set_error (error, 1, 0, _("'%lld' is not valid; use <%lld-%lld>"),
|
||||
(long long) val, (long long) pspec_int->minimum, (long long) pspec_int->maximum);
|
||||
success = FALSE;
|
||||
}
|
||||
g_value_unset (&value);
|
||||
|
|
@ -1990,7 +1991,7 @@ validate_uint (NMSetting *setting, const char* prop, guint val, GError **error)
|
|||
g_assert (G_IS_PARAM_SPEC (pspec));
|
||||
if (g_param_value_validate (pspec, &value)) {
|
||||
GParamSpecUInt *pspec_uint = (GParamSpecUInt *) pspec;
|
||||
g_set_error (error, 1, 0, _("'%u' is not valid; use <%d-%d>"),
|
||||
g_set_error (error, 1, 0, _("'%u' is not valid; use <%u-%u>"),
|
||||
val, pspec_uint->minimum, pspec_uint->maximum);
|
||||
success = FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -874,10 +874,10 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
if (is_slave) {
|
||||
if (!priv->master) {
|
||||
g_set_error_literal (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Slave connections need a valid '" NM_SETTING_CONNECTION_MASTER "' property"));
|
||||
g_set_error (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Slave connections need a valid '%s' property"), NM_SETTING_CONNECTION_MASTER);
|
||||
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_MASTER);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -895,10 +895,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
|
|||
normerr_missing_slave_type = slave_type;
|
||||
normerr_missing_slave_type_port = nm_setting_get_name (s_port);
|
||||
} else {
|
||||
g_set_error_literal (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Cannot set '" NM_SETTING_CONNECTION_MASTER "' without '" NM_SETTING_CONNECTION_SLAVE_TYPE "'"));
|
||||
g_set_error (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Cannot set '%s' without '%s'"),
|
||||
NM_SETTING_CONNECTION_MASTER, NM_SETTING_CONNECTION_SLAVE_TYPE);
|
||||
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -936,8 +937,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
|
|||
g_set_error (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_MISSING_PROPERTY,
|
||||
_("Detect a slave connection with '" NM_SETTING_CONNECTION_MASTER "' set and a port type '%s'. '" NM_SETTING_CONNECTION_SLAVE_TYPE "' should be set to '%s'"),
|
||||
normerr_missing_slave_type_port, normerr_missing_slave_type);
|
||||
_("Detect a slave connection with '%s' set and a port type '%s'. '%s' should be set to '%s'"),
|
||||
NM_SETTING_CONNECTION_MASTER, normerr_missing_slave_type_port,
|
||||
NM_SETTING_CONNECTION_SLAVE_TYPE, normerr_missing_slave_type);
|
||||
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE);
|
||||
return NM_SETTING_VERIFY_NORMALIZABLE_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue