summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-02-24 14:29:37 +0100
committerThomas Haller <thaller@redhat.com>2015-02-24 14:29:39 +0100
commit81e72d948356e2755e5345c169fb731dbccc9347 (patch)
tree135cd1025917301ccb028a40693a3f0d5ce63680
parent3f01e3d2937fa6b49cd15ab7db5c9e22379d5b52 (diff)
downloadNetworkManager-81e72d948356e2755e5345c169fb731dbccc9347.tar.gz
translations: avoid preprocessor strings inside translation macro
https://bugzilla.gnome.org/show_bug.cgi?id=740381 https://bugzilla.gnome.org/show_bug.cgi?id=744998 Backport commit 943db815eeca43e5d1086b80feee77840655a781 from libnm-core to libnm-util.
-rw-r--r--libnm-util/nm-setting-connection.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c
index 162ae7cb02..bda89d6323 100644
--- a/libnm-util/nm-setting-connection.c
+++ b/libnm-util/nm-setting-connection.c
@@ -882,19 +882,21 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
if (is_slave) {
if (!priv->master) {
- g_set_error_literal (error,
- NM_SETTING_CONNECTION_ERROR,
- NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
- _("Slave connections need a valid '" NM_SETTING_CONNECTION_MASTER "' property"));
+ g_set_error (error,
+ NM_SETTING_CONNECTION_ERROR,
+ NM_SETTING_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 NM_SETTING_VERIFY_ERROR;
}
} else {
if (priv->master) {
- g_set_error_literal (error,
- NM_SETTING_CONNECTION_ERROR,
- NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
- _("Cannot set '" NM_SETTING_CONNECTION_MASTER "' without '" NM_SETTING_CONNECTION_SLAVE_TYPE "'"));
+ g_set_error (error,
+ NM_SETTING_CONNECTION_ERROR,
+ NM_SETTING_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 NM_SETTING_VERIFY_ERROR;
}