diff --git a/i18n/english/luasrc/i18n/admin-core.en b/i18n/english/luasrc/i18n/admin-core.en index 2e96bdb506..13d176ce79 100644 --- a/i18n/english/luasrc/i18n/admin-core.en +++ b/i18n/english/luasrc/i18n/admin-core.en @@ -17,21 +17,75 @@ to your feedback and suggestions.]] a_i_i_admin6 = "And now have fun with your router!" a_i_i_team = "The LuCI Team" -a_i_status1 = [[Here you can find information about the current system status like CPU clock frequency, memory +a_i_luci1 = "Here you can customize the settings and the functionality of LuCI." +a_i_ucicommit = "Post-commit actions" +a_i_ucicommit1 = [[These commands will be executed automatically when a given UCI configuration is committed allowing +changes to be applied instantly.]] +a_i_keepflash = "Files to be kept when flashing a new firmware" +a_i_keepflash1 = "When flashing a new firmware with LuCI these files will be added to the new firmware installation." + +a_st_i_status1 = [[Here you can find information about the current system status like CPU clock frequency, memory usage or network interface data.]] -a_i_status2 = [[Also kernel or service logfiles can be viewed here to get an overview over their current state.]] +a_st_i_status2 = [[Also kernel or service logfiles can be viewed here to get an overview over their current state.]] a_s_packages = "Software" a_s_changepw = "Admin Password" -a_s_ipkg = "IPKG-Configuration" +a_s_p_ipkg = "IPKG-Configuration" a_s_sshkeys = "SSH-Keys" a_s_fstab = "Mount Points" +a_s_flash = "Flash Firmware" -luci1 = "Here you can customize the settings and the functionality of LuCI." -language = "Language" -general = "General" -ucicommit = "Post-commit actions" -ucicommit1 = [[These commands will be executed automatically when a given UCI configuration is committed allowing -changes to be applied instantly.]] -keepflash = "Files to be kept when flashing a new firmware" -keepflash1 = "When flashing a new firmware with LuCI these files will be added to the new firmware installation." \ No newline at end of file +a_s_i_system1 = [[Change settings related to the system itself, its identification, +installed hard- and software, authentication or mount points.]] +a_s_i_system2 = [[These settings define the base of your system.]] +a_s_i_system3 = [[Pay attention as any misconfiguration here may prevent your device from booting +or may lock yourself out of it.]] + +a_s_packages_do = "Perform Actions" +a_s_packages_install = "Install" +a_s_packages_installurl = "Download and install package" +a_s_packages_ipkg = "Edit package lists and installation targets" +a_s_packages_name = "Paketname" +a_s_packages_remove = "Remove" +a_s_packages_search = "Find package" +a_s_packages_update = "Package lists updated" +a_s_packages_updatelist = "Update package lists" +a_s_packages_upgrade = "Upgrade installed packages" + +a_s_p_ipkg_pkglists = "Package lists" +a_s_p_ipkg_targets = "Installation targets" + +a_s_changepw1 = "Change the password of the system administrator (User \"root\")" +a_s_changepw_changed = "Password successfully changed" +a_s_changepw_nomatch = "Error: Passwords do not match" + +a_s_sshkeys1 = "Here you can paste public SSH-Keys (one per line) for SSH public-key authentication." + +a_s_hostname1 = "Defines the router's hostname. The hostname is a unique name in your local network used to identify the device" + +a_s_fstab_mountpoints = "Mount Points" +a_s_fstab_mountpoints1 = "Mount Points define at which point a memory device will be attached to the filesystem" + +a_s_fstab_mountpoint = "Mount Point" +a_s_fstab_device1 = "The device file of the memory or partition (e.g. /dev/sda1)" +a_s_fstab_fs1 = "The filesystem that was used to format the memory (e.g. ext3)" +a_s_fstab_swap1 = [[If your physical memory is insufficient unused data can be temporarily swapped +to a swap-device resulting in a higher amount of usable RAM. Be aware that swapping data is a very slow process +as the swap-device cannot be accessed with the high datarates of the RAM.]] + +a_s_flash_flashed = "Firmware successfully flashed. Rebooting device..." +a_s_flash_flasherr = "Failed to flash" +a_s_flash_fwimage = "Firmwareimage" +a_s_flash_fwupgrade = "Flash Firmware" +a_s_flash_keepcfg = "Keep configuration files" +a_s_flash_notimplemented = "Sorry, this function is not (yet) available for your platform." +a_s_flash_upgrade1 = "Replaces the installed firmware with a new one. The firmware format is platform-dependent." + +a_s_reboot1 = "Reboots the operating system of your device" +a_s_reboot_do = "Perform reboot" +a_s_reboot_running = "Please wait: Device rebooting..." + + +a_srv_services1 = "Services and daemons perform certain tasks on your device." +a_srv_services2 = [[Most of them are network servers, that offer a certain service for your device or network like +shell access, serving webpages like LuCI, doing mesh routing, sending e-mails, ...]] diff --git a/i18n/english/luasrc/i18n/default.en b/i18n/english/luasrc/i18n/default.en index a387c5e1ca..488ce594ed 100644 --- a/i18n/english/luasrc/i18n/default.en +++ b/i18n/english/luasrc/i18n/default.en @@ -4,24 +4,55 @@ administration = "Administration" apply = "Apply" changes = "Changes" +code = "Code" config = "Configuration" +confirmation = "Confirmation" -fwupgrade = "Firmware Upgrade" +delete = "Delete" +descr = "Description" +design = "Design" +device = "Device" +disable = "disable" + +enable = "enable" +error = "Error" + +filesystem = "Filesystem" +filter = "Filter" + +general = "General" hostname = "Hostname" +install = "Install" +installed = "installed" +language = "Language" load = "Load" +manpage = "see '%s' manpage" + +notinstalled = "not installed" + +ok = "OK" +options = "Options" overview = "Overview" + packagemanager = "Package Manager" +password = "Password" path = "Path" +reboot = "Reboot" reset = "Reset" revert = "Revert" save = "Save" +services = "Services" statistics = "Statistics" syslog = "System Log" system = "System" +unknownerror = "Unknown Error" + +version = "Version" + webui = "Web UI" \ No newline at end of file diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index b7097b5d95..e94e1e2fa6 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -53,6 +53,7 @@ function load(cbimap) luci.util.resfenv(func) luci.util.updfenv(func, luci.cbi) luci.util.extfenv(func, "translate", luci.i18n.translate) + luci.util.extfenv(func, "translatef", luci.i18n.translatef) local map = func() diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index e9d3b24d1b..8d1e493fb8 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -122,11 +122,12 @@ function dispatch() -- Init template engine local tpl = require("luci.template") - tpl.viewns.translate = function(...) return require("luci.i18n").translate(...) end - tpl.viewns.controller = luci.http.dispatcher() - tpl.viewns.uploadctrl = luci.http.dispatcher_upload() - tpl.viewns.media = luci.config.main.mediaurlbase - tpl.viewns.resource = luci.config.main.resourcebase + tpl.viewns.translate = function(...) return require("luci.i18n").translate(...) end + tpl.viewns.controller = luci.http.dispatcher() + tpl.viewns.uploadctrl = luci.http.dispatcher_upload() + tpl.viewns.media = luci.config.main.mediaurlbase + tpl.viewns.resource = luci.config.main.resourcebase + tpl.viewns.REQUEST_URI = luci.http.env.SCRIPT_NAME .. luci.http.env.PATH_INFO if c and type(c.target) == "function" then diff --git a/libs/web/luasrc/i18n.lua b/libs/web/luasrc/i18n.lua index 3a8a9a6c76..7ace708e9d 100644 --- a/libs/web/luasrc/i18n.lua +++ b/libs/web/luasrc/i18n.lua @@ -29,6 +29,7 @@ require("luci.sys") table = {} i18ndir = luci.sys.libpath() .. "/i18n/" +loaded = {} -- Clears the translation table function clear() @@ -36,14 +37,19 @@ function clear() end -- Loads a translation and copies its data into the global translation table -function load(file) - local f = loadfile(i18ndir .. file) - if f then - setfenv(f, table) - f() - return true +function load(file, force) + if force or not loaded[file] then + local f = loadfile(i18ndir .. file) + if f then + setfenv(f, table) + f() + loaded[file] = true + return true + else + return false + end else - return false + return true end end diff --git a/modules/admin-core/luasrc/controller/admin/services.lua b/modules/admin-core/luasrc/controller/admin/services.lua index 4dcf837c6f..bebbb0e894 100644 --- a/modules/admin-core/luasrc/controller/admin/services.lua +++ b/modules/admin-core/luasrc/controller/admin/services.lua @@ -1,9 +1,12 @@ module("luci.controller.admin.services", package.seeall) function index() + luci.i18n.loadc("admin-core") + local i18n = luci.i18n.translate + local page = node("admin", "services") page.target = template("admin_services/index") - page.title = "Dienste" + page.title = i18n("services", "Dienste") page.order = 40 local page = node("admin", "services", "httpd") diff --git a/modules/admin-core/luasrc/controller/admin/system.lua b/modules/admin-core/luasrc/controller/admin/system.lua index 1bd52e943d..d449f48017 100644 --- a/modules/admin-core/luasrc/controller/admin/system.lua +++ b/modules/admin-core/luasrc/controller/admin/system.lua @@ -13,13 +13,13 @@ function index() entry({"admin", "system"}, template("admin_system/index"), i18n("system", "System"), 30) entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages", "Paketverwaltung"), 10) - entry({"admin", "system", "packages", "ipkg"}, call("action_ipkg"), i18n("a_s_ipkg", "IPKG-Konfiguration")) + entry({"admin", "system", "packages", "ipkg"}, call("action_ipkg"), i18n("a_s_p_ipkg", "IPKG-Konfiguration")) entry({"admin", "system", "passwd"}, call("action_passwd"), i18n("a_s_changepw", "Passwort ändern"), 20) entry({"admin", "system", "sshkeys"}, call("action_sshkeys"), i18n("a_s_sshkeys", "SSH-Schlüssel"), 30) entry({"admin", "system", "hostname"}, cbi("admin_system/hostname"), i18n("hostname", "Hostname"), 40) entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab", "Einhängepunkte"), 50) - entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("fwupgrade", "Firmwareupgrade"), 60) - entry({"admin", "system", "reboot"}, call("action_reboot"), "Neu starten", 70) + entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash", "Firmwareupgrade"), 60) + entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("reboot", "Neu starten"), 70) end function action_editor() diff --git a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua index bb6bc18203..bdd8050bdd 100644 --- a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua @@ -1,6 +1,5 @@ --- ToDo: Translate require("luci.config") -m = Map("luci", translate("luci", "Oberfläche"), translate("luci1", +m = Map("luci", translate("webui", "Oberfläche"), translate("a_i_luci1", "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden.")) c = m:section(NamedSection, "main", "core", translate("general", "Allgemein")) @@ -19,14 +18,14 @@ for k, v in pairs(luci.config.themes) do end end -u = m:section(NamedSection, "uci_oncommit", "event", translate("ucicommit", "UCI-Befehle beim Anwenden"), - translate("ucicommit1", [[Beim Anwenden +u = m:section(NamedSection, "uci_oncommit", "event", translate("a_i_ucicommit", "UCI-Befehle beim Anwenden"), + translate("a_i_ucicommit1", [[Beim Anwenden der Konfiguration aus der Oberflächliche heraus können automatisch die relevanten Dienste neugestart werden, sodass Änderungen sofort nach dem Anwenden aktiv werden und der Router nicht erst neugestartet werden muss.]])) u.dynamic = true -f = m:section(NamedSection, "flash_keep", "extern", translate("keepflash", "Zu übernehmende Dateien bei Firmwareupgrade"), - translate("keepflash1", [[Die folgenden Dateien und Verzeichnisse werden beim Aktualisieren der Firmware +f = m:section(NamedSection, "flash_keep", "extern", translate("a_i_keepflash", "Zu übernehmende Dateien bei Firmwareupgrade"), + translate("a_i_keepflash1", [[Die folgenden Dateien und Verzeichnisse werden beim Aktualisieren der Firmware über die Oberfläche automatisch in die neue Firmware übernommen.]])) f.dynamic = true diff --git a/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua b/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua index d705743a0f..f8df235183 100644 --- a/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua +++ b/modules/admin-core/luasrc/model/cbi/admin_system/fstab.lua @@ -1,25 +1,25 @@ -m = Map("fstab", "Einhängepunkte") +m = Map("fstab", translate("a_s_fstab", "Einhängepunkte")) -mount = m:section(TypedSection, "mount", "Einhängepunkte", [[Einhängepunkte bestimmen, an welcher Stelle des Dateisystems -bestimmte Laufwerke und Speicher zur Verwendung eingebunden werden.]]) +mount = m:section(TypedSection, "mount", translate("a_s_fstab_mountpoints", "Einhängepunkte"), translate("a_s_fstab_mountpoints1", [[Einhängepunkte bestimmen, an welcher Stelle des Dateisystems +bestimmte Laufwerke und Speicher zur Verwendung eingebunden werden.]])) mount.anonymous = true mount.addremove = true -mount:option(Flag, "enabled", "aktivieren") -mount:option(Value, "device", "Gerät", "Die Gerätedatei des Speichers oder der Partition (z.B.: /dev/sda)") -mount:option(Value, "target", "Einhängepunkt", "Die Stelle an der der Speicher in das Dateisystem eingehängt wird.") -mount:option(Value, "fstype", "Dateisystem", "Das Dateisystem mit dem der Speicher formatiert ist (z.B.: ext3)") -mount:option(Value, "options", "Optionen", "Weitere Optionen (siehe das Handbuch des Befehls 'mount')") +mount:option(Flag, "enabled", translate("enable", "aktivieren")) +mount:option(Value, "device", translate("device", "Gerät"), translate("a_s_fstab_device1", "Die Gerätedatei des Speichers oder der Partition (z.B.: /dev/sda)")) +mount:option(Value, "target", translate("a_s_fstab_mountpoint", "Einhängepunkt")) +mount:option(Value, "fstype", translate("filesystem", "Dateisystem"), translate("a_s_fstab_fs1", "Das Dateisystem mit dem der Speicher formatiert ist (z.B.: ext3)")) +mount:option(Value, "options", translate("options", "Optionen"), translatef("manpage", "siehe '%s' manpage", "mount")) -swap = m:section(TypedSection, "swap", "SWAP", [[Falls der Arbeitsspeicher des Routers nicht ausreicht, +swap = m:section(TypedSection, "swap", "SWAP", translate("a_s_fstab_swap1", [[Falls der Arbeitsspeicher des Routers nicht ausreicht, kann dieser nicht benutzte Daten zeitweise auf einem SWAP-Laufwerk auslagern um so die effektive Größe des Arbeitsspeichers zu erhöhen. Die Auslagerung der Daten ist natürlich bedeutend langsamer -als direkte Arbeitsspeicherzugriffe.]]) +als direkte Arbeitsspeicherzugriffe.]])) swap.anonymous = true swap.addremove = true -swap:option(Flag, "enabled", "aktivieren") -swap:option(Value, "device", "Gerät", "Die Gerätedatei des Speichers oder der Partition (z.B.: /dev/sda)") +swap:option(Flag, "enabled", translate("enable", "aktivieren")) +swap:option(Value, "device", translate("device", "Gerät"), translate("a_s_fstab_device1", "Die Gerätedatei des Speichers oder der Partition (z.B.: /dev/sda)")) return m diff --git a/modules/admin-core/luasrc/model/cbi/admin_system/hostname.lua b/modules/admin-core/luasrc/model/cbi/admin_system/hostname.lua index c9e159d05f..976c2e8a6c 100644 --- a/modules/admin-core/luasrc/model/cbi/admin_system/hostname.lua +++ b/modules/admin-core/luasrc/model/cbi/admin_system/hostname.lua @@ -1,9 +1,9 @@ -m = Map("system", "Hostname", [[Definiert den Hostnamen des Routers. -Der Hostname ist eine im Netzwerk eindeutige Kennung, die dieses Gerät identifiziert.]]) +m = Map("system", translate("hostname", "Hostname"), translate("a_s_hostname1", [[Definiert den Hostnamen des Routers. +Der Hostname ist eine im Netzwerk eindeutige Kennung, die dieses Gerät identifiziert.]])) s = m:section(TypedSection, "system") s.anonymous = true -s:option(Value, "hostname", "Hostname") +s:option(Value, "hostname", translate("hostname", "Hostname")) return m \ No newline at end of file diff --git a/modules/admin-core/luasrc/view/admin_services/index.htm b/modules/admin-core/luasrc/view/admin_services/index.htm index a06fe10568..f31d557466 100644 --- a/modules/admin-core/luasrc/view/admin_services/index.htm +++ b/modules/admin-core/luasrc/view/admin_services/index.htm @@ -1,8 +1,6 @@ <%+header%>
<%:services1 Dienste und Dämonen stellen bestimmte Funktionalitäten auf dem Router zur Verfügung.%>
-<%:services2 Es handelt sich hierbei meist um Netzwerkserver, die verschiedene Aufgaben auf dem Router erfüllen, +
<%:a_srv_services1 Dienste und Dämonen stellen bestimmte Funktionalitäten auf dem Router zur Verfügung.%>
+<%:a_srv_services2 Es handelt sich hierbei meist um Netzwerkserver, die verschiedene Aufgaben auf dem Router erfüllen, beispielsweise Shell-Zugang ermöglichen oder diese Weboberfläche per HTTP anbieten.%>
-<%:servcies3 In diesen Bereich fallen auch die Meshnetzwerkdienste wie OLSR und BATMAN, die dabei helfen, -ein autarkes Ad-Hoc Netzwerk aufzubauen.%>
<%+footer%> \ No newline at end of file diff --git a/modules/admin-core/luasrc/view/admin_status/index.htm b/modules/admin-core/luasrc/view/admin_status/index.htm index 849a7a67e0..184e523a7c 100644 --- a/modules/admin-core/luasrc/view/admin_status/index.htm +++ b/modules/admin-core/luasrc/view/admin_status/index.htm @@ -1,7 +1,7 @@ <%+header%><%:a_i_status1 Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise +
<%:a_st_i_status1 Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise Prozessortakt, Speicherauslastung und Netzwerkschnittstellen.%>
-<%:a_i_status2 Zusätzlich können hier Protokolldaten, des Kernels und diverser Systemdienste eingesehen werden, +
<%:a_st_i_status2 Zusätzlich können hier Protokolldaten, des Kernels und diverser Systemdienste eingesehen werden, um deren Zustand zu kontrollieren.%>
<%+footer%> \ No newline at end of file diff --git a/modules/admin-core/luasrc/view/admin_system/index.htm b/modules/admin-core/luasrc/view/admin_system/index.htm index 3e9a28221d..1c594d95ba 100644 --- a/modules/admin-core/luasrc/view/admin_system/index.htm +++ b/modules/admin-core/luasrc/view/admin_system/index.htm @@ -1,9 +1,9 @@ <%+header%><%:system1 Hier finden sich Einstellungen, die das System selbst, dessen Kennung, +
<%:a_s_i_system1 Hier finden sich Einstellungen, die das System selbst, dessen Kennung, installierte Software und Hardware, Authentifizierung oder eingehängte Speicher betreffen.%>
-<%:system2 Diese Einstellungen definieren die Grundlage des Systems, auf dem die +
<%:a_s_i_system2 Diese Einstellungen definieren die Grundlage des Systems, auf dem die installierte Software aufbaut.%>
-<%:system3 Beachte bitte, dass eine fehlerhafte Konfiguration den Start +
<%:a_s_i_system3 Beachte bitte, dass eine fehlerhafte Konfiguration den Start des Routers verhindern oder dich vom Zugriff auf diesen ausschließen kann.%>
<%+footer%> \ No newline at end of file diff --git a/modules/admin-core/luasrc/view/admin_system/ipkg.htm b/modules/admin-core/luasrc/view/admin_system/ipkg.htm index 9a88ee57b5..7d27fa38a9 100644 --- a/modules/admin-core/luasrc/view/admin_system/ipkg.htm +++ b/modules/admin-core/luasrc/view/admin_system/ipkg.htm @@ -1,15 +1,15 @@ <%+header%>src Name URL
dest Name Pfad
src Name URL
dest Name Pfad