Module:pollasena-roots: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 38: Line 38:
local args = require("Module:parameters").process(frame:getParent().args, params)
local args = require("Module:parameters").process(frame:getParent().args, params)
local fam, lang = require("Module:families").getProtoLanguage(frame.args[1]), require("Module:languages").getByCode(frame.args[2])
local fam, lang = require("Module:families").getFamily(frame.args[1]), require("Module:languages").getByCode(frame.args[2])
local proto = fam:require("Module:families").getProtoLanguage()


local links = {}; local categories = {}; local alts = {};
local links = {}; local categories = {}; local alts = {};
Line 64: Line 65:
table.insert(alts, arg)
table.insert(alts, arg)
elseif prefix == "c" then
elseif prefix == "c" then
table.insert(categories, lang:getCanonicalName() .. " terms from " .. fam:getCanonicalName() .. " *" .. arg)
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto:getCanonicalName() .. " *" .. arg)
table.insert(alts, term)
table.insert(alts, term)
end
end
elseif prefix == "a" then
elseif prefix == "a" then
table.insert(links, link(term, arg))
table.insert(links, link(term, arg))
table.insert(categories, lang:getCanonicalName() .. " terms from " .. fam:getCanonicalName() .. " *" .. term)
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto:getCanonicalName() .. " *" .. term)
table.insert(alts, arg)
table.insert(alts, arg)
elseif prefix == "c" then
elseif prefix == "c" then
table.insert(links, link(term))
table.insert(links, link(term))
table.insert(categories, lang:getCanonicalName() .. " terms from " .. fam:getCanonicalName() .. " *" .. arg)
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto:getCanonicalName() .. " *" .. arg)
table.insert(alts, term)
table.insert(alts, term)
end
end
Line 79: Line 80:
else
else
table.insert(links, link(args[a][i]))
table.insert(links, link(args[a][i]))
table.insert(categories, lang:getCanonicalName() .. " terms from " .. fam:getCanonicalName() .. " *" .. args[a][i])
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto:getCanonicalName() .. " *" .. args[a][i])
table.insert(alts, args[a][i])
table.insert(alts, args[a][i])
end
end

Navigation menu