luci-0.9: fix language detection in LuCI settings

This commit is contained in:
Jo-Philipp Wich 2010-04-03 13:21:39 +00:00
parent 243c3d497f
commit d638ce2adb
2 changed files with 2 additions and 4 deletions

View file

@ -33,8 +33,7 @@ local i18ndir = luci.i18n.i18ndir .. "default."
for k, v in luci.util.kspairs(luci.config.languages) do
local file = i18ndir .. k:gsub("_", "-")
if k:sub(1, 1) ~= "." and (
fs.access(file .. ".lua") or
fs.access(file .. ".lua.gz")
fs.access(file .. ".lmo")
) then
l:value(k, v)
end

View file

@ -34,8 +34,7 @@ local i18ndir = luci.i18n.i18ndir .. "default."
for k, v in luci.util.kspairs(luci.config.languages) do
local file = i18ndir .. k:gsub("_", "-")
if k:sub(1, 1) ~= "." and (
fs.access(file .. ".lua") or
fs.access(file .. ".lua.gz")
fs.access(file .. ".lmo")
) then
l:value(k, v)
end