45,647
edits
No edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
local fam, lang = m_families.getByCode(frame.args[1]), require("Module:languages").getByCode(frame.args[2]) | local fam, lang = m_families.getByCode(frame.args[1]), require("Module:languages").getByCode(frame.args[2]) | ||
local proto = fam:getProtoLanguage | local proto = fam:getProtoLanguage() | ||
local links = {}; local categories = {}; local alts = {}; | local links = {}; local categories = {}; local alts = {}; | ||
Line 66: | Line 66: | ||
if item:match("><") then | if item:match("><") then | ||
if prefix == "a" then | if prefix == "a" then | ||
table.insert(links, link( | table.insert(links, link(proto, term, arg)) | ||
table.insert(alts, arg) | table.insert(alts, arg) | ||
elseif prefix == "c" then | elseif prefix == "c" then | ||
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto .. " *" .. 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( | table.insert(links, link(proto, term, arg)) | ||
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto .. " *" .. 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( | table.insert(links, link(proto, term)) | ||
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto .. " *" .. arg) | table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto:getCanonicalName() .. " *" .. arg) | ||
table.insert(alts, term) | table.insert(alts, term) | ||
end | end | ||
end | end | ||
else | else | ||
table.insert(links, link( | table.insert(links, link(proto, args[a][i])) | ||
table.insert(categories, lang:getCanonicalName() .. " terms from " .. proto .. " *" .. 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 |