From: Jo-Philipp Wich Date: Sun, 16 Aug 2009 04:51:28 +0000 (+0000) Subject: modules/admin-mini, modules/admin-full: fix language selection, broke with lua->lmo... X-Git-Tag: 0.10.0~1192 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=843641d98e2d4f356f011aca2aade498a7dc69bd;p=oweals%2Fluci.git modules/admin-mini, modules/admin-full: fix language selection, broke with lua->lmo transition --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua index 30e8ddcc1..dc9eb1e9e 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua @@ -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 diff --git a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua index d358c8a0b..28efad921 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua @@ -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