Add more gettext (to nm-l2tp-service mostly)

parent 72353521
# List of source files containing translatable strings. # List of source files containing translatable strings.
# Please keep this file sorted alphabetically. # Please keep this file sorted alphabetically.
auth-dialog/gnome-two-password-dialog.c
auth-dialog/main.c auth-dialog/main.c
auth-dialog/vpn-password-dialog.c
nm-l2tp.desktop.in nm-l2tp.desktop.in
properties/advanced-dialog.c properties/advanced-dialog.c
properties/ipsec-dialog.c
properties/nm-l2tp.c properties/nm-l2tp.c
properties/nm-l2tp-dialog.glade properties/nm-l2tp-dialog.glade
src/nm-l2tp-service.c src/nm-l2tp-service.c
......
...@@ -184,7 +184,7 @@ advanced_dialog_response_cb (GtkWidget *dialog, gint response, gpointer user_dat ...@@ -184,7 +184,7 @@ advanced_dialog_response_cb (GtkWidget *dialog, gint response, gpointer user_dat
g_hash_table_destroy (priv->advanced); g_hash_table_destroy (priv->advanced);
priv->advanced = advanced_dialog_new_hash_from_dialog (dialog, &error); priv->advanced = advanced_dialog_new_hash_from_dialog (dialog, &error);
if (!priv->advanced) { if (!priv->advanced) {
g_message ("%s: error reading advanced settings: %s", __func__, error->message); g_message (_("%s: error reading advanced settings: %s"), __func__, error->message);
g_error_free (error); g_error_free (error);
} }
advanced_dialog_close_cb (dialog, self); advanced_dialog_close_cb (dialog, self);
...@@ -208,7 +208,7 @@ ipsec_dialog_response_cb (GtkWidget *dialog, gint response, gpointer user_data) ...@@ -208,7 +208,7 @@ ipsec_dialog_response_cb (GtkWidget *dialog, gint response, gpointer user_data)
g_hash_table_destroy (priv->ipsec); g_hash_table_destroy (priv->ipsec);
priv->ipsec = ipsec_dialog_new_hash_from_dialog (dialog, &error); priv->ipsec = ipsec_dialog_new_hash_from_dialog (dialog, &error);
if (!priv->ipsec) { if (!priv->ipsec) {
g_message ("%s: error reading ipsec settings: %s", __func__, error->message); g_message (_("%s: error reading ipsec settings: %s"), __func__, error->message);
g_error_free (error); g_error_free (error);
} }
ipsec_dialog_close_cb (dialog, self); ipsec_dialog_close_cb (dialog, self);
...@@ -229,7 +229,7 @@ advanced_button_clicked_cb (GtkWidget *button, gpointer user_data) ...@@ -229,7 +229,7 @@ advanced_button_clicked_cb (GtkWidget *button, gpointer user_data)
dialog = advanced_dialog_new (priv->advanced); dialog = advanced_dialog_new (priv->advanced);
if (!dialog) { if (!dialog) {
g_warning ("%s: failed to create the Advanced dialog!", __func__); g_warning (_("%s: failed to create the Advanced dialog!"), __func__);
return; return;
} }
...@@ -259,7 +259,7 @@ ipsec_button_clicked_cb (GtkWidget *button, gpointer user_data) ...@@ -259,7 +259,7 @@ ipsec_button_clicked_cb (GtkWidget *button, gpointer user_data)
dialog = ipsec_dialog_new (priv->ipsec); dialog = ipsec_dialog_new (priv->ipsec);
if (!dialog) { if (!dialog) {
g_warning ("%s: failed to create the IPSEC dialog!", __func__); g_warning (_("%s: failed to create the IPSEC dialog!"), __func__);
return; return;
} }
...@@ -611,7 +611,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error) ...@@ -611,7 +611,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
object = NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (g_object_new (L2TP_TYPE_PLUGIN_UI_WIDGET, NULL)); object = NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (g_object_new (L2TP_TYPE_PLUGIN_UI_WIDGET, NULL));
if (!object) { if (!object) {
g_set_error (error, L2TP_PLUGIN_UI_ERROR, 0, "could not create l2tp object"); g_set_error (error, L2TP_PLUGIN_UI_ERROR, 0, _("could not create l2tp object"));
return NULL; return NULL;
} }
...@@ -623,11 +623,12 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error) ...@@ -623,11 +623,12 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE); gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE);
if (!gtk_builder_add_from_file(priv->builder, ui_file, error)) { if (!gtk_builder_add_from_file(priv->builder, ui_file, error)) {
g_warning ("Couldn't load builder file: %s", g_warning (_("Couldn't load builder file: %s"),
error && *error ? (*error)->message : "(unknown)"); error && *error ? (*error)->message : "(unknown)");
g_clear_error(error); g_clear_error(error);
g_set_error(error, L2TP_PLUGIN_UI_ERROR, 0, g_set_error(error, L2TP_PLUGIN_UI_ERROR, 0,
"could not load required resources at %s", ui_file); _("could not load required resources at %s"),
ui_file);
g_free(ui_file); g_free(ui_file);
g_object_unref(object); g_object_unref(object);
return NULL; return NULL;
...@@ -636,7 +637,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error) ...@@ -636,7 +637,7 @@ nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error)
priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "l2tp-vbox")); priv->widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "l2tp-vbox"));
if (!priv->widget) { if (!priv->widget) {
g_set_error (error, L2TP_PLUGIN_UI_ERROR, 0, "could not load UI widget"); g_set_error (error, L2TP_PLUGIN_UI_ERROR, 0, _("could not load UI widget"));
g_object_unref (object); g_object_unref (object);
return NULL; return NULL;
} }
...@@ -731,7 +732,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error) ...@@ -731,7 +732,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error)
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP, L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP,
"unknown L2TP file extension"); _("unknown L2TP file extension"));
goto out; goto out;
} }
...@@ -739,7 +740,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error) ...@@ -739,7 +740,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error)
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP, L2TP_PLUGIN_UI_ERROR_FILE_NOT_L2TP,
"unknown L2TP file extension"); _("unknown L2TP file extension"));
goto out; goto out;
} }
...@@ -751,7 +752,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error) ...@@ -751,7 +752,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error)
g_set_error (error, g_set_error (error,
L2TP_PLUGIN_UI_ERROR, L2TP_PLUGIN_UI_ERROR,
L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE, L2TP_PLUGIN_UI_ERROR_FILE_NOT_READABLE,
"not a valid L2TP configuration file"); _("not a valid L2TP configuration file"));
goto out; goto out;
} }
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h> #include <netdb.h>
#include <glib/gi18n.h>
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include <dbus/dbus-glib.h> #include <dbus/dbus-glib.h>
...@@ -144,8 +145,8 @@ nm_l2tp_ppp_service_new (void) ...@@ -144,8 +145,8 @@ nm_l2tp_ppp_service_new (void)
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (!connection) { if (!connection) {
g_warning ("Could not get the system bus. Make sure " g_warning (_("Could not get the system bus. Make sure "
"the message bus daemon is running! Message: %s", "the message bus daemon is running! Message: %s"),
error->message); error->message);
g_error_free (error); g_error_free (error);
g_object_unref (object); g_object_unref (object);
...@@ -166,7 +167,7 @@ nm_l2tp_ppp_service_new (void) ...@@ -166,7 +167,7 @@ nm_l2tp_ppp_service_new (void)
dbus_g_connection_register_g_object (connection, NM_DBUS_PATH_L2TP_PPP, object); dbus_g_connection_register_g_object (connection, NM_DBUS_PATH_L2TP_PPP, object);
success = TRUE; success = TRUE;
} else { } else {
g_warning ("Could not register D-Bus service name. Message: %s", error->message); g_warning (_("Could not register D-Bus service name. Message: %s"), error->message);
g_error_free (error); g_error_free (error);
g_object_unref (object); g_object_unref (object);
object = NULL; object = NULL;
...@@ -256,7 +257,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self, ...@@ -256,7 +257,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s", "%s",
"Could not find secrets (connection invalid, no vpn setting)."); _("Could not find secrets (connection invalid, no vpn setting)."));
return FALSE; return FALSE;
} }
...@@ -269,7 +270,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self, ...@@ -269,7 +270,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s", "%s",
"Invalid VPN username."); _("Invalid VPN username."));
return FALSE; return FALSE;
} }
} else { } else {
...@@ -279,7 +280,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self, ...@@ -279,7 +280,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s", "%s",
"Missing VPN username."); _("Missing VPN username."));
return FALSE; return FALSE;
} }
} }
...@@ -290,7 +291,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self, ...@@ -290,7 +291,7 @@ nm_l2tp_ppp_service_cache_credentials (NML2tpPppService *self,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s", "%s",
"Missing or invalid VPN password."); _("Missing or invalid VPN password."));
return FALSE; return FALSE;
} }
...@@ -318,7 +319,7 @@ impl_l2tp_service_need_secrets (NML2tpPppService *self, ...@@ -318,7 +319,7 @@ impl_l2tp_service_need_secrets (NML2tpPppService *self,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID, NM_VPN_PLUGIN_ERROR_CONNECTION_INVALID,
"%s", "%s",
"No cached credentials."); _("No cached credentials."));
goto error; goto error;
} }
...@@ -349,7 +350,7 @@ impl_l2tp_service_set_ip4_config (NML2tpPppService *self, ...@@ -349,7 +350,7 @@ impl_l2tp_service_set_ip4_config (NML2tpPppService *self,
GHashTable *config_hash, GHashTable *config_hash,
GError **err) GError **err)
{ {
g_message( ("L2TP service (IP Config Get) reply received.")); g_message (_("L2TP service (IP Config Get) reply received."));
g_signal_emit (G_OBJECT (self), signals[PLUGIN_ALIVE], 0); g_signal_emit (G_OBJECT (self), signals[PLUGIN_ALIVE], 0);
/* Just forward the pppd plugin config up to our superclass; no need to modify it */ /* Just forward the pppd plugin config up to our superclass; no need to modify it */
...@@ -492,7 +493,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -492,7 +493,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"invalid gateway '%s'", _("invalid gateway '%s'"),
key); key);
return; return;
} }
...@@ -501,7 +502,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -501,7 +502,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"invalid ipsec-group-name '%s'", _("invalid ipsec-group-name '%s'"),
key); key);
return; return;
} }
...@@ -510,7 +511,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -510,7 +511,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"invalid ipsec-gateway-id '%s'", _("invalid ipsec-gateway-id '%s'"),
key); key);
return; return;
} }
...@@ -523,7 +524,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -523,7 +524,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"invalid integer property '%s'", _("invalid integer property '%s'"),
key); key);
break; break;
case G_TYPE_BOOLEAN: case G_TYPE_BOOLEAN:
...@@ -533,14 +534,14 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -533,14 +534,14 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"invalid boolean property '%s' (not yes or no)", _("invalid boolean property '%s' (not yes or no)"),
key); key);
break; break;
default: default:
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"unhandled property '%s' type %s", _("unhandled property '%s' type %s"),
key, g_type_name (prop.type)); key, g_type_name (prop.type));
break; break;
} }
...@@ -551,7 +552,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data) ...@@ -551,7 +552,7 @@ validate_one_property (const char *key, const char *value, gpointer user_data)
g_set_error (info->error, g_set_error (info->error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"property '%s' invalid or not supportedx", _("property '%s' invalid or not supportedx"),
key); key);
} }
} }
...@@ -569,7 +570,7 @@ nm_l2tp_properties_validate (NMSettingVPN *s_vpn, ...@@ -569,7 +570,7 @@ nm_l2tp_properties_validate (NMSettingVPN *s_vpn,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"%s", "%s",
"No VPN configuration options."); _("No VPN configuration options."));
return FALSE; return FALSE;
} }
...@@ -589,7 +590,7 @@ nm_l2tp_properties_validate (NMSettingVPN *s_vpn, ...@@ -589,7 +590,7 @@ nm_l2tp_properties_validate (NMSettingVPN *s_vpn,
g_set_error (error, g_set_error (error,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"Missing required option '%s'.", _("Missing required option '%s'."),
prop.name); prop.name);
return FALSE; return FALSE;
} }
...@@ -609,7 +610,7 @@ nm_l2tp_secrets_validate (NMSettingVPN *s_vpn, GError **error) ...@@ -609,7 +610,7 @@ nm_l2tp_secrets_validate (NMSettingVPN *s_vpn, GError **error)
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
"%s", "%s",
"No VPN secrets!"); _("No VPN secrets!"));
return FALSE; return FALSE;
} }
...@@ -631,14 +632,14 @@ l2tpd_watch_cb (GPid pid, gint status, gpointer user_data) ...@@ -631,14 +632,14 @@ l2tpd_watch_cb (GPid pid, gint status, gpointer user_data)
if (WIFEXITED (status)) { if (WIFEXITED (status)) {
error = WEXITSTATUS (status); error = WEXITSTATUS (status);
if (error != 0) if (error != 0)
g_warning ("xl2tpd exited with error code %d", error); g_warning (_("xl2tpd exited with error code %d"), error);
} }
else if (WIFSTOPPED (status)) else if (WIFSTOPPED (status))
g_warning ("xl2tpd stopped unexpectedly with signal %d", WSTOPSIG (status)); g_warning (_("xl2tpd stopped unexpectedly with signal %d"), WSTOPSIG (status));
else if (WIFSIGNALED (status)) else if (WIFSIGNALED (status))
g_warning ("xl2tpd died with signal %d", WTERMSIG (status)); g_warning (_("xl2tpd died with signal %d"), WTERMSIG (status));
else else
g_warning ("xl2tpd died from an unknown cause"); g_warning (_("xl2tpd died from an unknown cause"));
/* Reap child if needed. */ /* Reap child if needed. */
waitpid (priv->pid_l2tpd, NULL, WNOHANG); waitpid (priv->pid_l2tpd, NULL, WNOHANG);
...@@ -740,7 +741,7 @@ pppd_timed_out (gpointer user_data) ...@@ -740,7 +741,7 @@ pppd_timed_out (gpointer user_data)
{ {
NML2tpPlugin *plugin = NM_L2TP_PLUGIN (user_data); NML2tpPlugin *plugin = NM_L2TP_PLUGIN (user_data);
g_warning ("Looks like pppd didn't initialize our dbus module"); g_warning (_("Looks like pppd didn't initialize our dbus module"));
nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT); nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT);
return FALSE; return FALSE;
...@@ -820,13 +821,13 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection) ...@@ -820,13 +821,13 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection)
s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN); s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN);
if (!s_vpn) { if (!s_vpn) {
g_warning ("couldn't get VPN setting"); g_warning (_("couldn't get VPN setting"));
return NULL; return NULL;
} }
p = tmp = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_GATEWAY); p = tmp = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_GATEWAY);
if (!tmp || !strlen (tmp)) { if (!tmp || !strlen (tmp)) {
g_warning ("couldn't get L2TP VPN gateway IP address"); g_warning (_("couldn't get L2TP VPN gateway IP address"));
return NULL; return NULL;
} }
...@@ -850,7 +851,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection) ...@@ -850,7 +851,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection)
hints.ai_flags = AI_ADDRCONFIG; hints.ai_flags = AI_ADDRCONFIG;
err = getaddrinfo (tmp, NULL, &hints, &result); err = getaddrinfo (tmp, NULL, &hints, &result);
if (err != 0) { if (err != 0) {
g_warning ("couldn't look up L2TP VPN gateway IP address '%s' (%d)", tmp, err); g_warning (_("couldn't look up L2TP VPN gateway IP address '%s' (%d)"), tmp, err);
return NULL; return NULL;
} }
...@@ -872,7 +873,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection) ...@@ -872,7 +873,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection)
} else { } else {
errno = 0; errno = 0;
if (inet_pton (AF_INET, tmp, &addr) <= 0) { if (inet_pton (AF_INET, tmp, &addr) <= 0) {
g_warning ("couldn't convert L2TP VPN gateway IP address '%s' (%d)", tmp, errno); g_warning (_("couldn't convert L2TP VPN gateway IP address '%s' (%d)"), tmp, errno);
return NULL; return NULL;
} }
} }
...@@ -882,7 +883,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection) ...@@ -882,7 +883,7 @@ get_l2tp_gw_address_as_gvalue (NMConnection *connection)
g_value_init (value, G_TYPE_UINT); g_value_init (value, G_TYPE_UINT);
g_value_set_uint (value, (guint32) addr.s_addr); g_value_set_uint (value, (guint32) addr.s_addr);
} else } else
g_warning ("couldn't determine L2TP VPN gateway IP address from '%s'", tmp); g_warning (_("couldn't determine L2TP VPN gateway IP address from '%s'"), tmp);
return value; return value;
} }
...@@ -971,7 +972,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin, ...@@ -971,7 +972,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not find the ipsec binary."); _("Could not find the ipsec binary."));
return FALSE; return FALSE;
} }
sprintf(session_name, "nm-ipsec-l2tpd-%d", getpid()); sprintf(session_name, "nm-ipsec-l2tpd-%d", getpid());
...@@ -1008,7 +1009,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin, ...@@ -1008,7 +1009,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Cannot save /etc/ipsec.secrets"); _("Cannot save /etc/ipsec.secrets"));
return FALSE; return FALSE;
} }
...@@ -1018,7 +1019,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin, ...@@ -1018,7 +1019,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Cannot open /etc/ipsec.secrets for writing"); _("Cannot open /etc/ipsec.secrets for writing"));
return FALSE; return FALSE;
} }
value = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_IPSEC_GROUP_NAME); value = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_IPSEC_GROUP_NAME);
...@@ -1040,7 +1041,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin, ...@@ -1040,7 +1041,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
(void)rename(tmp_secrets, "/etc/ipsec.secrets"); (void)rename(tmp_secrets, "/etc/ipsec.secrets");
(void)system("PATH=\"/sbin:/usr/sbin:/usr/local/sbin:$PATH\" ipsec secrets"); (void)system("PATH=\"/sbin:/usr/sbin:/usr/local/sbin:$PATH\" ipsec secrets");
g_message("ipsec ready for action"); g_message(_("ipsec ready for action"));
return TRUE; return TRUE;
} }
...@@ -1061,7 +1062,7 @@ nm_l2tp_start_l2tpd_binary (NML2tpPlugin *plugin, ...@@ -1061,7 +1062,7 @@ nm_l2tp_start_l2tpd_binary (NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not find the xl2tpd binary."); _("Could not find the xl2tpd binary."));
return FALSE; return FALSE;
} }
...@@ -1079,7 +1080,7 @@ nm_l2tp_start_l2tpd_binary (NML2tpPlugin *plugin, ...@@ -1079,7 +1080,7 @@ nm_l2tp_start_l2tpd_binary (NML2tpPlugin *plugin,
} }
free_args (l2tpd_argv); free_args (l2tpd_argv);
g_message("xl2tpd started with pid %d",pid); g_message(_("xl2tpd started with pid %d"), pid);
NM_L2TP_PLUGIN_GET_PRIVATE (plugin)->pid_l2tpd = pid; NM_L2TP_PLUGIN_GET_PRIVATE (plugin)->pid_l2tpd = pid;
g_child_watch_add (pid, l2tpd_watch_cb, plugin); g_child_watch_add (pid, l2tpd_watch_cb, plugin);
...@@ -1131,7 +1132,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin, ...@@ -1131,7 +1132,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not write ipsec config."); _("Could not write ipsec config."));
return FALSE; return FALSE;
} }
write_config_option (ipsec_fd, "version 2.0\n" write_config_option (ipsec_fd, "version 2.0\n"
...@@ -1175,7 +1176,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin, ...@@ -1175,7 +1176,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not write xl2tpd config."); _("Could not write xl2tpd config."));
return FALSE; return FALSE;
} }
...@@ -1190,7 +1191,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin, ...@@ -1190,7 +1191,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not write ppp options."); _("Could not write ppp options."));
return FALSE; return FALSE;
} }
...@@ -1307,7 +1308,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin, ...@@ -1307,7 +1308,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
if (errno == 0) { if (errno == 0) {
write_config_option (pppopt_fd, "lcp-echo-failure %ld\n", tmp_int); write_config_option (pppopt_fd, "lcp-echo-failure %ld\n", tmp_int);
} else { } else {
g_warning ("failed to convert lcp-echo-failure value '%s'", value); g_warning (_("failed to convert lcp-echo-failure value '%s'"), value);
} }
} else { } else {
write_config_option (pppopt_fd, "lcp-echo-failure 0\n"); write_config_option (pppopt_fd, "lcp-echo-failure 0\n");
...@@ -1325,7 +1326,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin, ...@@ -1325,7 +1326,7 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
if (errno == 0) { if (errno == 0) {
write_config_option (pppopt_fd, "lcp-echo-interval %ld\n", tmp_int); write_config_option (pppopt_fd, "lcp-echo-interval %ld\n", tmp_int);
} else { } else {
g_warning ("failed to convert lcp-echo-interval value '%s'", value); g_warning (_("failed to convert lcp-echo-interval value '%s'"), value);
} }
} else { } else {
write_config_option (pppopt_fd, "lcp-echo-interval 0\n"); write_config_option (pppopt_fd, "lcp-echo-interval 0\n");
...@@ -1372,7 +1373,7 @@ real_connect (NMVPNPlugin *plugin, ...@@ -1372,7 +1373,7 @@ real_connect (NMVPNPlugin *plugin,
NM_VPN_PLUGIN_ERROR, NM_VPN_PLUGIN_ERROR,
NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED,
"%s", "%s",
"Could not start pppd plugin helper service."); _("Could not start pppd plugin helper service."));
return FALSE; return FALSE;
} }
...@@ -1392,9 +1393,9 @@ real_connect (NMVPNPlugin *plugin, ...@@ -1392,9 +1393,9 @@ real_connect (NMVPNPlugin *plugin,
return FALSE; return FALSE;
value = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_IPSEC_ENABLE); value = nm_setting_vpn_get_data_item (s_vpn, NM_L2TP_KEY_IPSEC_ENABLE);
g_message("ipsec enable flag: %s",value?value:"(null)"); g_message(_("ipsec enable flag: %s"), value?value:"(null)");
if(value && !strcmp(value,"yes")) { if(value && !strcmp(value,"yes")) {
g_message("starting ipsec"); g_message(_("starting ipsec"));
if (!nm_l2tp_start_ipsec(NM_L2TP_PLUGIN (plugin), s_vpn, error)) if (!nm_l2tp_start_ipsec(NM_L2TP_PLUGIN (plugin), s_vpn, error))
return FALSE; return FALSE;
} }
...@@ -1438,7 +1439,7 @@ real_disconnect (NMVPNPlugin *plugin, ...@@ -1438,7 +1439,7 @@ real_disconnect (NMVPNPlugin *plugin,
else else
kill (priv->pid_l2tpd, SIGKILL); kill (priv->pid_l2tpd, SIGKILL);
g_message("Terminated ppp daemon with PID %d.", priv->pid_l2tpd); g_message(_("Terminated ppp daemon with PID %d."), priv->pid_l2tpd);
priv->pid_l2tpd = 0; priv->pid_l2tpd = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment