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); state = nm_device_get_state (nm_device);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"label_status")); "label_status"));
str = panel_device_state_to_localized_string (state); str = panel_device_state_to_localized_string (type, state);
if (type == NM_DEVICE_TYPE_ETHERNET &&
(state == NM_DEVICE_STATE_UNAVAILABLE)) {
/* TRANSLATORS: this is a wired connection that is disconnected */
str = _("Unplugged");
}
gtk_label_set_label (GTK_LABEL (widget), str); gtk_label_set_label (GTK_LABEL (widget), str);
/* set up the options button */ /* 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: * panel_device_state_to_localized_string:
**/ **/
const gchar * const gchar *
panel_device_state_to_localized_string (NMDeviceState type) panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state)
{ {
const gchar *value = NULL; const gchar *value = NULL;
switch (type) { switch (state) {
case NM_DEVICE_STATE_UNKNOWN: case NM_DEVICE_STATE_UNKNOWN:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Status unknown"); value = _("Status unknown");
@ -188,31 +188,25 @@ panel_device_state_to_localized_string (NMDeviceState type)
break; break;
case NM_DEVICE_STATE_UNAVAILABLE: case NM_DEVICE_STATE_UNAVAILABLE:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Unavailable"); if (type == NM_DEVICE_TYPE_ETHERNET)
value = _("Cable unplugged");
else
value = _("Unavailable");
break; break;
case NM_DEVICE_STATE_DISCONNECTED: case NM_DEVICE_STATE_DISCONNECTED:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Disconnected"); value = _("Disconnected");
break; break;
case NM_DEVICE_STATE_PREPARE: case NM_DEVICE_STATE_PREPARE:
/* TRANSLATORS: device status */
value = _("Preparing connection");
break;
case NM_DEVICE_STATE_CONFIG: case NM_DEVICE_STATE_CONFIG:
case NM_DEVICE_STATE_IP_CONFIG:
case NM_DEVICE_STATE_IP_CHECK:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Configuring connection"); value = _("Connecting");
break; break;
case NM_DEVICE_STATE_NEED_AUTH: case NM_DEVICE_STATE_NEED_AUTH:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Authenticating"); value = _("Authentication required");
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");
break; break;
case NM_DEVICE_STATE_ACTIVATED: case NM_DEVICE_STATE_ACTIVATED:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
@ -224,7 +218,7 @@ panel_device_state_to_localized_string (NMDeviceState type)
break; break;
case NM_DEVICE_STATE_FAILED: case NM_DEVICE_STATE_FAILED:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */
value = _("Failed to connect"); value = _("Connection failed");
break; break;
default: default:
/* TRANSLATORS: device status */ /* TRANSLATORS: device status */

View file

@ -29,12 +29,13 @@
G_BEGIN_DECLS G_BEGIN_DECLS
const gchar *panel_device_to_icon_name (NMDevice *device); const gchar *panel_device_to_icon_name (NMDevice *device);
const gchar *panel_device_to_localized_string (NMDevice *device); const gchar *panel_device_to_localized_string (NMDevice *device);
const gchar *panel_device_to_sortable_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_ap_mode_to_localized_string (NM80211Mode mode);
const gchar *panel_device_state_to_localized_string (NMDeviceState type); const gchar *panel_device_state_to_localized_string (NMDeviceType type,
const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type); NMDeviceState state);
const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type);
G_END_DECLS G_END_DECLS