2
* Copyright (C) 2014 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Jonas G. Drange <jonas.drange@canonical.com>
26
The mapping of code to string is taken from
27
http://bazaar.launchpad.net/~vcs-imports/
28
network-manager/trunk/view/head:/cli/src/common.c
30
NetworkManager documentation: https://developer.gnome.org/
31
NetworkManager/0.9/spec.html#type-NM_DEVICE_STATE_REASON
33
function reasonToString (reason) {
36
return i18n.tr("Unknown error");
38
return i18n.tr("No reason given");
40
return i18n.tr("Device is now managed");
42
return i18n.tr("Device is now unmanaged");
44
return i18n.tr("The device could not be readied for configuration");
46
return i18n.tr("IP configuration could not be reserved (no available address, timeout, etc.)");
48
return i18n.tr("The IP configuration is no longer valid");
50
return i18n.tr("Your authentication details were incorrect");
52
return i18n.tr("802.1X supplicant disconnected");
54
return i18n.tr("802.1X supplicant configuration failed");
56
return i18n.tr("802.1X supplicant failed");
58
return i18n.tr("802.1X supplicant took too long to authenticate");
60
return i18n.tr("DHCP client failed to start");
62
return i18n.tr("DHCP client error");
64
return i18n.tr("DHCP client failed");
66
return i18n.tr("Shared connection service failed to start");
68
return i18n.tr("Shared connection service failed");
70
return i18n.tr("Necessary firmware for the device may be missing");
72
return i18n.tr("The device was removed");
74
return i18n.tr("NetworkManager went to sleep");
76
return i18n.tr("The device's active connection disappeared");
78
return i18n.tr("Device disconnected by user or client");
80
return i18n.tr("The device's existing connection was assumed");
82
return i18n.tr("The supplicant is now available");
84
return i18n.tr("The modem could not be found");
86
return i18n.tr("The Bluetooth connection failed or timed out");
88
return i18n.tr("A dependency of the connection failed");
90
return i18n.tr("ModemManager is unavailable");
92
return i18n.tr("The Wi-Fi network could not be found");
94
return i18n.tr("A secondary connection of the base connection failed");
96
return i18n.tr("Unknown");