diff --git a/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua b/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
index 37b02f64..856938f1 100644
--- a/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
+++ b/package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua
@@ -1,14 +1,16 @@
return function(form, uci)
+ local pkg_i18n = i18n 'gluon-config-mode-autoupdater'
+
local enabled = uci:get_bool("autoupdater", "settings", "enabled")
if enabled then
form:section(
Section, nil,
- translate('This node will automatically update its firmware when a new version is available.')
+ pkg_i18n.translate('This node will automatically update its firmware when a new version is available.')
)
else
form:section(
Section, nil,
- translate('Automatic updates are disabled. They can be enabled in Advanced settings.')
+ pkg_i18n.translate('Automatic updates are disabled. They can be enabled in Advanced settings.')
)
end
end
diff --git a/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua b/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
index 4a3f3e81..8314dd7e 100644
--- a/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
+++ b/package/gluon-config-mode-contact-info/luasrc/lib/gluon/config-mode/wizard/0500-contact-info.lua
@@ -1,16 +1,18 @@
return function(form, uci)
+ local pkg_i18n = i18n 'gluon-config-mode-contact-info'
+
local site = require 'gluon.site'
local owner = uci:get_first("gluon-node-info", "owner")
- local s = form:section(Section, nil, translate(
+ local s = form:section(Section, nil, pkg_i18n.translate(
'Please provide your contact information here to '
.. 'allow others to contact you. Note that '
.. 'this information will be visible publicly '
.. 'on the internet together with your node\'s coordinates.'
))
- local o = s:option(Value, "contact", translate("Contact info"), translate("e.g. E-mail or phone number"))
+ local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"), pkg_i18n.translate("e.g. E-mail or phone number"))
o.default = uci:get("gluon-node-info", owner, "contact")
o.optional = not site.config_mode.owner.obligatory(false)
-- without a minimal length, an empty string will be accepted even with "optional = false"
diff --git a/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html
index 22305131..00beaa04 100644
--- a/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html
+++ b/package/gluon-config-mode-core/files/lib/gluon/web/view/gluon/config-mode/welcome.html
@@ -1,7 +1,9 @@
<%-
+ local site_i18n = i18n 'gluon-site'
+
local sysconfig = require 'gluon.sysconfig'
- local msg = _translate('gluon-config-mode:welcome')
+ local msg = site_i18n._translate('gluon-config-mode:welcome')
if not msg then return end
-%>
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
index 8cbba849..d73a9e0b 100644
--- a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua
@@ -1,3 +1,5 @@
+local site_i18n = i18n 'gluon-site'
+
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'
local pretty_hostname = require 'pretty_hostname'
@@ -7,7 +9,7 @@ local uci = require("simple-uci").cursor()
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
-local msg = _translate('gluon-config-mode:reboot')
+local msg = site_i18n._translate('gluon-config-mode:reboot')
if not msg then return end
renderer.render_string(msg, {
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua
index 52117ac8..8801948a 100644
--- a/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua
@@ -1,2 +1,4 @@
+package 'gluon-config-mode-core'
+
entry({}, alias("wizard"))
entry({"wizard"}, model("gluon-config-mode/wizard"), _("Wizard"), 5)
diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua
index 35b605d2..888a7615 100644
--- a/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua
+++ b/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua
@@ -26,6 +26,7 @@ f.reset = false
local s = f:section(Section)
s.template = "gluon/config-mode/welcome"
+s.package = "gluon-config-mode-core"
local commit = {'gluon-setup-mode'}
local run = {}
@@ -57,6 +58,7 @@ function f:write()
end
f.template = "gluon/config-mode/reboot"
+ f.package = "gluon-config-mode-core"
f.hidenav = true
if nixio.fork() == 0 then
diff --git a/package/gluon-config-mode-domain-select/luasrc/lib/gluon/config-mode/wizard/0200-domain-select.lua b/package/gluon-config-mode-domain-select/luasrc/lib/gluon/config-mode/wizard/0200-domain-select.lua
index f82f1fb6..8046e006 100644
--- a/package/gluon-config-mode-domain-select/luasrc/lib/gluon/config-mode/wizard/0200-domain-select.lua
+++ b/package/gluon-config-mode-domain-select/luasrc/lib/gluon/config-mode/wizard/0200-domain-select.lua
@@ -1,4 +1,6 @@
return function(form, uci)
+ local site_i18n = i18n 'gluon-site'
+
local fs = require 'nixio.fs'
local json = require 'jsonc'
local site = require 'gluon.site'
@@ -24,8 +26,8 @@ return function(form, uci)
return list
end
- local s = form:section(Section, nil, translate('gluon-config-mode:domain-select'))
- local o = s:option(ListValue, 'domain', translate('gluon-config-mode:domain'))
+ local s = form:section(Section, nil, site_i18n.translate('gluon-config-mode:domain-select'))
+ local o = s:option(ListValue, 'domain', site_i18n.translate('gluon-config-mode:domain'))
if configured then
o.default = selected_domain
diff --git a/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua b/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
index 41b346d8..05d9b686 100644
--- a/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
+++ b/package/gluon-config-mode-geo-location/luasrc/lib/gluon/config-mode/wizard/0400-geo-location.lua
@@ -1,4 +1,7 @@
return function(form, uci)
+ local pkg_i18n = i18n 'gluon-config-mode-geo-location'
+ local site_i18n = i18n 'gluon-site'
+
local site = require 'gluon.site'
local location = uci:get_first("gluon-node-info", "location")
@@ -11,25 +14,25 @@ return function(form, uci)
return uci:get_bool("gluon-node-info", location, "altitude")
end
- local text = translate(
+ local text = pkg_i18n.translate(
'If you want the location of your node to ' ..
'be displayed on the map, you can enter its coordinates here.'
)
if show_altitude() then
- text = text .. ' ' .. translate("gluon-config-mode:altitude-help")
+ text = text .. ' ' .. site_i18n.translate("gluon-config-mode:altitude-help")
end
local s = form:section(Section, nil, text)
local o
- local share_location = s:option(Flag, "location", translate("Show node on the map"))
+ local share_location = s:option(Flag, "location", pkg_i18n.translate("Show node on the map"))
share_location.default = uci:get_bool("gluon-node-info", location, "share_location")
function share_location:write(data)
uci:set("gluon-node-info", location, "share_location", data)
end
- o = s:option(Value, "latitude", translate("Latitude"), translatef("e.g. %s", "53.873621"))
+ o = s:option(Value, "latitude", pkg_i18n.translate("Latitude"), pkg_i18n.translatef("e.g. %s", "53.873621"))
o.default = uci:get("gluon-node-info", location, "latitude")
o:depends(share_location, true)
o.datatype = "float"
@@ -37,7 +40,7 @@ return function(form, uci)
uci:set("gluon-node-info", location, "latitude", data)
end
- o = s:option(Value, "longitude", translate("Longitude"), translatef("e.g. %s", "10.689901"))
+ o = s:option(Value, "longitude", pkg_i18n.translate("Longitude"), pkg_i18n.translatef("e.g. %s", "10.689901"))
o.default = uci:get("gluon-node-info", location, "longitude")
o:depends(share_location, true)
o.datatype = "float"
@@ -46,7 +49,7 @@ return function(form, uci)
end
if show_altitude() then
- o = s:option(Value, "altitude", translate("gluon-config-mode:altitude-label"), translatef("e.g. %s", "11.51"))
+ o = s:option(Value, "altitude", site_i18n.translate("gluon-config-mode:altitude-label"), pkg_i18n.translatef("e.g. %s", "11.51"))
o.default = uci:get("gluon-node-info", location, "altitude")
o:depends(share_location, true)
o.datatype = "float"
diff --git a/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua b/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
index 8661d4bd..793c497e 100644
--- a/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
+++ b/package/gluon-config-mode-hostname/luasrc/lib/gluon/config-mode/wizard/0100-hostname.lua
@@ -1,8 +1,10 @@
return function(form, uci)
+ local pkg_i18n = i18n 'gluon-config-mode-hostname'
+
local pretty_hostname = require "pretty_hostname"
local s = form:section(Section)
- local o = s:option(Value, "hostname", translate("Node name"))
+ local o = s:option(Value, "hostname", pkg_i18n.translate("Node name"))
o.default = pretty_hostname.get(uci)
function o:write(data)
diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
index fc3f8123..8a72bffe 100644
--- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
+++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/reboot/0100-mesh-vpn.lua
@@ -1,3 +1,5 @@
+local site_i18n = i18n 'gluon-site'
+
local uci = require("simple-uci").cursor()
local lutil = require "gluon.web.util"
local fs = require "nixio.fs"
@@ -23,15 +25,15 @@ local msg
if has_tunneldigger then
local tunneldigger_enabled = uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
if not tunneldigger_enabled then
- msg = _translate('gluon-config-mode:novpn')
+ msg = site_i18n._translate('gluon-config-mode:novpn')
end
elseif has_fastd then
local fastd_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
if fastd_enabled then
pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
- msg = _translate('gluon-config-mode:pubkey')
+ msg = site_i18n._translate('gluon-config-mode:pubkey')
else
- msg = _translate('gluon-config-mode:novpn')
+ msg = site_i18n._translate('gluon-config-mode:novpn')
end
end
diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
index 69a64bd0..1ad50794 100644
--- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
+++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua
@@ -8,7 +8,9 @@ return function(form, uci)
return
end
- local msg = translate(
+ local pkg_i18n = i18n 'gluon-config-mode-mesh-vpn'
+
+ local msg = pkg_i18n.translate(
'Your internet connection can be used to establish a ' ..
'VPN connection with other nodes. ' ..
'Enable this option if there are no other nodes reachable ' ..
@@ -21,7 +23,7 @@ return function(form, uci)
local o
- local meshvpn = s:option(Flag, "meshvpn", translate("Use internet connection (mesh VPN)"))
+ local meshvpn = s:option(Flag, "meshvpn", pkg_i18n.translate("Use internet connection (mesh VPN)"))
meshvpn.default = uci:get_bool("fastd", "mesh_vpn", "enabled") or uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
function meshvpn:write(data)
if has_fastd then
@@ -32,7 +34,7 @@ return function(form, uci)
end
end
- local limit = s:option(Flag, "limit_enabled", translate("Limit bandwidth"))
+ local limit = s:option(Flag, "limit_enabled", pkg_i18n.translate("Limit bandwidth"))
limit:depends(meshvpn, true)
limit.default = uci:get_bool("simple-tc", "mesh_vpn", "enabled")
function limit:write(data)
@@ -41,7 +43,7 @@ return function(form, uci)
uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
end
- o = s:option(Value, "limit_ingress", translate("Downstream (kbit/s)"))
+ o = s:option(Value, "limit_ingress", pkg_i18n.translate("Downstream (kbit/s)"))
o:depends(limit, true)
o.default = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
o.datatype = "uinteger"
@@ -49,7 +51,7 @@ return function(form, uci)
uci:set("simple-tc", "mesh_vpn", "limit_ingress", data)
end
- o = s:option(Value, "limit_egress", translate("Upstream (kbit/s)"))
+ o = s:option(Value, "limit_egress", pkg_i18n.translate("Upstream (kbit/s)"))
o:depends(limit, true)
o.default = uci:get("simple-tc", "mesh_vpn", "limit_egress")
o.datatype = "uinteger"
diff --git a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua b/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua
index 109f009a..99025c95 100644
--- a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua
+++ b/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua
@@ -1,3 +1,6 @@
+package 'gluon-web-admin'
+
+
local root = node()
if not root.target then
root.target = alias("admin")
diff --git a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua b/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua
index a41483d0..98562005 100644
--- a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua
+++ b/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua
@@ -9,6 +9,9 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
+package 'gluon-web-admin'
+
+
local fs = require 'nixio.fs'
local tmpfile = "/tmp/firmware.img"
@@ -106,17 +109,23 @@ local function action_upgrade(http, renderer)
renderer.render("layout", {
content = "admin/upgrade",
- bad_image = has_image and not has_support,
+ env = {
+ bad_image = has_image and not has_support,
+ },
+ pkg = 'gluon-web-admin',
})
-- Step 2: present uploaded file, show checksum, confirmation
elseif step == 2 then
renderer.render("layout", {
content = "admin/upgrade_confirm",
- checksum = image_checksum(tmpfile),
- filesize = fs.stat(tmpfile).size,
- flashsize = storage_size(),
- keepconfig = (http:formvalue("keepcfg") == "1"),
+ env = {
+ checksum = image_checksum(tmpfile),
+ filesize = fs.stat(tmpfile).size,
+ flashsize = storage_size(),
+ keepconfig = (http:formvalue("keepcfg") == "1"),
+ },
+ pkg = 'gluon-web-admin',
})
elseif step == 3 then
if http:formvalue("keepcfg") == "1" then
@@ -127,6 +136,7 @@ local function action_upgrade(http, renderer)
renderer.render("layout", {
content = "admin/upgrade_reboot",
hidenav = true,
+ pkg = 'gluon-web-admin',
})
end
end
diff --git a/package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua b/package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua
index abf2b782..7071039d 100644
--- a/package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua
+++ b/package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua
@@ -1 +1,3 @@
+package 'gluon-web-autoupdater'
+
entry({"admin", "autoupdater"}, model("admin/autoupdater"), _("Automatic updates"), 80)
diff --git a/package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua b/package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua
index 8dea6228..5704cdac 100644
--- a/package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua
+++ b/package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua
@@ -1 +1,3 @@
+package 'gluon-web-logging'
+
entry({"admin", "logging"}, model("admin/logging"), _("Logging"), 85)
diff --git a/package/gluon-web-mesh-vpn-fastd/Makefile b/package/gluon-web-mesh-vpn-fastd/Makefile
index bdc1828f..7ab759f6 100644
--- a/package/gluon-web-mesh-vpn-fastd/Makefile
+++ b/package/gluon-web-mesh-vpn-fastd/Makefile
@@ -26,14 +26,14 @@ define Build/Configure
endef
define Build/Compile
- $(call GluonBuildI18N,gluon-mesh-vpn-fastd,i18n)
+ $(call GluonBuildI18N,gluon-web-mesh-vpn-fastd,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-web-mesh-vpn-fastd/install
$(CP) ./files/* $(1)/
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
- $(call GluonInstallI18N,gluon-mesh-vpn-fastd,$(1))
+ $(call GluonInstallI18N,gluon-web-mesh-vpn-fastd,$(1))
endef
define Package/gluon-web-mesh-vpn-fastd/postinst
diff --git a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua
index 65291fac..1b365956 100644
--- a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua
+++ b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua
@@ -1 +1,3 @@
+package 'gluon-web-mesh-vpn-fastd'
+
entry({"admin", "mesh_vpn_fastd"}, model("admin/mesh_vpn_fastd"), _("Mesh VPN"), 50)
diff --git a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua
index d10bf178..d54b3227 100644
--- a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua
+++ b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua
@@ -6,6 +6,7 @@ local f = Form(translate('Mesh VPN'))
local s = f:section(Section)
local mode = s:option(Value, 'mode')
+mode.package = "gluon-web-mesh-vpn-fastd"
mode.template = "gluon/model/mesh-vpn-fastd"
local methods = uci:get('fastd', 'mesh_vpn', 'method')
diff --git a/package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua
index f490f78e..6d14dc7a 100644
--- a/package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua
+++ b/package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua
@@ -1 +1,3 @@
+package 'gluon-web-network'
+
entry({"admin", "network"}, model("admin/network"), _("Network"), 40)
diff --git a/package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua b/package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua
index c35935d4..b11dc50f 100644
--- a/package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua
+++ b/package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua
@@ -1 +1,3 @@
+package 'gluon-web-node-role'
+
entry({"admin", "noderole"}, model("admin/noderole"), "Node role", 60)
diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua
index 6faeea02..febfb4e4 100644
--- a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua
+++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua
@@ -1 +1,3 @@
+package 'gluon-web-private-wifi'
+
entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30)
diff --git a/package/gluon-web-theme/files/lib/gluon/web/view/themes/gluon/layout.html b/package/gluon-web-theme/files/lib/gluon/web/view/themes/gluon/layout.html
index f5da5d44..c1915f48 100644
--- a/package/gluon-web-theme/files/lib/gluon/web/view/themes/gluon/layout.html
+++ b/package/gluon-web-theme/files/lib/gluon/web/view/themes/gluon/layout.html
@@ -33,6 +33,10 @@ You may obtain a copy of the License at
return r
end
+ local function title(node)
+ return i18n(node.pkg).translate(node.title)
+ end
+
local function subtree(prefix, node, name, ...)
if not node then return end
@@ -48,7 +52,7 @@ You may obtain a copy of the License at
local active = (v == name)
%>
<%
end
@@ -71,7 +75,7 @@ You may obtain a copy of the License at
- <%=pcdata( hostname .. ( (rnode and rnode.title) and ' - ' .. translate(rnode.title) or '')) %>
+ <%=pcdata( hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '')) %>
@@ -88,7 +92,7 @@ You may obtain a copy of the License at
<% if #categories > 1 and not hidenav then %>