diff options
author | Steven Barth <steven@midlink.org> | 2008-07-06 15:19:26 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-07-06 15:19:26 +0000 |
commit | 8f770fd17a561f9e7eecf0b415abb9bb5101cb94 (patch) | |
tree | 77b9eef01f6795982249a8dd323fd75d8c9646c6 | |
parent | bcce358d8aaf44b1974e62b573ad23cfc3861cea (diff) |
* libs/web: Fixed translation handling
-rw-r--r-- | libs/web/root/etc/config/luci | 2 | ||||
-rw-r--r-- | modules/admin-core/luasrc/model/cbi/admin_index/luci.lua | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libs/web/root/etc/config/luci b/libs/web/root/etc/config/luci index 31c7cb4a7..30acca421 100644 --- a/libs/web/root/etc/config/luci +++ b/libs/web/root/etc/config/luci @@ -34,7 +34,7 @@ config event uci_oncommit config internal languages option de "Deutsch" option en "English" - option fr "French" + option fr "Français" config internal sauth option sessionpath "/tmp/.lucisessions" diff --git a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua index f7616610b..be4b08cf5 100644 --- a/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua +++ b/modules/admin-core/luasrc/model/cbi/admin_index/luci.lua @@ -18,8 +18,12 @@ m = Map("luci", translate("webui"), translate("a_i_luci1", c = m:section(NamedSection, "main", "core", translate("general")) 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) ~= "." then + if k:sub(1, 1) ~= "." + and (luci.fs.isfile(i18ndir .. k .. ".lua") + or luci.fs.isfile(i18ndir .. k)) then l:value(k, v) end end |