cli: 'dev wifi list': change SECURITY values

* remove "Encrypted" tag
 The "Encrypted: " stuff was initially copied from nm-tool, but it doesn't help
 here much. See also http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a734c836a56f3170202f0555f1a03c9b2835775c
 for APs with WPA & RSN IEs, but no privacy flag.

* remove a space from "WPA ", etc. strings. Translators often leave it out
  and thus break output.

* change "WPA" to "WPA1" to make it clearer

* use "802.1X" instead of "Enterprise" to save some characters
This commit is contained in:
Jiří Klimeš
2013-05-24 22:36:24 +02:00
parent 5f93c4314d
commit dca3584b26

View File

@@ -441,22 +441,26 @@ fill_output_access_point (gpointer data, gpointer user_data)
sig_level_0; sig_level_0;
security_str = g_string_new (NULL); security_str = g_string_new (NULL);
if ( !(flags & NM_802_11_AP_FLAGS_PRIVACY)
&& (wpa_flags != NM_802_11_AP_SEC_NONE)
&& (rsn_flags != NM_802_11_AP_SEC_NONE))
g_string_append (security_str, _("Encrypted: "));
if ( (flags & NM_802_11_AP_FLAGS_PRIVACY) if ( (flags & NM_802_11_AP_FLAGS_PRIVACY)
&& (wpa_flags == NM_802_11_AP_SEC_NONE) && (wpa_flags == NM_802_11_AP_SEC_NONE)
&& (rsn_flags == NM_802_11_AP_SEC_NONE)) && (rsn_flags == NM_802_11_AP_SEC_NONE)) {
g_string_append (security_str, _("WEP ")); g_string_append (security_str, _("WEP"));
if (wpa_flags != NM_802_11_AP_SEC_NONE) g_string_append_c (security_str, ' ');
g_string_append (security_str, _("WPA ")); }
if (rsn_flags != NM_802_11_AP_SEC_NONE) if (wpa_flags != NM_802_11_AP_SEC_NONE) {
g_string_append (security_str, _("WPA2 ")); g_string_append (security_str, _("WPA1"));
g_string_append_c (security_str, ' ');
}
if (rsn_flags != NM_802_11_AP_SEC_NONE) {
g_string_append (security_str, _("WPA2"));
g_string_append_c (security_str, ' ');
}
if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
|| (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) || (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) {
g_string_append (security_str, _("Enterprise ")); g_string_append (security_str, _("802.1X"));
g_string_append_c (security_str, ' ');
}
if (security_str->len > 0) if (security_str->len > 0)
g_string_truncate (security_str, security_str->len-1); /* Chop off last space */ g_string_truncate (security_str, security_str->len-1); /* Chop off last space */