diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-24 07:57:44 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-07-27 23:57:36 +0200 |
commit | c58988ff9d466a42b40b93d025d47529ce756c87 (patch) | |
tree | 2ac9665f06b9769e17d4fa1b0461bc2817c03dd9 | |
parent | ff14fbade6cf7e14853b8a20a25d51b76553a844 (diff) | |
download | NetworkManager-c58988ff9d466a42b40b93d025d47529ce756c87.tar.gz |
fixup! libnm-util: normalize slave-type and slave-settings of connections
-rw-r--r-- | libnm-util/nm-setting-bridge-port.c | 4 | ||||
-rw-r--r-- | libnm-util/nm-setting-team-port.c | 4 | ||||
-rw-r--r-- | libnm-util/tests/test-general.c | 8 | ||||
-rw-r--r-- | po/POTFILES.in | 1 |
4 files changed, 11 insertions, 6 deletions
diff --git a/libnm-util/nm-setting-bridge-port.c b/libnm-util/nm-setting-bridge-port.c index 838ecfa1a1..41a7626a75 100644 --- a/libnm-util/nm-setting-bridge-port.c +++ b/libnm-util/nm-setting-bridge-port.c @@ -187,7 +187,9 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) g_set_error (error, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, - "A connection with a '" NM_SETTING_BRIDGE_PORT_SETTING_NAME "' setting must have the slave-type set to '" NM_SETTING_BRIDGE_SETTING_NAME "'. Instead it is '%s'", + _("A connection with a '%s' setting must have the slave-type set to '%s'. Instead it is '%s'"), + NM_SETTING_BRIDGE_PORT_SETTING_NAME, + NM_SETTING_BRIDGE_SETTING_NAME, slave_type); g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE); return FALSE; diff --git a/libnm-util/nm-setting-team-port.c b/libnm-util/nm-setting-team-port.c index 96354c671d..573218a277 100644 --- a/libnm-util/nm-setting-team-port.c +++ b/libnm-util/nm-setting-team-port.c @@ -128,7 +128,9 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) g_set_error (error, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY, - "A connection with a '" NM_SETTING_TEAM_PORT_SETTING_NAME "' setting must have the slave-type set to '" NM_SETTING_TEAM_SETTING_NAME "'. Instead it is '%s'", + _("A connection with a '%s' setting must have the slave-type set to '%s'. Instead it is '%s'"), + NM_SETTING_TEAM_PORT_SETTING_NAME, + NM_SETTING_TEAM_SETTING_NAME, slave_type); g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_SLAVE_TYPE); return FALSE; diff --git a/libnm-util/tests/test-general.c b/libnm-util/tests/test-general.c index 43d159ce8f..de7206af07 100644 --- a/libnm-util/tests/test-general.c +++ b/libnm-util/tests/test-general.c @@ -2612,7 +2612,7 @@ test_connection_normalize_slave_type_1 (void) NM_SETTING_CONNECTION_SLAVE_TYPE, "invalid-type", NULL); - nmtst_assert_connection_unnormalizable (con); + nmtst_assert_connection_unnormalizable (con, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY); g_assert (!nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); g_object_set (s_con, @@ -2620,7 +2620,7 @@ test_connection_normalize_slave_type_1 (void) NULL); g_assert (!nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); - nmtst_assert_connection_verifies_after_normalization (con); + nmtst_assert_connection_verifies_after_normalization (con, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_SLAVE_SETTING_NOT_FOUND); g_assert (nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); g_assert_cmpstr (nm_setting_connection_get_slave_type (s_con), ==, NM_SETTING_BRIDGE_SETTING_NAME); } @@ -2640,7 +2640,7 @@ test_connection_normalize_slave_type_2 (void) NM_SETTING_CONNECTION_SLAVE_TYPE, "invalid-type", NULL); - nmtst_assert_connection_unnormalizable (con); + nmtst_assert_connection_unnormalizable (con, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY); g_assert (!nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); g_object_set (s_con, @@ -2650,7 +2650,7 @@ test_connection_normalize_slave_type_2 (void) g_assert (nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); g_assert_cmpstr (nm_setting_connection_get_slave_type (s_con), ==, NULL); - nmtst_assert_connection_verifies_after_normalization (con); + nmtst_assert_connection_verifies_after_normalization (con, NM_SETTING_CONNECTION_ERROR, NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY); g_assert (nm_connection_get_setting_by_name (con, NM_SETTING_BRIDGE_PORT_SETTING_NAME)); g_assert_cmpstr (nm_setting_connection_get_slave_type (s_con), ==, NM_SETTING_BRIDGE_SETTING_NAME); } diff --git a/po/POTFILES.in b/po/POTFILES.in index d83560f35e..45e08f1652 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -32,6 +32,7 @@ libnm-util/nm-setting-olpc-mesh.c libnm-util/nm-setting-ppp.c libnm-util/nm-setting-pppoe.c libnm-util/nm-setting-team.c +libnm-util/nm-setting-team-port.c libnm-util/nm-setting-vlan.c libnm-util/nm-setting-vpn.c libnm-util/nm-setting-wimax.c |