Skip to content
Snippets Groups Projects
Verified Commit c7ae4815 authored by Karel Koci's avatar Karel Koci :metal:
Browse files

lists/luci: fix and use for_l10n instead of for loop

parent 9173f720
Branches
Tags
No related merge requests found
......@@ -104,25 +104,16 @@ local luci_i18n_en = {
["wol"] = true,
}
if l10n then
local luci_i18n = {}
for _, lang in pairs(l10n or {}) do
luci_i18n[lang] = true
end
Install("luci-i18n-base-en", { optional = true, priority = 20 })
for lang in pairs(luci_i18n) do
Install("luci-i18n-base-" .. lang, { optional = true, priority = 20 })
end
if for_l10n then
Install("luci-i18n-base-en", { optional = true })
for_l10n("luci-i18n-base-")
for _, app in pairs(luci_i18n_pkgs) do
for _, app in pairs(luci_apps) do
if installed["luci-app-" .. app] then
if luci_i18n_en[app] then
Install("luci-i18n-" .. app .. "-en", { optional = true, priority = 20 })
end
for lang in pairs(luci_i18n) do
Install("luci-i18n-" .. app .. "-" .. lang, { optional = true, priority = 20 })
Install("luci-i18n-" .. app .. "-en", { optional = true })
end
for_l10n("luci-i18n-" .. app .. "-")
else
--[[
We are not aware that we should install i18n unless it is installed
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment