From 2072ec939f8a9d0896fa44fabc98b055a7bfb4c9 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 8 Jun 2008 18:02:47 +0000 Subject: [PATCH] * applications/luci-olsr: Translation --- .../luci-olsr/luasrc/controller/olsr.lua | 10 ++- .../luci-olsr/luasrc/i18n/olsr.de.lua | 40 +++++++++ .../luci-olsr/luasrc/i18n/olsr.en.lua | 38 +++++++++ .../luci-olsr/luasrc/model/cbi/olsr/olsrd.lua | 84 ++++++++++--------- .../luasrc/view/status-olsr/error_olsr.htm | 4 +- .../luasrc/view/status-olsr/index.htm | 10 +-- .../luci-olsr/luasrc/view/status-olsr/mid.htm | 2 +- .../luasrc/view/status-olsr/routes.htm | 2 +- .../luasrc/view/status-olsr/topology.htm | 4 +- i18n/english/luasrc/i18n/default.en.lua | 4 + 10 files changed, 144 insertions(+), 54 deletions(-) create mode 100644 applications/luci-olsr/luasrc/i18n/olsr.de.lua create mode 100644 applications/luci-olsr/luasrc/i18n/olsr.en.lua diff --git a/applications/luci-olsr/luasrc/controller/olsr.lua b/applications/luci-olsr/luasrc/controller/olsr.lua index d795dc4ed6..a00dc3c547 100644 --- a/applications/luci-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-olsr/luasrc/controller/olsr.lua @@ -5,18 +5,22 @@ function index() return end + require("luci.i18n").loadc("olsr") + local i18n = luci.i18n.translate + local page = node("admin", "status", "olsr") page.target = call("action_index") page.title = "OLSR" + page.i18n = "olsr" local page = node("admin", "status", "olsr", "routes") page.target = call("action_routes") - page.title = "Routen" + page.title = i18n("olsr_routes", "Routen") page.order = 10 local page = node("admin", "status", "olsr", "topology") page.target = call("action_topology") - page.title = "Topologie" + page.title = i18n("olsr_topology", "Topologie") page.order = 20 local page = node("admin", "status", "olsr", "hna") @@ -29,7 +33,7 @@ function index() page.title = "MID" page.order = 50 - entry({"admin", "services", "olsrd"}, cbi("olsr/olsrd"), "OLSR") + entry({"admin", "services", "olsrd"}, cbi("olsr/olsrd"), "OLSR").i18n = "olsr" end function action_index() diff --git a/applications/luci-olsr/luasrc/i18n/olsr.de.lua b/applications/luci-olsr/luasrc/i18n/olsr.de.lua new file mode 100644 index 0000000000..28dd740ce4 --- /dev/null +++ b/applications/luci-olsr/luasrc/i18n/olsr.de.lua @@ -0,0 +1,40 @@ +olsr_routes = "Routen" +olsr_topology = "Topologie" +olsr_error1 = [[Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!]] +olsr_error2 = [[Um die Statusinformationen abfragen zu können muss der OLSR-Daemon gestartet +und das Plugin "txtinfo" geladen sein.]] +olsr_links = "OLSR-Verbindungen" +olsr_links1 = "Übersicht über aktuell bestehende OLSR-Verbindungen" +olsrlinks_lq1 = "Erfolgsquote gesendeter Pakete" +olsrlinks_nlq1 = "Erfolgsquote empfangener Pakete" +olsrlinks_etx1 = "Zu erwartende Sendeversuche pro Paket" +olsr_mid = "MID" + +olsr_desc = [[OLSR ist ein flexibles Routingprotokoll, +dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]] +olsr_general = "Allgemeine Einstellungen" +olsr_general_debuglevel = "Debugmodus" +olsr_general_ipversion = "Internet Protokoll" +olsr_general_allownoint = "Start ohne Netzwerk" +olsr_general_pollrate = "Abfragerate" +olsr_general_tcredundancy = "TC-Redundanz" +olsr_general_tcredundancy_0 = "MPR-Selektoren" +olsr_general_tcredundancy_1 = "MPR-Selektoren und MPR" +olsr_general_tcredundancy_2 = "Alle Nachbarn" +olsr_general_mprcoverage = "MPR-Erfassung" +olsr_general_linkqualitylevel = "VQ-Level" +olsr_general_linkqualitylevel_1 = "MPR-Auswahl" +olsr_general_linkqualitylevel_2 = "MPR-Auswahl und Routing" +olsr_general_linkqualityfisheye = "VQ-Fisheye" +olsr_general_linkqualitywinsize = "VQ-Fenstergröße" +olsr_general_linkqualitydijkstralimit = "VQ-Dijkstralimit" +olsr_general_usehysteresis = "Hysterese aktivieren" +olsr_interface_hellointerval = "Hello-Intervall" +olsr_interface_hellovaliditytime = "Hello-Gültigkeit" +olsr_interface_tcinterval = "TC-Intervall" +olsr_interface_tcvaliditytime = "TC-Gültigkeit" +olsr_interface_midinterval = "MID-Intervall" +olsr_interface_midvaliditytime = "MID-Gültigkeit" +olsr_interface_hnainterval = "HNA-Intervall" +olsr_interface_hnavaliditytime = "HNA-Gültigkeit" +olsr_loadplugin = "Plugins" \ No newline at end of file diff --git a/applications/luci-olsr/luasrc/i18n/olsr.en.lua b/applications/luci-olsr/luasrc/i18n/olsr.en.lua new file mode 100644 index 0000000000..2b2dd0adbe --- /dev/null +++ b/applications/luci-olsr/luasrc/i18n/olsr.en.lua @@ -0,0 +1,38 @@ +olsr_routes = "Routes" +olsr_topology = "Topology" +olsr_error1 = [[Unable to connect to the OLSR daemon.]] +olsr_error2 = [[To collect status information start the OLSR-Daemon and enable the "txtinfo"-Plugin]] +olsr_links = "OLSR-Connections" +olsr_links1 = "Overview over current OLSR connections" +olsrlinks_lq1 = "Success rate of transmitted packets" +olsrlinks_nlq1 = "Success rate of received packets" +olsrlinks_etx1 = "Expected transmission tries per packet" +olsr_mid = "MID" + +olsr_desc = [[OLSR is a flexible routing protocol that supports building mobile ad-hoc networks.]] +olsr_general = "General settings" +olsr_general_debuglevel = "Debugmode" +olsr_general_ipversion = "Internet Protocol" +olsr_general_allownoint = "Start without network" +olsr_general_pollrate = "Pollrate" +olsr_general_tcredundancy = "TC-Redundancy" +olsr_general_tcredundancy_0 = "MPR-Selectors" +olsr_general_tcredundancy_1 = "MPR-Selectors and MPR" +olsr_general_tcredundancy_2 = "All Neighbors" +olsr_general_mprcoverage = "MPR-Coverage" +olsr_general_linkqualitylevel = "LQ-Level" +olsr_general_linkqualitylevel_1 = "MPR-Selection" +olsr_general_linkqualitylevel_2 = "MPR-Selection and Routing" +olsr_general_linkqualityfisheye = "LQ-Fisheye" +olsr_general_linkqualitywinsize = "LQ-Windowsize" +olsr_general_linkqualitydijkstralimit = "LQ-Dijkstralimit" +olsr_general_usehysteresis = "Use hysteresis" +olsr_interface_hellointerval = "Hello-Interval" +olsr_interface_hellovaliditytime = "Hello-Validity" +olsr_interface_tcinterval = "TC-Interval" +olsr_interface_tcvaliditytime = "TC-Validity" +olsr_interface_midinterval = "MID-Interval" +olsr_interface_midvaliditytime = "MID-Validity" +olsr_interface_hnainterval = "HNA-Interval" +olsr_interface_hnavaliditytime = "HNA-Validity" +olsr_loadplugin = "Plugins" \ No newline at end of file diff --git a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua index 3e3c68dff5..c8fe03edd0 100644 --- a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua +++ b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua @@ -1,55 +1,66 @@ --- ToDo: Autodetect things, Translate, Add descriptions +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- require("luci.fs") -m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll, -dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]]) +m = Map("olsr", "OLSR") -s = m:section(NamedSection, "general", "olsr", "Allgemeine Einstellungen") +s = m:section(NamedSection, "general", "olsr") -debug = s:option(ListValue, "DebugLevel", "Debugmodus") +debug = s:option(ListValue, "DebugLevel") for i=0, 9 do debug:value(i) end -ipv = s:option(ListValue, "IpVersion", "Internet Protokoll") +ipv = s:option(ListValue, "IpVersion") ipv:value("4", "IPv4") ipv:value("6", "IPv6") -noint = s:option(Flag, "AllowNoInt", "Start ohne Netzwerk") +noint = s:option(Flag, "AllowNoInt") noint.enabled = "yes" noint.disabled = "no" -s:option(Value, "Pollrate", "Abfragerate (Pollrate)", "s") +s:option(Value, "Pollrate") -tcr = s:option(ListValue, "TcRedundancy", "TC-Redundanz") -tcr:value("0", "MPR-Selektoren") -tcr:value("1", "MPR-Selektoren und MPR") -tcr:value("2", "Alle Nachbarn") +tcr = s:option(ListValue, "TcRedundancy") +tcr:value("0", translate("olsr_general_TcRedundancy_0", "MPR-Selektoren")) +tcr:value("1", translate("olsr_general_TcRedundancy_1", "MPR-Selektoren und MPR")) +tcr:value("2", translate("olsr_general_TcRedundancy_2", "Alle Nachbarn")) -s:option(Value, "MprCoverage", "MPR-Erfassung") +s:option(Value, "MprCoverage") -lql = s:option(ListValue, "LinkQualityLevel", "VQ-Level") -lql:value("0", "deaktiviert") -lql:value("1", "MPR-Auswahl") -lql:value("2", "MPR-Auswahl und Routing") +lql = s:option(ListValue, "LinkQualityLevel") +lql:value("0", translate("disable", "deaktivieren")) +lql:value("1", translate("olsr_general_LinkQualityLevel_1", "MPR-Auswahl")) +lql:value("2", translate("olsr_general_LinkQualityLevel_2", "MPR-Auswahl und Routing")) -lqfish = s:option(Flag, "LinkQualityFishEye", "VQ-Fisheye") +lqfish = s:option(Flag, "LinkQualityFishEye") -s:option(Value, "LinkQualityWinSize", "VQ-Fenstergröße") +s:option(Value, "LinkQualityWinSize") -s:option(Value, "LinkQualityDijkstraLimit", "VQ-Dijkstralimit") +s:option(Value, "LinkQualityDijkstraLimit") -hyst = s:option(Flag, "UseHysteresis", "Hysterese aktivieren") +hyst = s:option(Flag, "UseHysteresis") hyst.enabled = "yes" hyst.disabled = "no" -i = m:section(TypedSection, "Interface", "Schnittstellen") +i = m:section(TypedSection, "Interface", translate("interfaces", "Schnittstellen")) i.anonymous = true i.addremove = true i.dynamic = true -network = i:option(ListValue, "Interface", "Netzwerkschnittstellen") +network = i:option(ListValue, "Interface", translate("network", "Netzwerk")) network:value("") luci.model.uci.foreach("network", "interface", function (section) @@ -58,28 +69,21 @@ luci.model.uci.foreach("network", "interface", end end) -i:option(Value, "HelloInterval", "Hello-Intervall") - -i:option(Value, "HelloValidityTime", "Hello-Gültigkeit") - -i:option(Value, "TcInterval", "TC-Intervall") - -i:option(Value, "TcValidityTime", "TC-Gültigkeit") - -i:option(Value, "MidInterval", "MID-Intervall") - -i:option(Value, "MidValidityTime", "MID-Gültigkeit") - -i:option(Value, "HnaInterval", "HNA-Intervall") - -i:option(Value, "HnaValidityTime", "HNA-Gültigkeit") +i:option(Value, "HelloInterval") +i:option(Value, "HelloValidityTime") +i:option(Value, "TcInterval") +i:option(Value, "TcValidityTime") +i:option(Value, "MidInterval") +i:option(Value, "MidValidityTime") +i:option(Value, "HnaInterval") +i:option(Value, "HnaValidityTime") -p = m:section(TypedSection, "LoadPlugin", "Plugins") +p = m:section(TypedSection, "LoadPlugin") p.addremove = true p.dynamic = true -lib = p:option(ListValue, "Library", "Bibliothek") +lib = p:option(ListValue, "Library", translate("library", "Bibliothek")) lib:value("") for k, v in pairs(luci.fs.dir("/usr/lib")) do if v:sub(1, 6) == "olsrd_" then diff --git a/applications/luci-olsr/luasrc/view/status-olsr/error_olsr.htm b/applications/luci-olsr/luasrc/view/status-olsr/error_olsr.htm index 25426f50d7..c88ddfc338 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/error_olsr.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/error_olsr.htm @@ -1,6 +1,6 @@ <%+header%>

<%:olsr OLSR%>

-

<%:olsrerror1 Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!%>

-

<%:olsrerror2 Um die Statusinformationen abfragen zu können muss der OLSR-Daemon gestartet +

<%:olsr_error1 Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!%>

+

<%:olsr_error2 Um die Statusinformationen abfragen zu können muss der OLSR-Daemon gestartet und das Plugin "txtinfo" geladen sein.%>

<%+footer%> \ No newline at end of file diff --git a/applications/luci-olsr/luasrc/view/status-olsr/index.htm b/applications/luci-olsr/luasrc/view/status-olsr/index.htm index 0633d1f456..8a49232ee1 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/index.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/index.htm @@ -1,6 +1,6 @@ <%+header%> -

<%:olsrlinks OLSR-Verbindungen%>

-

<%:olsrlinks1 Übersicht über aktuell bestehende OLSR-Verbindungen%>

+

<%:olsr_links OLSR-Verbindungen%>

+

<%:olsr_links1 Übersicht über aktuell bestehende OLSR-Verbindungen%>


@@ -36,8 +36,8 @@

<%:legend Legende%>:

<%+footer%> \ No newline at end of file diff --git a/applications/luci-olsr/luasrc/view/status-olsr/mid.htm b/applications/luci-olsr/luasrc/view/status-olsr/mid.htm index 6553237ea5..fb29e7dfaf 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/mid.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/mid.htm @@ -1,5 +1,5 @@ <%+header%> -

<%:olsrmid OLSR-MID%>

+

<%:olsr_mid OLSR-MID%>


diff --git a/applications/luci-olsr/luasrc/view/status-olsr/routes.htm b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm index f3a0fd3366..4840bf655f 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/routes.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm @@ -1,5 +1,5 @@ <%+header%> -

<%:olsrlinks OLSR-Routen%>

+

<%:olsr_routes OLSR-Routen%>


diff --git a/applications/luci-olsr/luasrc/view/status-olsr/topology.htm b/applications/luci-olsr/luasrc/view/status-olsr/topology.htm index c622026d48..1293197940 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/topology.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/topology.htm @@ -1,10 +1,10 @@ <%+header%> -

<%:olsrtopo OLSR-Topologie%>

+

<%:olsr_topology OLSR-Topologie%>


- + diff --git a/i18n/english/luasrc/i18n/default.en.lua b/i18n/english/luasrc/i18n/default.en.lua index ef63a7539d..cc837b9ce8 100644 --- a/i18n/english/luasrc/i18n/default.en.lua +++ b/i18n/english/luasrc/i18n/default.en.lua @@ -38,6 +38,9 @@ interface = "Interface" interfaces = "Interfaces" ipaddress = "IP-Address" +legend = "Legende" +library = "Library" + key = "Key" language = "Language" @@ -46,6 +49,7 @@ load = "Load" macaddress = "MAC-Address" manpage = "see '%s' manpage" +metric = "Metric" mode = "Mode" name = "Name" -- 2.30.2
<%:destination Ziel%><%:lasthop Letzter Router%><%:olsr_lasthop Letzter Router%> LQ ILQ ETX