10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
local m_inline = require("Module:inline") | local m_inline = require("Module:inline") | ||
local m_languages = require("Module:languages") | local m_languages = require("Module:languages") | ||
function export.show(frame) | function export.show(frame) | ||
Line 19: | Line 18: | ||
local term, data = m_inline.parse(entry) | local term, data = m_inline.parse(entry) | ||
local cat = "" | local cat = "" | ||
data[1], data[2] = lang, term | |||
data[ | local link = frame:expandTemplate{title = "m+", args = data} | ||
local link = | |||
if nat then | if nat then | ||
link = link .. "[[Category:" .. nat.name .. " terms with " .. lang.name .. " cognates]]" | link = link .. "[[Category:" .. nat.name .. " terms with " .. lang.name .. " cognates]]" | ||
Line 30: | Line 26: | ||
elseif params[lang] ~= nil then --check for parameters | elseif params[lang] ~= nil then --check for parameters | ||
params[lang] = true | params[lang] = true | ||
else | |||
error("[" .. lang .. "] is not a valid language code or parameter") | |||
end | end | ||
end | end |