gluon-luci-portconfig: i18n

This commit is contained in:
Matthias Schiffer 2015-05-04 02:10:29 +02:00
parent fe265126a9
commit cdc16af1bd
5 changed files with 72 additions and 26 deletions

View File

@ -4,12 +4,14 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-luci-portconfig PKG_NAME:=gluon-luci-portconfig
PKG_VERSION:=0.1 PKG_VERSION:=1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk include $(GLUONDIR)/include/package.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-luci-portconfig define Package/gluon-luci-portconfig
SECTION:=gluon SECTION:=gluon
@ -18,10 +20,6 @@ define Package/gluon-luci-portconfig
DEPENDS:=+gluon-luci-admin +gluon-mesh-batman-adv DEPENDS:=+gluon-luci-admin +gluon-mesh-batman-adv
endef endef
define Package/gluon-luci-portconfig/description
Luci module for advanced ethernet port configuration
endef
define Build/Prepare define Build/Prepare
mkdir -p $(PKG_BUILD_DIR) mkdir -p $(PKG_BUILD_DIR)
endef endef
@ -30,10 +28,12 @@ define Build/Configure
endef endef
define Build/Compile define Build/Compile
$(call GluonBuildI18N,gluon-luci-portconfig,i18n)
endef endef
define Package/gluon-luci-portconfig/install define Package/gluon-luci-portconfig/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(call GluonInstallI18N,gluon-luci-portconfig,$(1))
endef endef
$(eval $(call BuildPackage,gluon-luci-portconfig)) $(eval $(call BuildPackage,gluon-luci-portconfig))

View File

@ -15,6 +15,5 @@ $Id$
module("luci.controller.admin.portconfig", package.seeall) module("luci.controller.admin.portconfig", package.seeall)
function index() function index()
entry({"admin", "portconfig"}, cbi("admin/portconfig"), _("Schnittstellen"), 20) entry({"admin", "portconfig"}, cbi("admin/portconfig"), _("Network"), 20)
end end

View File

@ -18,35 +18,33 @@ local wan = uci:get_all("network", "wan")
local wan6 = uci:get_all("network", "wan6") local wan6 = uci:get_all("network", "wan6")
local dns = uci:get_first("gluon-wan-dnsmasq", "static") local dns = uci:get_first("gluon-wan-dnsmasq", "static")
local f = SimpleForm("portconfig", "WAN-Verbindung") local f = SimpleForm("portconfig", translate("WAN connection"))
f.template = "admin/expertmode" f.template = "admin/expertmode"
f.submit = "Speichern"
f.reset = "Zurücksetzen"
local s local s
local o local o
s = f:section(SimpleSection, nil, nil) s = f:section(SimpleSection, nil, nil)
o = s:option(ListValue, "ipv4", "IPv4") o = s:option(ListValue, "ipv4", translate("IPv4"))
o:value("dhcp", "Automatisch (DHCP)") o:value("dhcp", translate("Automatic (DHCP)"))
o:value("static", "Statisch") o:value("static", translate("Static"))
o:value("none", "Deaktiviert") o:value("none", translate("Disabled"))
o.default = wan.proto o.default = wan.proto
o = s:option(Value, "ipv4_addr", "IP-Adresse") o = s:option(Value, "ipv4_addr", translate("IP address"))
o:depends("ipv4", "static") o:depends("ipv4", "static")
o.value = wan.ipaddr o.value = wan.ipaddr
o.datatype = "ip4addr" o.datatype = "ip4addr"
o.rmempty = false o.rmempty = false
o = s:option(Value, "ipv4_netmask", "Netzmaske") o = s:option(Value, "ipv4_netmask", translate("Netmask"))
o:depends("ipv4", "static") o:depends("ipv4", "static")
o.value = wan.netmask or "255.255.255.0" o.value = wan.netmask or "255.255.255.0"
o.datatype = "ip4addr" o.datatype = "ip4addr"
o.rmempty = false o.rmempty = false
o = s:option(Value, "ipv4_gateway", "Gateway") o = s:option(Value, "ipv4_gateway", translate("Gateway"))
o:depends("ipv4", "static") o:depends("ipv4", "static")
o.value = wan.gateway o.value = wan.gateway
o.datatype = "ip4addr" o.datatype = "ip4addr"
@ -55,19 +53,19 @@ o.rmempty = false
s = f:section(SimpleSection, nil, nil) s = f:section(SimpleSection, nil, nil)
o = s:option(ListValue, "ipv6", "IPv6") o = s:option(ListValue, "ipv6", translate("IPv6"))
o:value("dhcpv6", "Automatisch (RA/DHCPv6)") o:value("dhcpv6", translate("Automatic (RA/DHCPv6)"))
o:value("static", "Statisch") o:value("static", translate("Static"))
o:value("none", "Deaktiviert") o:value("none", translate("Disabled"))
o.default = wan6.proto o.default = wan6.proto
o = s:option(Value, "ipv6_addr", "IP-Adresse") o = s:option(Value, "ipv6_addr", translate("IP address"))
o:depends("ipv6", "static") o:depends("ipv6", "static")
o.value = wan6.ip6addr o.value = wan6.ip6addr
o.datatype = "ip6addr" o.datatype = "ip6addr"
o.rmempty = false o.rmempty = false
o = s:option(Value, "ipv6_gateway", "Gateway") o = s:option(Value, "ipv6_gateway", translate("Gateway"))
o:depends("ipv6", "static") o:depends("ipv6", "static")
o.value = wan6.ip6gw o.value = wan6.ip6gw
o.datatype = "ip6addr" o.datatype = "ip6addr"
@ -77,14 +75,14 @@ o.rmempty = false
if dns then if dns then
s = f:section(SimpleSection, nil, nil) s = f:section(SimpleSection, nil, nil)
o = s:option(DynamicList, "dns", "Statische DNS-Server") o = s:option(DynamicList, "dns", translate("Static DNS servers"))
o:write(nil, uci:get("gluon-wan-dnsmasq", dns, "server")) o:write(nil, uci:get("gluon-wan-dnsmasq", dns, "server"))
o.datatype = "ipaddr" o.datatype = "ipaddr"
end end
s = f:section(SimpleSection, nil, nil) s = f:section(SimpleSection, nil, nil)
o = s:option(Flag, "mesh_wan", "Mesh auf dem WAN-Port aktivieren") o = s:option(Flag, "mesh_wan", translate("Enable meshing on the WAN interface"))
o.default = uci:get_bool("network", "mesh_wan", "auto") and o.enabled or o.disabled o.default = uci:get_bool("network", "mesh_wan", "auto") and o.enabled or o.disabled
o.rmempty = false o.rmempty = false

View File

@ -0,0 +1,29 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-05-04 02:08+0200\n"
"Last-Translator: <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Automatic (DHCP)"
msgstr "Automatisch (DHCP)"
msgid "Automatic (RA/DHCPv6)"
msgstr "Automatisch (RA/DHCPv6)"
msgid "Enable meshing on the WAN interface"
msgstr "Mesh auf dem WAN-Port aktivieren"
msgid "Static"
msgstr "Statisch"
msgid "Static DNS servers"
msgstr "Statische DNS-Server"
msgid "WAN connection"
msgstr "WAN-Verbindung"

View File

@ -0,0 +1,20 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Automatic (DHCP)"
msgstr ""
msgid "Automatic (RA/DHCPv6)"
msgstr ""
msgid "Enable meshing on the WAN interface"
msgstr ""
msgid "Static"
msgstr ""
msgid "Static DNS servers"
msgstr ""
msgid "WAN connection"
msgstr ""