* luci/modules/admin-full: only display interface protocols that are actually supported

* luci/18n: add prereq description for interface proto to translations
This commit is contained in:
Jo-Philipp Wich 2008-10-23 18:19:27 +00:00
parent 222fe69ac6
commit 02ef5ea6fb
7 changed files with 28 additions and 8 deletions

View File

@ -195,6 +195,7 @@ dhcp_timeremain = 'Leasetime remaining'
dhcp_leases_active = 'Active Leases'
a_n_ptp = 'Point-to-Point Connections'
a_n_ptp1 = 'Point-to-Point connections with <abbr title="Point-to-Point Protocol over Ethernet">PPPoE</abbr> or <abbr title="Point-to-Point Tunneling Protocol">PPTP</abbr> are often used to connect a device over <abbr title="Digital Subscriber Line">DSL</abbr> or similar technologies to an internet access point.'
network_interface_prereq = 'You need to install &quot;comgt&quot; for UMTS/GPRS, &quot;ppp-mod-pppoe&quot; for PPPoE, &quot;ppp-mod-pppoa&quot; for PPPoA or &quot;pptp&quot; for PPtP support'
network_interface_server = '<abbr title="Point-to-Point Tunneling Protocol">PPTP</abbr>-Server'
network_interface_demand = 'Automatic Disconnect'
network_interface_demand_desc = 'Time (in seconds) after which an unused connection will be closed'

View File

@ -199,6 +199,7 @@
<i18n:msg xml:id="dhcp_leases_active">Active Leases</i18n:msg>
<i18n:msg xml:id="a_n_ptp">Point-to-Point Connections</i18n:msg>
<i18n:msg xml:id="a_n_ptp1">Point-to-Point connections with <abbr title="Point-to-Point Protocol over Ethernet">PPPoE</abbr> or <abbr title="Point-to-Point Tunneling Protocol">PPTP</abbr> are often used to connect a device over <abbr title="Digital Subscriber Line">DSL</abbr> or similar technologies to an internet access point.</i18n:msg>
<i18n:msg xml:id="network_interface_prereq">You need to install "comgt" for UMTS/GPRS, "ppp-mod-pppoe" for PPPoE, "ppp-mod-pppoa" for PPPoA or "pptp" for PPtP support</i18n:msg>
<i18n:msg xml:id="network_interface_server"><abbr title="Point-to-Point Tunneling Protocol">PPTP</abbr>-Server</i18n:msg>
<i18n:msg xml:id="network_interface_demand">Automatic Disconnect</i18n:msg>
<i18n:msg xml:id="network_interface_demand_desc">Time (in seconds) after which an unused connection will be closed</i18n:msg>

View File

@ -198,6 +198,7 @@ dhcp_leases = 'Zuweisungen'
luci_ethers = 'Statische Einträge'
dhcp_timeremain = 'Verbleibende Gültigkeit'
dhcp_leases_active = 'Aktive Zuweisungen'
network_interface_prereq = 'Für die Unterstützung von UMTS/GPRS muss &quot;comgt&quot;, für PPPoE &quot;ppp-mod-pppoe&quot;, für PPPoA &quot;ppp-mod-pppoa&quot; und für PPtP &quot;pptp&quot; installiert sein'
network_interface_demand = 'Automatische Trennung'
network_interface_demand_desc = 'Zeit (in s) nach der die Verbindung bei Inaktivität getrennt wird'
network_interface_keepalive = 'Keep-Alive'

View File

@ -205,6 +205,7 @@
<i18n:msg xml:id="dhcp_timeremain">Verbleibende Gültigkeit</i18n:msg>
<i18n:msg xml:id="dhcp_leases_active">Aktive Zuweisungen</i18n:msg>
<i18n:msg xml:id="network_interface_prereq">Für die Unterstützung von UMTS/GPRS muss "comgt", für PPPoE "ppp-mod-pppoe", für PPPoA "ppp-mod-pppoa" und für PPtP "pptp" installiert sein</i18n:msg>
<i18n:msg xml:id="network_interface_demand">Automatische Trennung</i18n:msg>
<i18n:msg xml:id="network_interface_demand_desc">Zeit (in s) nach der die Verbindung bei Inaktivität getrennt wird</i18n:msg>
<i18n:msg xml:id="network_interface_keepalive">Keep-Alive</i18n:msg>

View File

