From d638ce2adb73369408884b6c13e133bcda425d1e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 3 Apr 2010 13:21:39 +0000 Subject: [PATCH] luci-0.9: fix language detection in LuCI settings --- modules/admin-full/luasrc/model/cbi/admin_index/luci.lua | 3 +-- modules/admin-mini/luasrc/model/cbi/mini/luci.lua | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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..ddf86888d 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_index/luci.lua @@ -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 diff --git a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua index d358c8a0b..e84d9eefe 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/luci.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/luci.lua @@ -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 -- 2.25.1