* luci/modules/admin-{mini,full}: fix language selection for langauges containing hyphens

This commit is contained in:
Jo-Philipp Wich 2008-10-05 17:16:36 +00:00
parent 9b13d8a403
commit 5adf9d5780
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ l = c:option(ListValue, "lang", translate("language"))
local i18ndir = luci.i18n.i18ndir .. "default."
for k, v in pairs(luci.config.languages) do
if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k .. ".lua") then
if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k:gsub("_", "-") .. ".lua") then
l:value(k, v)
end
end

View file

@ -28,7 +28,7 @@ l = c:option(ListValue, "lang", translate("language"))
local i18ndir = luci.i18n.i18ndir .. "default."
for k, v in pairs(luci.config.languages) do
if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k .. ".lua") then
if k:sub(1, 1) ~= "." and luci.fs.isfile(i18ndir .. k:gsub("_", "-") .. ".lua") then
l:value(k, v)
end
end