summaryrefslogtreecommitdiffhomepage
path: root/build/uvl2i18n.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-09-25 14:25:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-09-25 14:25:02 +0000
commitc4d59e0fe581497cadcc817dd8d9b55b204e47a9 (patch)
tree553dbe476f77a235c4e75483c79f837db6081244 /build/uvl2i18n.lua
parent3ddce490db9a54624efae21cd6e8dc4d9aae273d (diff)
* luci/build: fix crash in uvl2i18n.lua when variable or section has no title
Diffstat (limited to 'build/uvl2i18n.lua')
-rwxr-xr-xbuild/uvl2i18n.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/uvl2i18n.lua b/build/uvl2i18n.lua
index 771b26dd73..ee57c83ea5 100755
--- a/build/uvl2i18n.lua
+++ b/build/uvl2i18n.lua
@@ -8,7 +8,7 @@ require("luci.uvl")
local shm = luci.uvl.UVL():get_scheme(arg[1])
for s, o in luci.util.kspairs(shm.sections) do
- print( string.format( '%s_%s = %q', shm.name, s:gsub("_",""), o.title ) )
+ print( string.format( '%s_%s = %q', shm.name, s:gsub("_",""), o.title or s ) )
if o.description and #o.description > 0 then
print( string.format(
@@ -18,7 +18,7 @@ for s, o in luci.util.kspairs(shm.sections) do
for v, o in luci.util.kspairs(shm.variables[s]) do
print( string.format(
- '%s_%s_%s = %q', shm.name, s:gsub("_",""), v:gsub("_",""), o.title
+ '%s_%s_%s = %q', shm.name, s:gsub("_",""), v:gsub("_",""), o.title or v
) )
if o.description and #o.description > 0 then