46,654
edits
Tag: Undo |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
local m_put = require("Module:parse utilities") | local m_put = require("Module:parse utilities") | ||
local gsub = mw.ustring.gsub | local gsub = mw.ustring.gsub | ||
Line 20: | Line 19: | ||
local function link(term,alt) | local function link(term,alt) | ||
return "[[wikt:Reconstruction: | return "[[wikt:Reconstruction:Proto-Indo-European/*" .. term .. "|*" .. (alt or term) .. "]]" | ||
end | end | ||
Line 38: | Line 37: | ||
local args = require("Module:parameters").process(frame:getParent().args, params) | local args = require("Module:parameters").process(frame:getParent().args, params) | ||
local | local lang = require("Module:languages").getByCode(frame.args[1]) | ||
local links = {}; local categories = {}; local alts = {}; | local links = {}; local categories = {}; local alts = {}; | ||
Line 65: | Line 63: | ||
table.insert(alts, arg) | table.insert(alts, arg) | ||
elseif prefix == "c" then | elseif prefix == "c" then | ||
table.insert(categories, lang:getCanonicalName() .. " terms from | table.insert(categories, lang:getCanonicalName() .. " terms from Proto-Indo-European *" .. 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 | table.insert(categories, lang:getCanonicalName() .. " terms from Proto-Indo-European *" .. 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 | table.insert(categories, lang:getCanonicalName() .. " terms from Proto-Indo-European *" .. arg) | ||
table.insert(alts, term) | table.insert(alts, term) | ||
end | end | ||
Line 80: | Line 78: | ||
else | else | ||
table.insert(links, link(args[a][i])) | table.insert(links, link(args[a][i])) | ||
table.insert(categories, lang:getCanonicalName() .. " terms from | table.insert(categories, lang:getCanonicalName() .. " terms from Proto-Indo-European *" .. args[a][i]) | ||
table.insert(alts, args[a][i]) | table.insert(alts, args[a][i]) | ||
end | end |
edits