diff --git a/package/gluon-luci-admin/Makefile b/package/gluon-luci-admin/Makefile index 0208ace2..3e20d179 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 284cc162..55c0a248 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 868c2bbd..29aecb95 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 dfba5e66..5797b623 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.

-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.

" + .. "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 9c384399..a04a834d 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 -%> -

Info

+

<%:Information%>

<% for _, key in ipairs({'hostname', 'primary_mac', 'model', 'version', 'release', 'site', 'pubkey'}) do %>
<%=keys[key]%>
<%=values[key] or 'n/a'%>
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 343ed495..a2b82235 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%> -

Firmware aktualisieren

+

<%:Upgrade firmware%>

-

- Hier kannst du ein manuelles Firmwareupdate durchführen. -

-<% if bad_image then %> -

Die übermittelte Firmwaredatei kann nicht verwendet werden.

-<% end %> -
-
- -
- +

+ <%:You can manually upgrade your firmware here.%> +

+ <% if bad_image then %> +

<%:The provided firmware image is not valid for this device.%>

+ <% end %> +
+
+ +
+ +
+
+ +
+ + +
+ + +
-
- - -
- - -
+
+ +
-
- -
- - -
<%+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 ac375761..5618728f 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%> -

Firmware aktualisieren

+

<%:Upgrade firmware%>

+

- 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".%>

<% if flashsize > 0 and filesize > flashsize then %> -

Die Firmware passt nicht in den Speicher des Gerätes.

+

<%:The firmware is too big for your device's storage.%>

<% end %>

  • md5sum: <%=checksum%>
  • -
  • Größe: <% +
  • <%:Size%>: <% function byte_format(byte) local suff = {"B", "KB", "MB", "GB", "TB"} for i=1, 5 do @@ -51,16 +51,16 @@ $Id$ %>

-
+
" /> - +
" /> - +
<%+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 b9baa279..3e89e778 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 @@ - Firmware wird aktualisiert + <%:Upgrading firmware%>

- Die Firmware wird jetzt aktualisiert. - UNTERBRICH AUF KEINEN FALL DIE STROMVERSORGUNG! - Dieser Vorgang wird einige Minuten dauern. - Anschließend startet das Gerät automatisch neu. + <%:The firmware is currently being upgraded.%> + <%:Don't switch off the device in any circumstance!%> + <%:The upgrade will take a few minutes. When it is finished, your node will reboot automatically.%>

diff --git a/package/gluon-luci-admin/i18n/de.po b/package/gluon-luci-admin/i18n/de.po new file mode 100644 index 00000000..e3a1aa20 --- /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: \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.

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.

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 00000000..197b6367 --- /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.

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 ""