Modul:R:it:Olivetti
A modult a Modul:R:it:Olivetti/doc lapon tudod dokumentálni
local export = {}
function export.create(frame)
local params = {
[1] = {list = true, default = mw.title.getCurrentTitle().text},
["alt"] = {list = true, allow_holes = true},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local links = {}
for i, term in ipairs(args[1]) do
if term == "+" then
term = mw.title.getCurrentTitle().text
end
local alt = args.alt[i] or term
local url = "https://www.dizionario-italiano.it/dizionario-italiano.php?parola=" .. mw.uri.encode(term)
table.insert(links, "[" .. url .. " " .. alt .. "]")
end
local joined_links = table.concat(links, ", ")
return joined_links .. " - ''Olivetti''"
end
return export