@ -195,6 +195,7 @@ dhcp_timeremain = 'Tempo de lease restante'
dhcp_leases_active = 'Leases Ativos'
a_n_ptp = 'Conexões Ponto-a-Ponto'
a_n_ptp1 = 'Conexões Ponto-a-Ponto com <abbr title="Protocolo Ponto-a-Ponto sobre Ethernet">PPPoE</abbr> ou <abbr title="Protocolo de Tunelamento Ponto-a-Ponto">PPTP</abbr> muitas vezes são usados para conectar um dispositivo sobre <abbr title="Linha Digital de Assinante">DSL</abbr> ou tecnologia similar para um ponto de acesso à internet.'
network_interface_prereq = 'You need to install &quot;comgt&quot; for UMTS/GPRS, &quot;ppp-mod-pppoe&quot; for PPPoE, &quot;ppp-mod-pppoa&quot; for PPPoA or &quot;pptp&quot; for PPtP support'
network_interface_server = 'Servidor-<abbr title="Protocolo de Tunelamento Ponto-a-Ponto">PPTP</abbr>'
network_interface_demand = 'Desconexão Automática'
network_interface_demand_desc = 'Tempo (em segundos) para desconexão de uma conexão não mais utilizada'

View File

@ -166,9 +166,9 @@
<i18n:msg xml:id="dhcp_dnsmasq_dhcpleasemax"><abbr title="máximo">max.</abbr> de <abbr title="Protocolo de Configuração Dinâmica de Hosts">DHCP</abbr>-Leases</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_addnhosts">arquivo host adicional</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_queryport">porta para consulta</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_enabletftp">Ativar servidor TFTP</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_tftproot">Diretório raiz do servidor TFTP</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_dhcpboot">Imagem para o boot remoto</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_enabletftp">Ativar servidor TFTP</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_tftproot">Diretório raiz do servidor TFTP</i18n:msg>
<i18n:msg xml:id="dhcp_dnsmasq_dhcpboot">Imagem para o boot remoto</i18n:msg>
<i18n:msg xml:id="a_n_switch">Switch</i18n:msg>
<i18n:msg xml:id="a_n_conntrack">Conexões Ativas</i18n:msg>
<i18n:msg xml:id="a_n_conntrack_desc">Esta página fornece informações sobre as conexões de rede ativas.</i18n:msg>
@ -199,6 +199,7 @@
<i18n:msg xml:id="dhcp_leases_active">Leases Ativos</i18n:msg>
<i18n:msg xml:id="a_n_ptp">Conexões Ponto-a-Ponto</i18n:msg>
<i18n:msg xml:id="a_n_ptp1">Conexões Ponto-a-Ponto com <abbr title="Protocolo Ponto-a-Ponto sobre Ethernet">PPPoE</abbr> ou <abbr title="Protocolo de Tunelamento Ponto-a-Ponto">PPTP</abbr> muitas vezes são usados para conectar um dispositivo sobre <abbr title="Linha Digital de Assinante">DSL</abbr> ou tecnologia similar para um ponto de acesso à internet.</i18n:msg>
<i18n:msg xml:id="network_interface_prereq">You need to install "comgt" for UMTS/GPRS, "ppp-mod-pppoe" for PPPoE, "ppp-mod-pppoa" for PPPoA or "pptp" for PPtP support</i18n:msg>
<i18n:msg xml:id="network_interface_server">Servidor-<abbr title="Protocolo de Tunelamento Ponto-a-Ponto">PPTP</abbr></i18n:msg>
<i18n:msg xml:id="network_interface_demand">Desconexão Automática</i18n:msg>
<i18n:msg xml:id="network_interface_demand_desc">Tempo (em segundos) para desconexão de uma conexão não mais utilizada</i18n:msg>

View File

@ -12,8 +12,16 @@ You may obtain a copy of the License at
$Id$
]]--
require("luci.tools.webadmin")
arg[1] = arg[1] or ""
local has_3g = luci.fs.mtime("/usr/bin/gcom")
local has_pptp = luci.fs.mtime("/usr/sbin/pptp")
local has_pppd = luci.fs.mtime("/usr/sbin/pppd")
local has_pppoe = luci.fs.glob("/usr/lib/pppd/*/rp-pppoe.so")
local has_pppoa = luci.fs.glob("/usr/lib/pppd/*/pppoatm.so")
m = Map("network", translate("interfaces"), translate("a_n_ifaces1"))
s = m:section(NamedSection, arg[1], "interface")
@ -24,13 +32,19 @@ back.value = ""
back.titleref = luci.dispatcher.build_url("admin", "network", "network")
p = s:option(ListValue, "proto", translate("protocol"))
p.override_scheme = true
p.default = "static"
p:value("static", translate("static"))
p:value("dhcp", "DHCP")
p:value("pppoe", "PPPoE")
p:value("ppp", "PPP")
p:value("3g", "UMTS/3G")
p:value("pptp", "PPTP")
p.default = "static"
if has_pppd then p:value("ppp", "PPP") end
if has_pppoe then p:value("pppoe", "PPPoE") end
if has_pppoa then p:value("pppoa", "PPPoA") end
if has_3g then p:value("3g", "UMTS/3G") end
if has_pptp then p:value("pptp", "PPTP") end
if not ( has_pppd and has_pppoe and has_pppoa and has_3g and has_pptp ) then
p.description = translate("network_interface_prereq")
end
br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1"))
br.enabled = "bridge"