diff --git a/package/gluon-luci-admin/Makefile b/package/gluon-luci-admin/Makefile index 0208ace242f6dee9b7efc88155a2b8450ba2b3a9..3e20d17929a22573de045041f27b1bd6fdbaaaa3 100644 --- a/package/gluon-luci-admin/Makefile +++ b/package/gluon-luci-admin/Makefile @@ -4,12 +4,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gluon-luci-admin -PKG_VERSION:=0.1 +PKG_VERSION:=1 PKG_RELEASE:=1 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-admin SECTION:=gluon @@ -18,10 +20,6 @@ define Package/gluon-luci-admin DEPENDS:=gluon-config-mode-core-virtual endef -define Package/gluon-luci-admin/description - Luci based config mode -endef - define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef @@ -30,10 +28,12 @@ define Build/Configure endef define Build/Compile + $(call GluonBuildI18N,gluon-luci-admin,i18n) endef define Package/gluon-luci-admin/install $(CP) ./files/* $(1)/ + $(call GluonInstallI18N,gluon-luci-admin,$(1)) endef $(eval $(call BuildPackage,gluon-luci-admin)) diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/index.lua b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/index.lua index 284cc162be5023198d0941cf708585bde8ea3fd4..55c0a248eb15418bdcc810818916fa30e1407ada 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/index.lua +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/index.lua @@ -29,11 +29,11 @@ function index() root.index = true end - local page = entry({"admin"}, alias("admin", "index"), "Expert Mode", 10) + local page = entry({"admin"}, alias("admin", "index"), _("Expert Mode"), 10) page.sysauth = "root" page.sysauth_authenticator = function() return "root" end page.index = true - entry({"admin", "index"}, cbi("admin/info"), _("Info"), 1).ignoreindex = true - entry({"admin", "remote"}, cbi("admin/remote"), _("Remotezugriff"), 10) + entry({"admin", "index"}, cbi("admin/info"), _("Information"), 1).ignoreindex = true + entry({"admin", "remote"}, cbi("admin/remote"), _("Remote access"), 10) end diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua index 868c2bbdb2f8ea8a30a62d41477fae36c4b76962..29aecb956677907df025a840262f1d78e29c73d9 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua @@ -18,7 +18,7 @@ module("luci.controller.admin.upgrade", package.seeall) function index() local has_platform = nixio.fs.access("/lib/upgrade/platform.sh") if has_platform then - entry({"admin", "upgrade"}, call("action_upgrade"), "Firmware aktualisieren", 90) + entry({"admin", "upgrade"}, call("action_upgrade"), _("Upgrade firmware"), 90) entry({"admin", "upgrade", "reboot"}, template("admin/upgrade_reboot"), nil, nil) end end diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua b/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua index dfba5e66b7136264287619c9aab3fd733170371b..5797b62397f84bb9ca0b2bd58c268a27b3d2829f 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/model/cbi/admin/remote.lua @@ -16,15 +16,13 @@ $Id$ local fs = require "nixio.fs" -local m = Map("system", "SSH-Keys") -m.submit = "Speichern" -m.reset = "Zurücksetzen" +local m = Map("system", translate("SSH keys")) m.pageaction = false m.template = "admin/expertmode" if fs.access("/etc/config/dropbear") then local s = m:section(TypedSection, "_dummy1", nil, - "Hier hast du die Möglichkeit SSH-Keys (einen pro Zeile) zu hinterlegen:") + translate("You can provide your SSH keys here (one per line):")) s.addremove = false s.anonymous = true @@ -57,23 +55,22 @@ if fs.access("/etc/config/dropbear") then end end -local m2 = Map("system", "Passwort") -m2.submit = "Speichern" +local m2 = Map("system", translate("Password")) m2.reset = false m2.pageaction = false m2.template = "admin/expertmode" -local s = m2:section(TypedSection, "_dummy2", nil, -[[Alternativ kannst du auch ein Passwort setzen. Wähle bitte ein sicheres Passwort, das du nirgendwo anders verwendest.<br /><br /> -Beim Setzen eines leeren Passworts wird der Login per Passwort gesperrt (dies ist die Standard-Einstellung).]]) +local s = m2:section(TypedSection, "_dummy2", nil, translate( + "Alternatively, you can set a password to access you node. Please choose a secure password you don't use anywhere else.<br /><br />" + .. "If you set an empty password, login via password will be disabled. This is the default.")) s.addremove = false s.anonymous = true -local pw1 = s:option(Value, "pw1", "Passwort") +local pw1 = s:option(Value, "pw1", translate("Password")) pw1.password = true -local pw2 = s:option(Value, "pw2", "Wiederholung") +local pw2 = s:option(Value, "pw2", translate("Confirmation")) pw2.password = true function s.cfgsections() @@ -87,18 +84,18 @@ function m2.on_commit(map) if v1 and v2 then if v1 == v2 then if #v1 > 0 then - if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then - m2.message = "Passwort geändert." - else - m2.errmessage = "Das Passwort konnte nicht geändert werden." - end + if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then + m2.message = translate("Password changed.") + else + m2.errmessage = translate("Unable to change the password.") + end else -- We don't check the return code here as the error 'password for root is already locked' is normal... os.execute('passwd -l root >/dev/null') - m2.message = "Passwort gelöscht." + m2.message = translate("Password removed.") end else - m2.errmessage = "Die beiden Passwörter stimmen nicht überein." + m2.errmessage = translate("The password and the confirmation differ.") end end end diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/info.htm b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/info.htm index 9c3843995211636273c09701ba5e1e4bc2512aa6..a04a834d538de4e22d125a26a923a115b8c9bc2f 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/info.htm +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/info.htm @@ -2,6 +2,7 @@ local fs = require 'luci.fs' local uci = require('luci.model.uci').cursor() local util = require 'luci.util' + local i18n = require 'luci.i18n' local site = require 'gluon.site_config' local sysconfig = require 'gluon.sysconfig' @@ -9,13 +10,13 @@ local keys = { - hostname = 'Hostname', - primary_mac = 'MAC-Adresse', - model = 'Hardware-Modell', - version = 'Gluon-Version', - release = 'Firmware-Release', - site = 'Site', - pubkey = 'Öffentlicher VPN-Schlüssel', + hostname = i18n.translate('Hostname'), + primary_mac = i18n.translate('MAC address'), + model = i18n.translate('Hardware model'), + version = i18n.translate('Gluon version'), + release = i18n.translate('Firmware release'), + site = i18n.translate('Site'), + pubkey = i18n.translate('Public VPN key'), } local values = { @@ -36,7 +37,7 @@ end end -%> -<h2>Info</h2> +<h2><%:Information%></h2> <% for _, key in ipairs({'hostname', 'primary_mac', 'model', 'version', 'release', 'site', 'pubkey'}) do %> <div class="cbi-value"> <div class="cbi-value-title"><%=keys[key]%></div><div class="cbi-value-field"><%=values[key] or 'n/a'%></div> diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm index 343ed4952dd4ea89cd9fa500a862faeb2709dd78..a2b82235de123d0850232074392073282f25b7f4 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade.htm @@ -15,41 +15,41 @@ $Id$ <%+header%> -<h2>Firmware aktualisieren</h2> +<h2><%:Upgrade firmware%></h2> <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data"> -<p> - Hier kannst du ein manuelles Firmwareupdate durchführen. -</p> -<% if bad_image then %> -<p class="error">Die übermittelte Firmwaredatei kann nicht verwendet werden.</p> -<% end %> -<div class="cbi-section-node"> - <div class="cbi-value"> - <label class="cbi-value-title"> - Firmware-Datei - </label> - <div class="cbi-value-field"> - <input class="cbi-input-file" type="file" name="image" /> + <p> + <%:You can manually upgrade your firmware here.%> + </p> + <% if bad_image then %> + <p class="error"><%:The provided firmware image is not valid for this device.%></p> + <% end %> + <div class="cbi-section-node"> + <div class="cbi-value"> + <label class="cbi-value-title"> + <%:Firmware image%> + </label> + <div class="cbi-value-field"> + <input class="cbi-input-file" type="file" name="image" /> + </div> </div> - </div> - <div class="cbi-value cbi-value-last"> - <label class="cbi-value-title"> - Einstellungen beibehalten - </label> + <div class="cbi-value cbi-value-last"> + <label class="cbi-value-title"> + <%:Keep settings%> + </label> - <div class="cbi-value-field"> - <input id="keepcfg" class="cbi-input-checkbox" type="checkbox" name="keepcfg" value="1" checked="checked" /> - <label for="keepcfg"></label> + <div class="cbi-value-field"> + <input id="keepcfg" class="cbi-input-checkbox" type="checkbox" name="keepcfg" value="1" checked="checked" /> + <label for="keepcfg"></label> + </div> </div> </div> -</div> -<div class="cbi-page-actions right"> - <input type="hidden" name="step" value="2" /> - <input class="cbi-button cbi-button-apply" type="submit" value="Upload image" /> -</div> + <div class="cbi-page-actions right"> + <input type="hidden" name="step" value="2" /> + <input class="cbi-button cbi-button-apply" type="submit" value="<%:Upload image%>" /> + </div> </form> <%+footer%> diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_confirm.htm b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_confirm.htm index ac3757619f32c2c106c80b8d29d3259ad6302dc7..5618728f636d7e9e0adee631c29637479bb01782 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_confirm.htm +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_confirm.htm @@ -15,20 +15,20 @@ $Id$ <%+header%> -<h2>Firmware aktualisieren</h2> +<h2><%:Upgrade firmware%></h2> + <p> - Die Firmwaredatei wurde übermittelt. Bitte vergleiche MD5-Checksumme - und Dateigröße und klicke anschließend auf "Fortfahren". + <%:The firmware image has been transmitted. Please ensure the MD5 checksum and image size are correct and click "continue".%> </p> <% if flashsize > 0 and filesize > flashsize then %> -<p class="error">Die Firmware passt nicht in den Speicher des Gerätes.</p> +<p class="error"><%:The firmware is too big for your device's storage.%></p> <% end %> <p> <ul> <li>md5sum: <code><%=checksum%></code></li> - <li>Größe: <% + <li><%:Size%>: <% function byte_format(byte) local suff = {"B", "KB", "MB", "GB", "TB"} for i=1, 5 do @@ -51,16 +51,16 @@ $Id$ %></li> </ul> </p> -<div class="cbi-page-actions right"> +<div class="cbi-page-actions"> <form style="display:inline"> <input type="hidden" name="step" value="3" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> - <input class="cbi-button cbi-button-apply" type="submit" value="Fortfahren" /> + <input class="cbi-button cbi-button-apply" type="submit" value="<%:Continue%>" /> </form> <form style="display:inline"> <input type="hidden" name="step" value="1" /> <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" /> - <input class="cbi-button cbi-button-reset" type="submit" value="Abbrechen" /> + <input class="cbi-button cbi-button-reset" type="submit" value="<%:Cancel%>" /> </form> </div> <%+footer%> diff --git a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm index b9baa2794fb21edfbb9f48230e5669a7cb0c2601..3e89e7782f180d02156db196b86f451cbfcedd8e 100644 --- a/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm +++ b/package/gluon-luci-admin/files/usr/lib/lua/luci/view/admin/upgrade_reboot.htm @@ -3,17 +3,16 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%=luci.i18n.context.lang%>" lang="<%=luci.i18n.context.lang%>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Firmware wird aktualisiert</title> + <title><%:Upgrading firmware%></title> <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" /> </head> <body> <div id="maincontainer"> <div id="maincontent"> <p> - Die Firmware wird jetzt aktualisiert. - <strong>UNTERBRICH AUF KEINEN FALL DIE STROMVERSORGUNG!</strong> - Dieser Vorgang wird einige Minuten dauern. - Anschließend startet das Gerät automatisch neu. + <%:The firmware is currently being upgraded.%> + <strong><%:Don't switch off the device in any circumstance!%></strong> + <%:The upgrade will take a few minutes. When it is finished, your node will reboot automatically.%> </p> </div> </div> diff --git a/package/gluon-luci-admin/i18n/de.po b/package/gluon-luci-admin/i18n/de.po new file mode 100644 index 0000000000000000000000000000000000000000..e3a1aa20f001af1e325a770f83c656fd09eb5b49 --- /dev/null +++ b/package/gluon-luci-admin/i18n/de.po @@ -0,0 +1,111 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-05-04 00:34+0200\n" +"Last-Translator: <mschiffer@universe-factory.net>\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "" +"Alternatively, you can set a password to access you node. Please choose a " +"secure password you don't use anywhere else.<br /><br />If you set an empty " +"password, login via password will be disabled. This is the default." +msgstr "" +"Alternativ kannst du auch ein Passwort setzen. Wähle bitte ein sicheres " +"Passwort, das du nirgendwo anders verwendest.<br /><br />Beim Setzen eines " +"leeren Passworts wird der Login per Passwort gesperrt (dies ist die Standard-" +"Einstellung)." + +msgid "Continue" +msgstr "Fortfahren" + +msgid "Don't switch off the device in any circumstance!" +msgstr "Unterbrich auf keinen Fall die Stromversorgung!" + +msgid "Expert Mode" +msgstr "Export Mode" + +msgid "Firmware image" +msgstr "Firmware-Datei" + +msgid "Firmware release" +msgstr "Firmware-Release" + +msgid "Gluon version" +msgstr "Gluon-Version" + +msgid "Hardware model" +msgstr "Hardware-Modell" + +msgid "Information" +msgstr "Info" + +msgid "MAC address" +msgstr "MAC-Adresse" + +msgid "Password changed." +msgstr "Passwort geändert." + +msgid "Password removed." +msgstr "Passwort gelöscht." + +msgid "Public VPN key" +msgstr "Öffentlicher VPN-Schlüssel" + +msgid "Remote access" +msgstr "Remotezugriff" + +msgid "SSH keys" +msgstr "SSH-Schlüssel" + +msgid "Site" +msgstr "Site" + +msgid "" +"The firmware image has been transmitted. Please ensure the MD5 checksum and " +"image size are correct and click \"continue\"." +msgstr "" +"Die Firmwaredatei wurde übermittelt. Bitte vergleiche MD5-Checksumme und " +"Dateigröße und klicke anschließend auf \"fortfahren\"." + +msgid "The firmware is currently being upgraded." +msgstr "Die Firmware wird jetzt aktualisiert." + +msgid "The firmware is too big for your device's storage." +msgstr "Die Firmware passt nicht in den Speicher des Gerätes." + +msgid "The password and the confirmation differ." +msgstr "Die beiden Passwörter stimmen nicht überein." + +msgid "The provided firmware image is not valid for this device." +msgstr "Die übermittelte Datei ist keine gültige Firmware für dieses Gerät." + +msgid "" +"The upgrade will take a few minutes. When it is finished, your node will " +"reboot automatically." +msgstr "" +"Dieser Vorgang wird einige Minuten dauern. Anschließend startet das Gerät " +"automatisch neu." + +msgid "Unable to change the password." +msgstr "Das Passwort konnte nicht geändert werden." + +msgid "Upgrade firmware" +msgstr "Firmware aktualisieren" + +msgid "Upgrading firmware" +msgstr "Firmware wird aktualisiert" + +msgid "Upload image" +msgstr "Datei hochladen" + +msgid "You can manually upgrade your firmware here." +msgstr "Hier kannst du ein manuelles Firmwareupdate durchführen." + +msgid "You can provide your SSH keys here (one per line):" +msgstr "" +"Hier hast du die Möglichkeit, SSH-Keys zu hinterlegen (einen pro Zeile):" diff --git a/package/gluon-luci-admin/i18n/gluon-luci-admin.pot b/package/gluon-luci-admin/i18n/gluon-luci-admin.pot new file mode 100644 index 0000000000000000000000000000000000000000..197b6367e65332461ca9a04b289adc86b602e457 --- /dev/null +++ b/package/gluon-luci-admin/i18n/gluon-luci-admin.pot @@ -0,0 +1,93 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "" +"Alternatively, you can set a password to access you node. Please choose a " +"secure password you don't use anywhere else.<br /><br />If you set an empty " +"password, login via password will be disabled. This is the default." +msgstr "" + +msgid "Continue" +msgstr "" + +msgid "Don't switch off the device in any circumstance!" +msgstr "" + +msgid "Expert Mode" +msgstr "" + +msgid "Firmware image" +msgstr "" + +msgid "Firmware release" +msgstr "" + +msgid "Gluon version" +msgstr "" + +msgid "Hardware model" +msgstr "" + +msgid "Information" +msgstr "" + +msgid "MAC address" +msgstr "" + +msgid "Password changed." +msgstr "" + +msgid "Password removed." +msgstr "" + +msgid "Public VPN key" +msgstr "" + +msgid "Remote access" +msgstr "" + +msgid "SSH keys" +msgstr "" + +msgid "Site" +msgstr "" + +msgid "" +"The firmware image has been transmitted. Please ensure the MD5 checksum and " +"image size are correct and click \"continue\"." +msgstr "" + +msgid "The firmware is currently being upgraded." +msgstr "" + +msgid "The firmware is too big for your device's storage." +msgstr "" + +msgid "The password and the confirmation differ." +msgstr "" + +msgid "The provided firmware image is not valid for this device." +msgstr "" + +msgid "" +"The upgrade will take a few minutes. When it is finished, your node will " +"reboot automatically." +msgstr "" + +msgid "Unable to change the password." +msgstr "" + +msgid "Upgrade firmware" +msgstr "" + +msgid "Upgrading firmware" +msgstr "" + +msgid "Upload image" +msgstr "" + +msgid "You can manually upgrade your firmware here." +msgstr "" + +msgid "You can provide your SSH keys here (one per line):" +msgstr ""