Network: adjust status strings

Make the strings match what the shell network menu shows
more closely.
https://bugzilla.gnome.org/show_bug.cgi?id=644962
This commit is contained in:
Matthias Clasen 2011-03-16 19:13:45 -04:00
parent e22dbc495f
commit 67241cc102
3 changed files with 19 additions and 29 deletions

View file

@ -1028,12 +1028,7 @@ nm_device_refresh_device_ui (CcNetworkPanel *panel, NetDevice *device)
state = nm_device_get_state (nm_device);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"label_status"));
str = panel_device_state_to_localized_string (state);
if (type == NM_DEVICE_TYPE_ETHERNET &&
(state == NM_DEVICE_STATE_UNAVAILABLE)) {
/* TRANSLATORS: this is a wired connection that is disconnected */
str = _("Unplugged");
}
str = panel_device_state_to_localized_string (type, state);
gtk_label_set_label (GTK_LABEL (widget), str);
/* set up the options button */

View file

@ -174,10 +174,10 @@ panel_ap_mode_to_localized_string (NM80211Mode mode)
* panel_device_state_to_localized_string:
**/
const gchar *
panel_device_state_to_localized_string (NMDeviceState type)
panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state)
{
const gchar *value = NULL;
switch (type) {
switch (state) {
case NM_DEVICE_STATE_UNKNOWN:
/* TRANSLATORS: device status */
value = _("Status unknown");
@ -188,31 +188,25 @@ panel_device_state_to_localized_string (NMDeviceState type)
break;
case NM_DEVICE_STATE_UNAVAILABLE:
/* TRANSLATORS: device status */
value = _("Unavailable");
if (type == NM_DEVICE_TYPE_ETHERNET)
value = _("Cable unplugged");
else
value = _("Unavailable");
break;
case NM_DEVICE_STATE_DISCONNECTED:
/* TRANSLATORS: device status */
value = _("Disconnected");
break;
case NM_DEVICE_STATE_PREPARE:
/* TRANSLATORS: device status */
value = _("Preparing connection");
break;
case NM_DEVICE_STATE_CONFIG:
case NM_DEVICE_STATE_IP_CONFIG:
case NM_DEVICE_STATE_IP_CHECK:
/* TRANSLATORS: device status */
value = _("Configuring connection");
value = _("Connecting");
break;
case NM_DEVICE_STATE_NEED_AUTH:
/* TRANSLATORS: device status */
value = _("Authenticating");
break;
case NM_DEVICE_STATE_IP_CONFIG:
/* TRANSLATORS: device status */
value = _("Getting network address");
break;
case NM_DEVICE_STATE_IP_CHECK:
/* TRANSLATORS: device status */
value = _("Checking network address");
value = _("Authentication required");
break;
case NM_DEVICE_STATE_ACTIVATED:
/* TRANSLATORS: device status */
@ -224,7 +218,7 @@ panel_device_state_to_localized_string (NMDeviceState type)
break;
case NM_DEVICE_STATE_FAILED:
/* TRANSLATORS: device status */
value = _("Failed to connect");
value = _("Connection failed");
break;
default:
/* TRANSLATORS: device status */

View file

@ -29,12 +29,13 @@
G_BEGIN_DECLS
const gchar *panel_device_to_icon_name (NMDevice *device);
const gchar *panel_device_to_localized_string (NMDevice *device);
const gchar *panel_device_to_sortable_string (NMDevice *device);
const gchar *panel_ap_mode_to_localized_string (NM80211Mode mode);
const gchar *panel_device_state_to_localized_string (NMDeviceState type);
const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type);
const gchar *panel_device_to_icon_name (NMDevice *device);
const gchar *panel_device_to_localized_string (NMDevice *device);
const gchar *panel_device_to_sortable_string (NMDevice *device);
const gchar *panel_ap_mode_to_localized_string (NM80211Mode mode);
const gchar *panel_device_state_to_localized_string (NMDeviceType type,
NMDeviceState state);
const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type);
G_END_DECLS