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