modules/admin-mini, modules/admin-full: fix language selection, broke with lua->lmo...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 16 Aug 2009 04:51:28 +0000 (04:51 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 16 Aug 2009 04:51:28 +0000 (04:51 +0000)
modules/admin-full/luasrc/model/cbi/admin_index/luci.lua
modules/admin-mini/luasrc/model/cbi/mini/luci.lua

index 30e8ddc..dc9eb1e 100644 (file)
@@ -32,10 +32,7 @@ l:value("auto")
 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")
-       ) then
+       if k:sub(1, 1) ~= "." and fs.access(file .. ".lmo") then
                l:value(k, v)
        end
 end
index d358c8a..28efad9 100644 (file)
@@ -33,10 +33,7 @@ l:value("auto")
 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")
-       ) then
+       if k:sub(1, 1) ~= "." and fs.access(file .. ".lmo") then
                l:value(k, v)
        end
 end