root/luci/trunk/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua @ 4680

Revision 4680, 1.5 KB (checked in by jow, 4 years ago)

modules/admin-{mini,full}: sort by keys in language selection

  • Property svn:keywords set to Id
Line 
1--[[
2LuCI - Lua Configuration Interface
3
4Copyright 2008 Steven Barth <steven@midlink.org>
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12$Id$
13]]--
14require("luci.config")
15m = Map("luci", translate("webui"), translate("a_i_luci1",
16 "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden."))
17
18-- force reload of global luci config namespace to reflect the changes
19function m.commit_handler(self)
20    package.loaded["luci.config"] = nil
21    require("luci.config")
22end
23
24
25c = m:section(NamedSection, "main", "core", translate("general"))
26
27l = c:option(ListValue, "lang", translate("language"))
28l:value("auto")
29
30local i18ndir = luci.i18n.i18ndir .. "default."
31for k, v in luci.util.kspairs(luci.config.languages) do
32    local file = i18ndir .. k:gsub("_", "-")
33    if k:sub(1, 1) ~= "." and (
34        luci.fs.access(file .. ".lua") or
35        luci.fs.access(file .. ".lua.gz")
36    ) then
37        l:value(k, v)
38    end
39end
40
41t = c:option(ListValue, "mediaurlbase", translate("design"))
42for k, v in pairs(luci.config.themes) do
43    if k:sub(1, 1) ~= "." then
44        t:value(v, k)
45    end
46end
47
48u = m:section(NamedSection, "uci_oncommit", "event", translate("a_i_ucicommit"),
49 translate("a_i_ucicommit1"))
50u.dynamic = true
51
52f = m:section(NamedSection, "flash_keep", "extern", translate("a_i_keepflash"),
53 translate("a_i_keepflash1"))
54f.dynamic = true
55
56return m
Note: See TracBrowser for help on using the browser.