From 23f239e46158c545df602a7b1211849fe6e11d7d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 31 Mar 2011 10:38:31 -0400 Subject: [PATCH] Network: display more detailed status for unavailable devices If NetworkManager knows that firmware is missing, say so. This matches recent changes in the gnome-shell network menu. It adds one new string, "Firmware missing", for which I have pulled existing translations from the similar "firmware missing" string in gnome-shell. https://bugzilla.gnome.org/show_bug.cgi?id=646027 --- panels/network/cc-network-panel.c | 2 +- panels/network/panel-common.c | 14 ++++++++++++-- panels/network/panel-common.h | 3 +-- po/ar.po | 4 ++++ po/bg.po | 4 ++++ po/ca.po | 4 ++++ po/de.po | 4 ++++ po/es.po | 4 ++++ po/fr.po | 4 ++++ po/gl.po | 4 ++++ po/he.po | 4 ++++ po/lv.po | 4 ++++ po/mr.po | 4 ++++ po/nl.po | 4 ++++ po/pa.po | 4 ++++ po/pl.po | 4 ++++ po/pt_BR.po | 4 ++++ po/ru.po | 4 ++++ po/sl.po | 4 ++++ po/sv.po | 4 ++++ po/uk.po | 4 ++++ po/vi.po | 4 ++++ po/zh_CN.po | 4 ++++ 23 files changed, 94 insertions(+), 5 deletions(-) diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c index 5f80b934f..cb3c19f55 100644 --- a/panels/network/cc-network-panel.c +++ b/panels/network/cc-network-panel.c @@ -1203,7 +1203,7 @@ refresh_header_ui (CcNetworkPanel *panel, NMDevice *device, const char *page_nam wid_name = g_strdup_printf ("label_%s_status", page_name); widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name)); g_free (wid_name); - str = panel_device_state_to_localized_string (type, state); + str = panel_device_state_to_localized_string (device); gtk_label_set_label (GTK_LABEL (widget), str); diff --git a/panels/network/panel-common.c b/panels/network/panel-common.c index 9867eb8cd..50f86c863 100644 --- a/panels/network/panel-common.c +++ b/panels/network/panel-common.c @@ -26,6 +26,7 @@ #include #include "panel-common.h" +#include "nm-device-ethernet.h" #include "nm-device-modem.h" /** @@ -174,8 +175,14 @@ panel_ap_mode_to_localized_string (NM80211Mode mode) * panel_device_state_to_localized_string: **/ const gchar * -panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state) +panel_device_state_to_localized_string (NMDevice *device) { + NMDeviceType type; + NMDeviceState state; + + type = nm_device_get_device_type (device); + state = nm_device_get_state (device); + const gchar *value = NULL; switch (state) { case NM_DEVICE_STATE_UNKNOWN: @@ -188,7 +195,10 @@ panel_device_state_to_localized_string (NMDeviceType type, NMDeviceState state) break; case NM_DEVICE_STATE_UNAVAILABLE: /* TRANSLATORS: device status */ - if (type == NM_DEVICE_TYPE_ETHERNET) + if (nm_device_get_firmware_missing (device)) + value = _("Firmware missing"); + else if (type == NM_DEVICE_TYPE_ETHERNET && + !nm_device_ethernet_get_carrier (NM_DEVICE_ETHERNET (device))) value = _("Cable unplugged"); else value = _("Unavailable"); diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h index bbf8936fb..d8e327598 100644 --- a/panels/network/panel-common.h +++ b/panels/network/panel-common.h @@ -33,8 +33,7 @@ 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_device_state_to_localized_string (NMDevice *device); const gchar *panel_vpn_state_to_localized_string (NMVPNConnectionState type); G_END_DECLS diff --git a/po/ar.po b/po/ar.po index 39fe0a206..f105f86b7 100644 --- a/po/ar.po +++ b/po/ar.po @@ -3981,3 +3981,7 @@ msgstr "_كل الإعدادات" #~ msgid "aterm" #~ msgstr "aterm" + +msgid "Firmware missing" +msgstr "البرمجية المغروسة غير متاحة" + diff --git a/po/bg.po b/po/bg.po index 1a39d4980..63d5af525 100644 --- a/po/bg.po +++ b/po/bg.po @@ -3645,3 +3645,7 @@ msgstr "" #~ msgid "Remove from System Items" #~ msgstr "Премахване от системните елементи" + +msgid "Firmware missing" +msgstr "липсва фърмуер" + diff --git a/po/ca.po b/po/ca.po index 3de84d274..6cd74fa51 100644 --- a/po/ca.po +++ b/po/ca.po @@ -3608,3 +3608,7 @@ msgstr "_Tots els paràmetres" #~ msgid "LowContrast" #~ msgstr "ContrastBaix" + +msgid "Firmware missing" +msgstr "manca el microprogramari" + diff --git a/po/de.po b/po/de.po index 60eba59fb..89cbd9ce6 100644 --- a/po/de.po +++ b/po/de.po @@ -3634,3 +3634,7 @@ msgstr "_Alle Einstellungen" #~ msgid "Failed" #~ msgstr "Fehlgeschlagen" + +msgid "Firmware missing" +msgstr "Firmware fehlt" + diff --git a/po/es.po b/po/es.po index d3e5d6cb6..09dafbac8 100644 --- a/po/es.po +++ b/po/es.po @@ -6321,3 +6321,7 @@ msgstr "_Todas las configuraciones" #~ msgid "No application with name '%s' registered a bookmark for '%s'" #~ msgstr "" #~ "Ninguna aplicación con el nombre «%s» registró un marcador para «%s»" + +msgid "Firmware missing" +msgstr "falta el «firmware»" + diff --git a/po/fr.po b/po/fr.po index 22a0fd99b..0e4332fe6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -3547,3 +3547,7 @@ msgstr "Centre de contrôle" msgid "_All Settings" msgstr "_Tous les paramètres" + +msgid "Firmware missing" +msgstr "micrologiciel absent" + diff --git a/po/gl.po b/po/gl.po index e440136a9..ca05fbdce 100644 --- a/po/gl.po +++ b/po/gl.po @@ -4931,3 +4931,7 @@ msgstr "_Todas as configuracións" #~ msgid "FONT-FILE OUTPUT-FILE" #~ msgstr "FICHEIRO-FONTE FICHEIRO-DE-SAÍDA" + +msgid "Firmware missing" +msgstr "falta o «firmware»" + diff --git a/po/he.po b/po/he.po index b48531354..11f4f3175 100644 --- a/po/he.po +++ b/po/he.po @@ -5790,3 +5790,7 @@ msgstr "_כל ההגדרות" #~ msgid "Unknown login ID, the user database might be corrupted" #~ msgstr "פרטי הגישה לא ידועים, ייתכן שמאגר המשתמשים שבור." + +msgid "Firmware missing" +msgstr "הקושחה חסרה" + diff --git a/po/lv.po b/po/lv.po index 7c5b12055..15bae1075 100644 --- a/po/lv.po +++ b/po/lv.po @@ -3672,3 +3672,7 @@ msgstr "Visi iest_atījumi" #~ msgid "Disable _Fingerprint Login..." #~ msgstr "Atslēgt pieteikšanos ar _pirkstu nospiedumu..." + +msgid "Firmware missing" +msgstr "trūkst aparātprogrammatūras" + diff --git a/po/mr.po b/po/mr.po index 1a1173b78..b537bf9ca 100644 --- a/po/mr.po +++ b/po/mr.po @@ -3528,3 +3528,7 @@ msgstr "%s उघडा" msgid "Remove from System Items" msgstr "प्रणाली घटक पासून काढूण टाका" + +msgid "Firmware missing" +msgstr "फर्मवेअर आढळले नाही" + diff --git a/po/nl.po b/po/nl.po index 268596319..3eb2b6019 100644 --- a/po/nl.po +++ b/po/nl.po @@ -5526,3 +5526,7 @@ msgstr "" #~ msgid "Work" #~ msgstr "Werk" + +msgid "Firmware missing" +msgstr "firmware ontbreekt" + diff --git a/po/pa.po b/po/pa.po index 25a002830..870721c7e 100644 --- a/po/pa.po +++ b/po/pa.po @@ -6895,3 +6895,7 @@ msgstr "ਸਭ ਸੈਟਿੰਗ(_A)" #~ msgid "Start screensaver" #~ msgstr "ਸਕਰੀਨ-ਸੇਵਰ ਸ਼ੁਰੂ ਕਰੋ" + +msgid "Firmware missing" +msgstr "ਫਿਰਮਵੇਅਰ ਮੌਜੂਦ ਨਹੀਂ ਹੈ" + diff --git a/po/pl.po b/po/pl.po index 04ef75202..92d57c34a 100644 --- a/po/pl.po +++ b/po/pl.po @@ -3524,3 +3524,7 @@ msgstr "Centrum sterowania" #: ../shell/shell.ui.h:2 msgid "_All Settings" msgstr "_Wszystkie ustawienia" + +msgid "Firmware missing" +msgstr "brak oprogramowania wbudowanego" + diff --git a/po/pt_BR.po b/po/pt_BR.po index 84f4a2953..65588e08f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -3559,3 +3559,7 @@ msgstr "Tod_as as configurações" #~ msgid "Mouse Orientation" #~ msgstr "Orientação do mouse" + +msgid "Firmware missing" +msgstr "firmware faltando" + diff --git a/po/ru.po b/po/ru.po index 5ef0ab8d8..7e39dd138 100644 --- a/po/ru.po +++ b/po/ru.po @@ -3463,3 +3463,7 @@ msgstr "Центр управления" msgid "_All Settings" msgstr "_Все параметры" + +msgid "Firmware missing" +msgstr "отсутствует прошивка" + diff --git a/po/sl.po b/po/sl.po index b08aa6cf1..922552a33 100644 --- a/po/sl.po +++ b/po/sl.po @@ -4855,3 +4855,7 @@ msgstr "_Vse nastavitve" #~ msgid "Don't check whether the notification area exists" #~ msgstr "Brez preverjanja ali opozorilni pult obstaja" + +msgid "Firmware missing" +msgstr "manjka strojna programska oprema" + diff --git a/po/sv.po b/po/sv.po index 0067a2d34..e63eb3aec 100644 --- a/po/sv.po +++ b/po/sv.po @@ -5514,3 +5514,7 @@ msgstr "_Alla inställningar" #~ "Godtag endast tangenter då de har tryckts ned och hållits nedtryckta " #~ "under en användardefinierad tid." + +msgid "Firmware missing" +msgstr "fast programvara saknas" + diff --git a/po/uk.po b/po/uk.po index fe9023136..7f015991b 100644 --- a/po/uk.po +++ b/po/uk.po @@ -3852,3 +3852,7 @@ msgstr "_Усі параметри" #~ msgid "Show password hints" #~ msgstr "Показувати підказки до паролів" + +msgid "Firmware missing" +msgstr "Бракує мікропрограми" + diff --git a/po/vi.po b/po/vi.po index ac630c0d4..31fad07ae 100644 --- a/po/vi.po +++ b/po/vi.po @@ -5536,3 +5536,7 @@ msgstr "_Tất cả thiết lập" #~ msgid "FONT-FILE OUTPUT-FILE" #~ msgstr "TẬP-TIN-PHÔNG TẬP-TIN-XUẤT" + +msgid "Firmware missing" +msgstr "thiếu firmware" + diff --git a/po/zh_CN.po b/po/zh_CN.po index 6ea139798..349935406 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -3735,3 +3735,7 @@ msgstr "全部设置(_A)" #~ msgid "Show password hints" #~ msgstr "显示密码提示" + +msgid "Firmware missing" +msgstr "固件缺失" +