Module:pollasena-roots: Difference between revisions

Jump to navigation Jump to search
no edit summary
m (Sware moved page Module:wascotl-roots to Module:pollasena-roots without leaving a redirect)
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 code = frame.args[1]
local fam, lang = require("Module:families").getByCode(frame.args[1]), require("Module:languages").getByCode(frame.args[2])
local lang = require("Module:languages").getByCode(code)


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

Navigation menu