[network-manager-openvpn/nm-1-0] import: use g_set_error_literal() for literal string errors
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/nm-1-0] import: use g_set_error_literal() for literal string errors
- Date: Tue, 24 Nov 2015 11:54:40 +0000 (UTC)
commit c6dd9759979aefdbc214bd914914817b824507cf
Author: Jiří Klimeš <jklimes redhat com>
Date: Tue Nov 24 12:26:42 2015 +0100
import: use g_set_error_literal() for literal string errors
and make the errors translatable.
properties/import-export.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/properties/import-export.c b/properties/import-export.c
index 9335a56..555d6db 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -787,17 +787,17 @@ do_import (const char *path, char **lines, GError **error)
}
if (!have_client && !have_sk) {
- g_set_error (error,
- OPENVPN_PLUGIN_UI_ERROR,
- OPENVPN_PLUGIN_UI_ERROR_FILE_NOT_OPENVPN,
- "The file to import wasn't a valid OpenVPN client configuration.");
+ g_set_error_literal (error,
+ OPENVPN_PLUGIN_UI_ERROR,
+ OPENVPN_PLUGIN_UI_ERROR_FILE_NOT_OPENVPN,
+ _("The file to import wasn't a valid OpenVPN client configuration."));
g_object_unref (connection);
connection = NULL;
} else if (!have_remote) {
- g_set_error (error,
- OPENVPN_PLUGIN_UI_ERROR,
- OPENVPN_PLUGIN_UI_ERROR_FILE_NOT_OPENVPN,
- "The file to import wasn't a valid OpenVPN configure (no remote).");
+ g_set_error_literal (error,
+ OPENVPN_PLUGIN_UI_ERROR,
+ OPENVPN_PLUGIN_UI_ERROR_FILE_NOT_OPENVPN,
+ _("The file to import wasn't a valid OpenVPN configure (no remote)."));
g_object_unref (connection);
connection = NULL;
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]